This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LDAP with JNDI trouble

 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am setting up my Tomcat JNDI realm as:

<Realm className="org.apache.catalina.realm.JNDIRealm"
connectionURL="ldap://Au-dc1:389"
connectionName="CN=Ken Rubin,OU=Development,OU=Corporate,DC=mycompany,DC=com"
connectionPassword="mallory1"
userBase="OU=Development,OU=Corporate,DC=mycompany,DC=com"
userSearch="(sAMAccountName={0})"
userSubtree="true"
userRoleName="cn"
/>

I am only able to log onto Tomcat Manager if I set
userRoleName="cn", when as an attribute = "Ken Rubin". In web.xml for the Tomcat manager, I had to
set my name as a role. ie.

web.xml
<auth-constraint>
<role-name>Ken Rubin</role-name>
</auth-constraint>
</security-constraint>

<security-role>
<role-name>Ken Rubin</role-name>
</security-role>

My directory in LDAP is at "CN=Ken Rubin,OU=Development,OU=Corporate,DC=mycompany,DC=com".

I had wished to set userRoleName="memberOf" and return the roles for me, one these roles would be in my web.xml
instead of Ken Rubin. But I have been unable to do this.

One thing I noticed is that none of our company roles have any attributes listed under them.

Also I don't know how to get the logger to give me more possible information about why I am failing.

Any help would be greatly appreciated!

Thank you,
Ken

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic