[Date Prev][Date Next] [Chronological] [Thread] [Top]

SASL access question using JNDI

I am fairly new to LDAP and I am having some trouble accessing the 
directory using SASL with the JNDI (Java API). The simple authentication 
is pretty straightforward:

Hashtable environment = new Hashtable();
environment.put(Context.SECURITY_AUTHENTICATION, "simple");
                "ldap://localhost/ou=People,o=Honors,"; +
                "o=Tennessee Tech University,c=US");
                "mail=will@himinbi.org,o=Honors," +
                "o=Tennessee Tech University,c=US");

And I can connect and add attributes as th permissions allow.

I think that my problem is that I don't understand how the SASL 
authentication. What I have done is to change two lines:

environment.put(Context.SECURITY_AUTHENTICATION, "CRAM-MD5");
                "uid=honors + realm=odin");

This is the format for the rootdn in my slapd.conf
("uid=root+ realm=odin"). And I can connect to the server and add things 
using ldapmodify -U honors. I have looked over the debugging info from 
slapd and I am just not quite following what is going on. There is always 
a binddn, right? Is there additional information with sasl?

I can't do ldapsearch -D "uid=honors+ realm=odin" so I am assuming that it 
is the same misunderstanding that makes me think I ought to be able to 
that is confusing me on the JNDI.