tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scw.tom...@nsi-ltd.demon.co.uk
Subject Multiple security-constraint elements
Date Mon, 24 Jul 2006 13:13:28 GMT
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


Mime
View raw message