I need to configure Tomcat 7 with Active directory LDAP.
I did  following configuration in server.xml & application's web.xml but while 
loggin in 
"Invalid username and/or password, please try again" error is coming .please 
suggest what can be the issue
=========server.xml ==================================
<Realm className="org.apache.catalina.realm.JNDIRealm"
 debug="99"
 connectionURL="ldap://yoebills.i.yoebills.com:389/";
 connectionName="git.ldaptom...@i.yoebills.com"
 connectionPassword="asdef"
 userBase="dc=i,dc=yoebills,dc=com"
 userSearch="(sAMAccountName={0})"
 roleBase="dc=i,dc=yoebills,dc=com"
 roleName="cn"
 roleSearch="(member={0})"
 roleSubtree="true"
 userSubtree="true"
 />
 
======================= application "web.xml" 
===============================================
<security-constraint>
<display-name>Example Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/*</url-pattern>
<!-- If you list http methods, only those methods are protected -->
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>sg-admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
   <realm-name>Form based authentication</realm-name>
   <form-login-config>
     <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
       <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
          </form-login-config>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<role-name>sg-admin</role-name>
</security-role>

 
 
 Vicky

Reply via email to