Hi All,
I am trying to configure JAASRealm in Tomcat and use Java 6's LdapLoginModule to authenticate and authorize users against LDAP. My requirement is to bind with LDAP using a userid from one branch and thereon authenticate using userid from a different branch. LDAP is configured not to allow non-anonymous bind.
Here is my configuration.
Server.xml
--------------------------
----------
----------
----------
----------
----------
----
<Realm className="org.apache.cata
lina.realm
.JAASRealm
" appName="TEST" />
JAAS Config
--------------------------
----------
----------
----------
----------
----------
----
TEST {
com.sun.security.auth.modu
le.LdapLog
inModule REQUIRED
userProvider="ldap://local
host:389/o
u=employee
,dc=test,d
c=com"
authIdentity="uid={USERNAM
E},ou=empl
oyee,dc=te
st,dc=com"
};
The user i am trying to authenticate belongs to ou=employee,dc=test,dc=com
and the user that i am trying to bind belongs to mycompany branch in the LDAP.
Is there a way to configure bind userid & password directly in the JAAS config ?
Start Free Trial