OpenIdentityPlatform / OpenDJ

OpenDJ is an LDAPv3 compliant directory service, which has been developed for the Java platform, providing a high performance, highly available, and secure store for the identities managed by your organization. Its easy installation process, combined with the power of the Java platform makes OpenDJ the simplest, fastest directory to deploy and manage.
https://www.openidentityplatform.org/opendj
Other
370 stars 103 forks source link

Collective attributes do not merged values with multi-valued attr #187

Closed JDanielA closed 3 months ago

JDanielA commented 3 years ago

Describe the bug

Collective attributes (virtual attributes) are not merged, only the attributes from the first entry are returned. This bug report was inspired in a very similar problem detected in the non-community version of OpenDJ.

To Reproduce

You must to create two CollectiveAttributeSubentry with the same collective attribute "myattr" and two differents values.

E.g.

dn: cn=collective1,dc=example,dc=com
objectClass: top
objectClass: subentry
objectClass: collectiveAttributeSubentry
objectClass: extensibleObject
cn: collective1
myattr;collective: collective1
subtreeSpecification: {base "ou=people", specificationFilter "(uid=*)" }

dn: cn=collective2,dc=example,dc=com
objectClass: top
objectClass: subentry
objectClass: collectiveAttributeSubentry
objectClass: extensibleObject
cn: collective2
myattr;collective: collective2
subtreeSpecification: {base "ou=people", specificationFilter "(uid=user*)" }

Expected behavior

According to RFC 3671:

When an entry belongs to multiple entry collections, the entry's
   values of each collective attribute are combined such that
   independent sources of these values are not manifested to clients.
...
Collective attributes SHALL NOT be SINGLE-VALUED.
bin/ldapsearch --port 1389  -b "ou=people,dc=example,dc=com" -s sub "(uid=user.0)" myattr
dn: uid=user.0,ou=People,dc=example,dc=com
myattr: collective1
myattr: collective2

=> So it sounds like collective attribute values should be merged. Virtuals with other virtuals and reals values.

Current behavior

Version

vharseko commented 3 months ago

fixed 4.7.0