directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: ApacheDs - DIGEST-MD5
Date Wed, 18 Feb 2009 10:49:38 GMT
Hi,

On Wed, Feb 18, 2009 at 11:34 AM, Nowhere <spina.rosa@gmail.com> wrote:
>
> Hi all,
> I don't know if this is the right place, but I have a problem connecting my
> ApacheDS using DIGEST-MD5:
>
> i wrote a simple java class that works fine with simple authentication.
> Here it's:
> public static void main(String[] args) throws NamingException {
>
>        if (args.length < 2) {
>            System.err.println("Usage: java AdvancedBindDemo <uid>
> <password>");
>            System.exit(1);
>        }
>
>        Hashtable env = new Hashtable();
>        env.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.sun.jndi.ldap.LdapCtxFactory");
>        env.put(Context.PROVIDER_URL, "ldap://localhost:10389/");
>        env.put(Context.SECURITY_AUTHENTICATION, "simple");
>        env.put(Context.SECURITY_PRINCIPAL, "cn=admin,dc=example,dc=com");
>        env.put(Context.SECURITY_CREDENTIALS, "admin");

You have to define two more element in your configuration :

         // Specify realm
         env.put( "java.naming.security.sasl.realm", "example.com" );

         // Request privacy protection
         env.put( "javax.security.sasl.qop", "auth-conf" );


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message