You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Karanjkar, Sanjay V (IT)" <Sa...@morganstanley.com> on 2005/03/15 12:18:50 UTC

Problem with BASIC authentication

Hi,
 
I have the following setup:

1. A copied version of Tomcat 4.1.24 on Unix (i.e. I have merely
*copied* the entire tomcat folder from another installed location
instead of installing it)

2. My application WAR file referenced by the following Context in
Server.xml:
        <Context path="/ieg-sc"
docBase="/var/tmp/DEV/install/common/lib/tc.ieg.war" 
reloadable="true" debug="99" privileged="true">
          <ResourceLink name="users"
type="org.apache.catalina.UserDatabase" global="UserDatabase"/>
        </Context>

3. My app's web.xml has the following:
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>My Application</web-resource-name>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>ieg-sc-user</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
  </security-constraint>
  <!-- Define the Login Configuration for this Application -->
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>My Application</realm-name>
  </login-config>
  <security-role>
    <role-name>ieg-sc-user</role-name>
  </security-role>

4. I have defined the user/role in conf/tomcat-users.xml:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="ieg-sc-user"/>
  <user username="userid" password="passwd" roles="ieg-sc-user"/>
</tomcat-users>

When I start tomcat, everything seems to run fine except that I do not
get a login window! I have gone over the setup so many times now, I'm
going mad....Have I missed something? Is it because I've copied the
tomcat binaries instead of installing it? If so, why does authentication
work correctly for the inbuilt Manager application..?

Appreciate if you could help me..

Thanks and regards
Sanjay Karanjkar 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited. 
 

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