owncloud / owncloud/ocis

Ldap group creation always use groupOfNames

Open
#11,775 6 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## 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

```console
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.