directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: How to disable anonymous access for embedded ApacheDS
Date Thu, 22 Nov 2012 13:20:15 GMT
try after calling

directory.setAccessControlEnabled(true);

On Thu, Nov 22, 2012 at 6:39 PM, Eugene Prokopiev <enp@itx.ru> wrote:

> Hi,
>
> Is it possible to disable anonymous access for embedded ApacheDS? I tried
> to do this:
>
> public class Application {
>     public static void main(String[] args) throws Exception {
>         DirectoryService directory = new DefaultDirectoryService();
>         directory.startup();
>         LdapServer ldap = new LdapServer();
>         ldap.setDirectoryService(directory);
>         ldap.setAllowAnonymousAccess(false);
>         ldap.setTransports(new TcpTransport(10389));
>         ldap.start();
>     }
> }
>
> But result was:
>
> $ ldapsearch -h localhost -p 10389 -x -b "ou=system"
> # extended LDIF
> #
> # LDAPv3
> # base <ou=system> with scope subtree
> # filter: (objectclass=*)
> # requesting: ALL
> #
>
> # system
> dn: ou=system
> objectClass: organizationalUnit
> objectClass: extensibleObject
> objectClass: top
> ou: system
>
> ...
>
> I used version 1.5.5, because 2.0 is not released now and 1.5.7 requires
> more verbose code. Is it possible to disable anonymous access with 1.5.7 or
> 2.0?
>
> --
> Regards,
> Eugene Prokopiev
>



-- 
Kiran Ayyagari
http://keydap.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message