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

LDAP-307: Inability to enable ApacheDS schemas

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

Franjo Žilić (Migrated from LDAP-307) said:

When adding custom LDAP schemas to the ldifFile attribute for embedded server there is no way to enable built in schemas that are not enabled by default.

For example, custom object class definition has defined mandatory attribute homeDirectory.

dn: m-oid=1.3.6.1.4.1.90009.99.1.1, ou=objectclasses, cn=example, ou=schema objectclass: metaObjectClass objectclass: metaTop objectclass: top m-oid: 1.3.6.1.4.1.90009.99.1.1 m-name: customObjectClass m-supObjectClass: inetOrgPerson m-typeObjectClass: STRUCTURAL m-must: cn m-must: sn m-must: uid m-must: mail m-must: userPassword m-must: homeDirectory

Attribute homeDirectory is provided in ApacheDS 1.5.5 within nis schema with definition: dn: m-oid=1.3.6.1.1.1.1.3,ou=attributeTypes,cn=nis,ou=schema objectClass: metaAttributeType objectClass: metaTop objectClass: top m-oid: 1.3.6.1.1.1.1.3 m-collective: FALSE m-description: The absolute path to the home directory m-equality: caseExactIA5Match m-name: homeDirectory m-noUserModification: FALSE m-obsolete: FALSE m-singleValue: TRUE m-syntax: 1.3.6.1.4.1.1466.115.121.1.26 m-usage: USER_APPLICATIONS

Before any LDAP entry can use that attribute, or before custom object class can be created, it is necessary to enable nis schema (provided with ApacheDS, but disabled by default).

In order to enable nis schema main ldif should have dn: cn=nis,ou=schema changetype: modify replace: m-disabled m-disabled: FALSE

Since org.springframework.ldap.ldif.parser.LdifParser doesn't support change operations suggested code change provided in gist would solve the problem far simpler then changing LdifParser.

Patch file provided as well, documentation should be updated

spring-projects-issues avatar May 27 '14 05:05 spring-projects-issues

Franjo Žilić said:

Pull request submitted: https://github.com/spring-projects/spring-ldap/pull/20

spring-projects-issues avatar Jun 14 '15 11:06 spring-projects-issues

We cannot add this because there isn't any tests and we need documentation. If the PR can be updated, then we can consider merging.

rwinch avatar Oct 04 '16 13:10 rwinch