Trouble setting up roles in Tomcat for LDAP authentication
Hi,
I've got a simple web application running within Tomcat 5.5. I need to use LDAP to access the username/password for logging into the application.
Listed below is how I currently have it configured:
SERVER.XML
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldaps://myldaps-auth.llnl.gov:636"
roleBase="ou=People,dc=llnl,dc=gov"
roleName="cn"
userSearch="uid={0}"
userBase="ou=People,dc=llnl,dc=gov"
/>
Applications' WEB.XML
<security-constraint>
<web-resource-collection>
<web-resource-name>Test</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>test</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Test_App</realm-name>
<form-login-config>
<form-login-page>/auth/logon.html</form-login-page>
<form-error-page>/auth/logonError.html</form-error-page>
</form-login-config>
</login-config>
Logon.html
<HTML>
<H1>FORM Authentication demo</H1>
<form method="POST" action="j_security_check">
<table border="0" cellspacing="2" cellpadding="1">
<tr>
<td>Username:</td>
<td><input size="12" value="" name="j_username" maxlength="25" type="text"></td>
</tr>
<tr>
<td>Password:</td>
<td><input size="12" value="" name="j_password" maxlength="25" type="password"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input name="submit" type="submit" value="Login">
</td>
</tr>
</table>
</form>
</HTML>
It appears that the logon page does success in validating my username/password. At that point, it should display the index.html. However, after logging on, I get:
HTTP Status 403 - Access to request resource has been denied
Does this sound familiar to anyone?
Thanks,
Judy