Skip to content

Ldap group creation always use groupOfNames #11775

Open

Description

@3l0w

Describe the bug

When creating a group in the UI, graph will always create a groupOfNames.
So if you wish to use something different like a groupOfUniqueNames and his uniqueMember attributes it will not work.

Steps to reproduce

  1. Use openldap as the backend of ocis
  2. Set OCIS_LDAP_GROUP_OBJECTCLASS to groupOfUniqueNames
  3. Set OCIS_LDAP_GROUP_SCHEMA_MEMBER to uniqueMember

Expected behavior

A group with the objectClass of groupOfUniqueNames should be created

Actual behavior

Got 500 in the console because groupOfNames requires member.

Setup

Details

 OCIS_LDAP_URI: ldap://openldap:389
 OCIS_LDAP_INSECURE: "true"
 OCIS_LDAP_BIND_DN: "cn=admin,dc=thing,dc=com"
 OCIS_LDAP_BIND_PASSWORD: "PASSWORD"
 OCIS_LDAP_GROUP_BASE_DN: "ou=groups,dc=thing,dc=com"
 OCIS_LDAP_GROUP_FILTER: "(objectclass=groupOfUniqueNames)"
 OCIS_LDAP_GROUP_OBJECTCLASS: "groupOfUniqueNames"
 OCIS_LDAP_GROUP_SCHEMA_MEMBER: "uniqueMember"
 OCIS_LDAP_USER_BASE_DN: "ou=users,dc=thing,dc=com"
 OCIS_LDAP_USER_FILTER: "(objectclass=ownCloud)"
 OCIS_LDAP_USER_OBJECTCLASS: "inetOrgPerson"
 LDAP_LOGIN_ATTRIBUTES: "uid"
 OCIS_LDAP_USER_SCHEMA_USERNAME: cn
 OCIS_ADMIN_USER_ID: "UUID"
 IDP_LDAP_LOGIN_ATTRIBUTE: "uid"
 IDP_LDAP_UUID_ATTRIBUTE: "ownCloudUUID"
 IDP_LDAP_UUID_ATTRIBUTE_TYPE: text

Additional context

#11776 should fix the issue

Activity

  1. jvillafanez commented on Nov 6, 2025

    @jvillafanez
    Member

    I'm not sure about this one. I mean, having a 500 error needs to be checked, but maybe allowing writing in an external LDAP server shouldn't happen in the first place.

    The reasoning is that, if you're using the internal idm, oCIS is expected to have exclusive access to the backend, which just happens to be LDAP. It doesn't matter how the information is stored as long as it gets the job done.

    If you're using an external LDAP, you probably have a tool to add information to that LDAP (thinking about AD for example). Using a different tool might cause problems due to missing information that the "recommended" tool (such as AD) could add. In general, if you're using an external LDAP, you should consider to have the OCIS_LDAP_SERVER_WRITE_ENABLED to false, which would block write access to the LDAP from oCIS.

  2. 3l0w commented on Nov 6, 2025

    @3l0w
    ContributorAuthor

    The use of an external ldap is referenced multiple time across the documentation, this repository even contains a additional schema for openldap. Maybe i shouldn't allow writes on mine but the feature is here, and documented.

  3. jvillafanez commented on Nov 6, 2025

    @jvillafanez
    Member

    It's a matter of who's controlling the LDAP server.

    The use of an external ldap is referenced multiple time across the documentation, this repository even contains a additional schema for openldap

    Right. However, the LDAP server is fully controlled by oCIS, that's why there is a custom schema inside and several references of custom attributes.
    In this case, I still stand by my words: oCIS has exclusive access to the LDAP server, so it doesn't matter how the information is stored.

    It isn't like oCIS is connecting to an external LDAP server, but more like oCIS is making its LDAP server available for 3rd party services. If this is the case, 3rd party services should be configured and adapted to be able to access to the oCIS' LDAP server.

    I agree it might not be clear in the documentation, or there are too many assumptions that needs to be brought to light. If you can point in the documentation where were you having problems, we can review the information and clarify things.

  4. jvillafanez commented on Nov 11, 2025

    @jvillafanez
    Member

    @kobergj I think we need an "official" statement.

    The PR seems fine, but we'll need to adjust also the users (pretty sure they have the same problem).
    It might open a can of worms if we consider to write in an AD. Not being able to login in oCIS is bad, but writing wrong information in a corporate LDAP server seems worse, and it could happen with a wrong configuration.
    I'm more inclined to prevent it, although I'm not sure if there is anything we can do other than document the problem.

  5. kobergj commented on Feb 25, 2026

    @kobergj
    Contributor

    There is no other option. We need to allow writes in certain cases. This is anyways a bug as ocis uses the configured groupObjectClass when reading. So it should also use it when writing.

  6. dj4oC commented on Jul 8, 2026

    @dj4oC
    Contributor

    Before this can be acted on, the following needs to be resolved:

    • This is already fixed: PR [OCISDEV-672] Don't use hardcoded groupOfNames #12063 ("Don't use hardcoded groupOfNames") was merged to master on 2026-03-03 and backported to stable-8.0 via PR [OCISDEV-672][Backport 8.0] Dont use hardcoded groupOfNames #12077 (merged 2026-03-04). services/graph/pkg/identity/ldap_group.go now uses the configured i.groupObjectClass (from OCIS_LDAP_GROUP_OBJECTCLASS/GRAPH_LDAP_GROUP_OBJECTCLASS) and i.groupAttributeMap.member (from OCIS_LDAP_GROUP_SCHEMA_MEMBER) instead of hardcoded groupOfNames/member.
    • Note from the PR thread (@jvillafanez): the same hardcoding may still apply to the users LDAP backend, not just groups — please confirm whether that follow-up is tracked separately or still needs a new issue.
    • Please confirm the fix resolves your groupOfUniqueNames/uniqueMember setup on a build including PR [OCISDEV-672] Don't use hardcoded groupOfNames #12063, then this issue can be closed.

    🤖 Automated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions