web.xml authentication issues
psalvadori Feb 6, 2006 10:50 AMHi all,
(JBossPortal2.2 - JBoss-4.0.3SP1)
I have a boring problem since some days and I don't know how to solve it. The goal I want to reach is to have multiple instances of portal and every one must have his own authentication. My actual situation is that, if I log-in in one of my portal instances and after I open another instance I'm recognized as logged in new instance too. It is no good for me. I also need to have different login and error pages for every portal instance but what i wrote in web.xml of my portal instances is ignored every time and both login and error page are the same for every portal instance.
my config files are:
myportal/WEB-INF/web.xml
... <security-constraint> <web-resource-collection> <web-resource-name>res-name</web-resource-name> <description></description> <url-pattern>/auth/portal/MyPortal/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>MyRole</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/mylogin.jsp</form-login-page> <form-error-page>/myerror.jsp</form-error-page> </form-login-config> </login-config> ...
myportal/WEB-INF/jboss-web.xml
<?xml version="1.0"?> <jboss-web> <security-domain>java:jaas/myportal</security-domain> </jboss-web>
myportal/WEB-INF/login.config.xml
<policy> <application-policy name="myportal"> <authentication> <login-module code="mypackage.MyModelLoginModule" flag="required"> <module-option name="unauthenticatedIdentity">guest</module-option> <module-option name="hashAlgorithm">MD5</module-option> <module-option name="hashEncoding">HEX</module-option> <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option> <module-option name="additionalRole">Authenticated</module-option> <module-option name="password-stacking">useFirstPass</module-option> </login-module> </authentication> </application-policy> </policy>
I hope someone can help me.
Thanks in advance,
Paolo.