directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik_Vanhe...@inventivedesigners.com
Subject ambiguous bind settings encountered exception ?
Date Wed, 07 Jun 2006 09:39:23 GMT
Hi All, 

I'm trying to upgrade our embedded 0.9 ldap server to the RC3 in 
preparation for moving to the 1.0.0 release however I'm quite puzzled at 
the following exception : 

Jun 7, 2006 11:25:22 AM 
org.apache.directory.server.core.DefaultDirectoryService startup
WARNING: ApacheDS shutdown hook has NOT been registered with the runtime. 
This default setting for standalone operation has been overriden.
Jun 7, 2006 11:25:23 AM 
org.apache.directory.server.core.DefaultDirectoryService 
showSecurityWarnings
WARNING: You didn't change the admin password of directory service 
instance 'default'.  Please update the admin password as soon as possible 
to prevent a possible security breach.
Jun 7, 2006 11:25:23 AM 
org.apache.directory.server.jndi.ServerContextFactory loadLdifs
INFO: LDIF load directory not specified.  No LDIF files will be loaded.
Jun 7, 2006 11:25:23 AM 
org.apache.directory.server.jndi.ServerContextFactory startLDAP0
INFO: Successful bind of an LDAP Service (13544) is complete.
Jun 7, 2006 11:25:23 AM CEST [main] [SEVERE] Unable to start embedded LDAP 
server.
org.apache.directory.shared.ldap.exception.LdapConfigurationException: 
ambiguous bind settings encountered where bind is anonymous yet 
java.naming.security.credentials property is set
        at 
org.apache.directory.server.core.DefaultDirectoryService.checkSecuritySettings(
DefaultDirectoryService.java:382)
        at 
org.apache.directory.server.core.DefaultDirectoryService.getJndiContext(
DefaultDirectoryService.java:134)
        at 
org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(
AbstractContextFactory.java:121)
        at javax.naming.spi.NamingManager.getInitialContext(
NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(
InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(
InitialDirContext.java:82)
        at id.serverapp.directoryserver.LDAPServer.start(
LDAPServer.java:166)

I'm disabling anonymous binds and specifying admin credentials. If I 
remove te admin credentials it complains that anonymous binds are disabled 
.. so what's going on ?  I tried looking at the checkSecuritySettings code 
but I did not understand what the problem was. I probably did something 
pretty braindead but my LDAP/directory server knowledge is quite limited 
;)

For reference my code looks a lot like the jboss integration 

                final Properties env = new Properties();
                env.setProperty(Context.PROVIDER_URL, 
"uid=admin,ou=system");
                env.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
ServerContextFactory.class.getName());
                env.setProperty(Context.SECURITY_PRINCIPAL, kADMIN_USER);
                env.setProperty(Context.SECURITY_CREDENTIALS, 
kADMIN_PASSWORD);
                // This is bug-or-weirdness workaround for in-VM access to 
the
                // DirContext of ApacheDS
                env.put(Configuration.JNDI_KEY, new SyncConfiguration());
 
                // Now create a configuration for the ldap server and add 
these as JNDI keys
                MutableServerStartupConfiguration cfg = new 
MutableServerStartupConfiguration();

                // Access Control
                cfg.setAccessControlEnabled(true);
                cfg.setAllowAnonymousAccess(false);

                // Wire protocols
                cfg.setEnableNetworking(true);
                cfg.setLdapPort(Integer.parseInt(port));
                cfg.setEnableNtp(false);
                cfg.setEnableKerberos(false);
                cfg.setEnableChangePassword(false);
                cfg.setEnableLdaps(false);

                // Work directory were the ldap server stores it's files
                cfg.setWorkingDirectory(store);

                // Addditional bootstrap schemas we provide
                final Set schemas = cfg.getBootstrapSchemas();
                schemas.add(new ScripturaUserSchema());
                schemas.add(new ScripturaGroupSchema());
                cfg.setBootstrapSchemas(schemas);

                // Shutdown
                cfg.setShutdownHookEnabled(false);
                cfg.setExitVmOnShutdown(false);

                // done changing the configuration, add to the jndi 
environment
                env.putAll(cfg.toJndiEnvironment());

                // Fire it up!
                new InitialDirContext(env);

Thx for any feedback,
Erik

---------

Erik Vanherck  -  Product Delivery Manager
Inventive Designers 
Visit http://www.inventivedesigners.com
Visit http://www.inventivedesigners.com/scriptura for Scriptura 
information !

Phone: +32 - 3 - 8210170
Fax: +32 - 3 - 8210171
Email: Erik_Vanherck@inventivedesigners.com

"Computers in the future may weigh no more than 1.5 tons." - Popular 
Mechanics, forecasting the relentless march of science, 1949 

--------------------------------------------------
Inventive Designers' Email Disclaimer:

http://www.inventivedesigners.com/email-disclaimer

Mime
View raw message