Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAASRealm to use LdapLoginModule in Tomcat

843811Jun 6 2008 — edited Jun 10 2008
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.catalina.realm.JAASRealm" appName="TEST" />

JAAS Config
------------------

TEST {
com.sun.security.auth.module.LdapLoginModule REQUIRED
userProvider="ldap://localhost:389/ou=employee,dc=test,dc=com"
authIdentity="uid={USERNAME},ou=employee,dc=test,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 ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2008
Added on Jun 6 2008
3 comments
2,371 views