This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to avoid role authentication in LDAP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to avoid role authentication in LDAP?" Watch "How to avoid role authentication in LDAP?" New topic
Author

How to avoid role authentication in LDAP?

aravind shenoy
Greenhorn

Joined: Aug 26, 2004
Posts: 6
I am using Tomcat 4.1 and need to perform LDAP authentication.

My realm configuration in server.xml is as follows:
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldap://MyLdapUrl:389"
userPattern="uid={0},o=mycompany,ou=people"/>

I have configured my web.xml as
<security-constraint>
<web-resource-collection>
<web-resource-name>The Entire Web Application</webresource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name></role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>My Realm Name</realm-name>
</login-config>

Now when I run the application by typing the url in the browser,
1. It asks for uid and pwd
2. If I provide valid uid and pwd, the tomcat log says, "The user has been authenticated successfully"
3. But then it looks into LDAP for the role specified in <auth-constraint> of web.xml...coz, the log says, "No such role defined for the user"..But, I do not have any role specified for the users in LDAP..So,I get a screen in the browser that says, access is denied for the typed url

4. I just need to authenticate the user based on their uid and pwd(which is already happening now).Once authenticated, the user must be given the screen according to the url typed in the browser. But, I do not want the Tomcat to look for the user role..

5. Is there any ways to skip this role athentication..?I tried removing <auth-constraint> from web.xml..But, even that did not solve my problem..

Pls help me in this regard..

Thanks,
Aravind
Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
Did you find solution to this? Appreciate post it for the benefits of all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to avoid role authentication in LDAP?
 
Similar Threads
after JNDI realm Authentication, need further specificity on authentication
Tomcat LDAP Authentication
Problem in LDAP authentication for Tomcat
Configure JNDI Realm
ties form base authentication with database (weblogic 8.1)