|
Mailing Lists
|
Home /
Groups /
JRun-Talk
JAAS security and web xml question
Author: Douglas Knudsen
Short Link: http://www.houseoffusion.com/groups/jrun-talk/thread.cfm/threadid:2218#5743
How to secure all of /? I'm trying to add a securtiy constraint to /
using FORM auth. I createed /login/loginform.htm. I want to secure
/. Does the form listed in the web.xml section of forn-loginpage get
an exeption automagically from a security constraint on /? Doesn't
seem so, so I have the below setup in my web.xml file. Is this the
correct approach to secure everything under / except /login?
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Page Test</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Default</role-name>
<role-name>RRT Admin</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Page Test</web-resource-name>
<url-pattern>/login/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description></description>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login/index.htm</form-login-page>
</form-login-config>
</login-config>
<security-role>
<role-name>Default</role-name>
<role-name>RRT Admin</role-name>
</security-role>
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
|
February 11, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||