tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L" <barry.l.pro...@citigroup.com>
Subject RE: Multiple security-constraint elements
Date Mon, 24 Jul 2006 19:28:26 GMT
Steve,

I looked at mine and that looks correct. Try commenting one of the constraints, restart Tomcat
and test it.

But I do recall, I had a little bit of problem with mine working, and it turned out, after
I rebooted my entire box (I run Win2K), all the constraints seemed to work,

-----Original Message-----
From: scw.tomcat@nsi-ltd.demon.co.uk
[mailto:scw.tomcat@nsi-ltd.demon.co.uk]
Sent: Monday, July 24, 2006 8:13 AM
To: users@tomcat.apache.org
Subject: Multiple security-constraint elements


I am trying to set up restricted access to several folders within the =
same engine context.

I have a web.xml file within the WEB-INF folder, and can get a single =
security constraint to work OK.  When I try and set up a second one, =
nothing happens, and the second constraint is never respected.

The current web.xml is pasted below.
    <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD =
WebApplication 2.3//EN"

    "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>

    <security-constraint>

    <display-name>Login for Admin Privileges</display-name>

    <web-resource-collection>

    <web-resource-name>Admin Group Access</web-resource-name>

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

    </web-resource-collection>

    <auth-constraint>

    <role-name>admin</role-name>

    </auth-constraint>

    </security-constraint>

    <security-constraint>

    <display-name>Login for Family CUG</display-name>

    <web-resource-collection>

    <web-resource-name>Diane's Poetry Data</web-resource-name>

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

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

    </web-resource-collection>

    <auth-constraint>

    <role-name>family</role-name>

    </auth-constraint>

    </security-constraint>

    <login-config>

    <auth-method>BASIC</auth-method>

    <realm-name>Restricted Access</realm-name>

    </login-config>

    <security-role>

    <description>This role includes all members permitted to perform =
admin tasks</description>

    <role-name>admin</role-name>

    </security-role>

    <security-role>

    <description>This role describes CUG of family members</description>

    <role-name>family</role-name>

    </security-role>

    </web-app>

Any suggestions, please...

Steve



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


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


Mime
View raw message