users@glassfish.java.net

Problem with JAAS security constraint (form-login-config)

From: <forums_at_java.net>
Date: Sat, 7 May 2011 09:49:31 -0500 (CDT)

Hi there,

 

I feel currently a little bit lost to get an authentication mechanism with a
JASS Context introduced.

Situation:

 

I have a web app that demands to get secured with 2 form-based logins on 2
different resources

the main root (/mycontextroot) and as well the web administration. (/wa)

 

so far the authentication works great on the /wa but on a successful
authentication it redirects to the

main context root for some reason and I have no clue at all why.

 

after having successful authenticated on the /wa it shall redirect to
something like /wa/runup/index.jsp,

but it falls back to /mycontextroot/index.jsp.

 

Please find below my security constraint from web.xml accordingly.

thanks for help & advise that I really much appreciate!

 

web.xml config:

<display-name>wa</display-name>
       <servlet>
        <servlet-name>index</servlet-name>       
        <jsp-file>/wa/runup/index.jsp</jsp-file>
      </servlet>
    <security-constraint>
             <display-name>wa</display-name>
            <web-resource-collection>
                  <web-resource-name>wa</web-resource-name>
                 <url-pattern>/wa/pages/*</url-pattern>
                 <url-pattern>/wa/mod/*</url-pattern>
         </web-resource-collection>
            <auth-constraint>
                  <role-name>WebAdminAccess</role-name>
            </auth-constraint>
            <user-data-constraint>
               
<transport-guarantee>NONE</transport-guarantee>
            </user-data-constraint>
       </security-constraint>
      <login-config>
            <auth-method>FORM</auth-method>
         <form-login-config>
                 
<form-login-page>/wa/login.jsp/</form-login-page>
                
<form-error-page>/wa/login.jsp?etype=str</form-error-page>                
          </form-login-config>
     </login-config>
     <security-role>
        <role-name>WebAdminAccess</role-name>
    </security-role>

 

 

 


--
[Message sent by forum member 'seagate']
View Post: http://forums.java.net/node/799456