spring-ldap icon indicating copy to clipboard operation
spring-ldap copied to clipboard

LDAP-303: odm: missing objectClass inheritance

Open spring-projects-issues opened this issue 11 years ago • 1 comments
trafficstars

Torsten Werner (Migrated from LDAP-303) said:

I have a class with annotation @Entry(objectClasses = {"top"}) but several ldap nodes have only the objectClass=inetOrgPerson which is correct because inetOrgPerson inherits from top. Spring-ldap submits a query (&(objectClass=top)(uid=...)) to the server and the server responds with all nodes because it knows about the inheritance. For nodes with objectClass=inetOrgPerson only the server sends only this objectClass back to the client without the inherited objectClass top.

But there is a check in org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper#mapFromLdapDataEntry if(!collectionContainsAll(objectClassesFromJndi, metaData.getObjectClasses())) that throws away all results that do not have an explicit objectClass=top in the server's response.

IMHO, spring-ldap should trust the ldap server and do not throw away such results. But at least there should be an option for disabling/enabling this extra check.

spring-projects-issues avatar May 19 '14 04:05 spring-projects-issues

Same issue like #340

christophs78 avatar Aug 09 '18 14:08 christophs78