Hi, all! I am new to Tomcat. I am recently doing a sample app of authentication using tomcat + JNDI + Light Weight ActiveDirectory. I wanted to log into the web app with "admin" but failed several times with no error messages in my eclipse console...
I had a user named "admin" with the dn= "cn=admin, o=University,c=World" and password="111". "admin" is in the group(role) named: "Administrators" with the dn="cn= Administrators, cn=Roles, o=University,c=World". I used tomcat 7.0.4 and wrote the JNDI realm section in the server.xml as bellow: <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://172.16.55.165:3268" authentication="simple" referrals="follow" connectionName="cn=tomcat,o=University,c=World" connectionPassword="cscw" userPattern="cn={0},o=University,c=World" roleBase="cn=Roles,o=University,c=World" roleName="cn" roleSubtree="true" roleSearch="(member={0})" /> The Security settings in my web.xml is like: <web-app> <security-constraint> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/fs/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>Students</role-name> <role-name>Teachers</role-name> <role-name>Administrators</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> <!-- Define the login configuration for this application --> <login-config> <auth-method>FORM</auth-method> <realm-name>Example Form-Based Authentication Area</realm-name> <form-login-config> <form-login-page>/login/login.jsp</form-login-page> <form-error-page>/login/error.jsp</form-error-page> </form-login-config> </login-config> <!-- Security roles referenced by this web application --> <!-- Security roles used by this web application --> <security-role> <role-name>Students</role-name> </security-role> <security-role> <role-name>Teachers</role-name> </security-role> <security-role> <role-name>Administrators</role-name> </security-role> </web-app> Would anyone like to give a suggestion? thx! --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org