mardi 29 septembre 2015

Attempting to use ApacheDS for unit testing a Spring AD Auth Provider

I'm trying to create unit tests for my application to ensure that the authentication provider is returning predictable results. I've verified that it works against the company's AD, but I'd like to make an embedded test too. I saw that Spring Security uses the ApacheDS service and I'm trying to implement it in my code. I created an ldif file that's setting up my defaults, but I'm getting some warnings on some MS-specific attributes.

2015-09-29 14:28:04 WARN  org.apache.directory.server.schema.registries.DefaultOidRegistry,148 - OID for name 'samaccountname' was not found within the OID registry
2015-09-29 14:28:04 WARN  org.apache.directory.server.core.entry.DefaultServerEntry,307 - The attribute 'samaccountname' cannot be stored
2015-09-29 14:28:04 WARN  org.apache.directory.server.schema.registries.DefaultOidRegistry,148 - OID for name 'userprincipalname' was not found within the OID registry
2015-09-29 14:28:04 WARN  org.apache.directory.server.core.entry.DefaultServerEntry,307 - The attribute 'userprincipalname' cannot be stored
2015-09-29 14:28:04 WARN  org.apache.directory.server.schema.registries.DefaultOidRegistry,148 - OID for name 'samaccounttype' was not found within the OID registry
2015-09-29 14:28:04 WARN  org.apache.directory.server.core.entry.DefaultServerEntry,307 - The attribute 'samaccounttype' cannot be stored

I see this is referencing DefaultOidRegistry - is there a default MS scheme I can use instead? How can I set my test data in the ldif to import into the embedded ldap server?

Aucun commentaire:

Enregistrer un commentaire