tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vicky007aggar...@yahoo.co.in
Subject Re: tomcat 7 ldap error
Date Wed, 07 Aug 2013 02:46:54 GMT
Hi All,

Can somebody pls share the steps requires to setup active directory with tomcat .

Is it valid to simply define a user in the active directory ldap without assigning any role
to it ?? Will we still  be able to authenticate the user when logged in from the application.if
yes then kindly share the configuration which i need to do in web.xml and server.xml.

I need this because in our application we have ldap users defined without any role mapped
to them, so i want to know how to configure this in server.xml and web.xml,so that user get
authenticated successfully


Thanks,
Vicky



On Aug 6, 2013, at 8:53 PM, vicky <vicky007aggarwal@yahoo.co.in> wrote:

>  
>  
> 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.LDAPTOMCAT@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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message