I'm trying to setup my webapp to authenticate to Active Directory. After
searching and googling I still cannot resolve my problem.  I've created
a user named tomcatuser and security group called tomcat in the Users
container.  I've put my logon in that group tomcat and no success
logging into the webapp.  Any help or direction would be very
appreciated...

 

 

 

Server.xml:

 

 

            <Realm className="org.apache.catalina.realm.JNDIRealm"

                        connectionURL="ldap://server:389";

                        userBase="CN=Users,dc=[domain],dc=com"

                        userSearch="(userPrincipalName={0})"

                        userRoleName="member"

                        roleBase="CN=Users,dc=[domain],dc=com"

                        roleName="cn"

                        roleSearch="(member={0})"

 
connectionName="CN=tomcatuser,CN=Users,DC=[domain],DC=com"

                        connectionPassword="sinner"

                        roleSubtree="true"

                        userSubtree="true"/>

 

Web.xml

 

                        <security-constraint>

                                    <display-name>Show Tracker Security
Constraint</display-name>

                                    <web-resource-collection>

 
<web-resource-name>Protected Area</web-resource-name>

 
<url-pattern>/*</url-pattern>

                                    </web-resource-collection>

                                    <auth-constraint>

 
<role-name>tomcat</role-name>

                                    </auth-constraint>

                        </security-constraint>

 

                        <login-config>

                                    <auth-method>FORM</auth-method>

                                    <realm-name>Show Tracker
Authentication Area</realm-name>

                                    <form-login-config>

 
<form-login-page>/login.jsp</form-login-page>

 
<form-error-page>/error.jsp</form-error-page>

                                    </form-login-config>

                        </login-config>

                        <security-role>

                                    <description>Registered
users</description>

                                    <role-name>tomcat</role-name>

                        </security-role>

 

 

 

Reply via email to