B
bootman
Greetings,
I'm having a bit of difficulty in getting tomcat security contraints
to work in Windows Server 2003 using IIS.
I previously tried a setup with Tomcat just by itself and the
configuration to the tomcat-users.xml, web.xml and server.xml files
worked, I could enter in the username and password and access would be
granted. However when I tried to implement this into a Windows Server
2003 environment, the authentication fails.
-----------------------------------------------------------------------------
In server.xml I uncommented the following line,
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-----------------------------------------------------------------------------
In the tomcat-users.xml file I added the following,
<role rolename="webmanuser"/>
<user username="webmanuser" password="thepassword"
roles="webmanuser"/>
-----------------------------------------------------------------------------
Finally in the in applications web.xml file I added the following,
<security-constraint>
<web-resource-collection>
<web-resource-name>Website Name</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>webmanuser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Website Name</realm-name>
</login-config>
-----------------------------------------------------------------------------
A Windows User was created with the following details,
Username: webmanuser
Password: thepass
- User cannot change password.
- Password never expires.
-----------------------------------------------------------------------------
The effect of the above setup when running with IIS is that the
authentication box appears as it should, I type in the username and
password but then the page displays an error saying that the website
cannot be found.
Can someone please help me or point me to a tutorial somewhere?
Many Thanks,
The Bootzman.
I'm having a bit of difficulty in getting tomcat security contraints
to work in Windows Server 2003 using IIS.
I previously tried a setup with Tomcat just by itself and the
configuration to the tomcat-users.xml, web.xml and server.xml files
worked, I could enter in the username and password and access would be
granted. However when I tried to implement this into a Windows Server
2003 environment, the authentication fails.
-----------------------------------------------------------------------------
In server.xml I uncommented the following line,
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-----------------------------------------------------------------------------
In the tomcat-users.xml file I added the following,
<role rolename="webmanuser"/>
<user username="webmanuser" password="thepassword"
roles="webmanuser"/>
-----------------------------------------------------------------------------
Finally in the in applications web.xml file I added the following,
<security-constraint>
<web-resource-collection>
<web-resource-name>Website Name</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>webmanuser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Website Name</realm-name>
</login-config>
-----------------------------------------------------------------------------
A Windows User was created with the following details,
Username: webmanuser
Password: thepass
- User cannot change password.
- Password never expires.
-----------------------------------------------------------------------------
The effect of the above setup when running with IIS is that the
authentication box appears as it should, I type in the username and
password but then the page displays an error saying that the website
cannot be found.
Can someone please help me or point me to a tutorial somewhere?
Many Thanks,
The Bootzman.