You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "David Geleyn (JIRA)" <di...@incubator.apache.org> on 2005/03/29 17:48:21 UTC

[jira] Commented: (DIREVE-149) Disabling anonymous bind doesn't work

     [ http://issues.apache.org/jira/browse/DIREVE-149?page=comments#action_61746 ]
     
David Geleyn commented on DIREVE-149:
-------------------------------------

This issue is solved and can be closed! Thanks!



> Disabling anonymous bind doesn't work
> -------------------------------------
>
>          Key: DIREVE-149
>          URL: http://issues.apache.org/jira/browse/DIREVE-149
>      Project: Directory Server
>         Type: Bug
>   Components: jndi-provider
>     Versions: 0.9
>  Environment: Windows XP, java 1.4.2, SNAPSHOT download of ApacheDS 0.9
>     Reporter: David Geleyn
>     Assignee: Alex Karasulu
>      Fix For: 0.9

>
> Assume the LDAP server is started with the following env property:
> env.setProperty(EnvKeys.DISABLE_ANONYMOUS, "true");
> The anonymous bind is not disabled since we can access the server with an anonymous bind (via LDAP Browser).
> Some sample code:
> // Standard JNDI properties
> env.setProperty(Context.PROVIDER_URL, "ou=system");
> env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.ServerContextFactory");
> env.setProperty(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
> env.setProperty(Context.SECURITY_CREDENTIALS, "secret");
> // Eve specific JNDI properties
> File store = new File(...);
> if (!store.exists())
> {
> 	store.mkdirs();
> }
> env.setProperty(EnvKeys.SCHEMAS, kSCHEMAS);
> env.setProperty(EnvKeys.WKDIR, store.getAbsolutePath());
> env.setProperty(EnvKeys.DISABLE_ANONYMOUS, "true");
> env.setProperty(EnvKeys.LDAP_PORT, settings.getPort());
> try
> {
> 	//  Fire it up!
> 	new InitialDirContext(env);
> }
> catch (NamingException e)
> {
> ...
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira