Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JBoss4 Problem using JAAS  RSS feed

 
Rogel Garcia
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've made an app using JAAS, made my own Login Module, and set some security constrainst in web.xml..

web.xml..

...
<security-constraint>
<web-resource-collection>
<web-resource-name>Sample</web-resource-name>
<url-pattern>/login/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

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

<login-config>
<auth-method>FORM</auth-method>
<realm-name>Sample</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>

when i try to access a page like login/ok.jsp, i get a login page and after submit i get the right page (login/ok.jsp)... This is working
But when i call request.isUserInRole("admin") i got false (after succesfully login).

In Jboss 3.2.5 this works perfectly (request.isUserInRole("admin")==true)... Does anyone knows what is happening?

Thanks
 
Rogel Garcia
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was a bug in jboss 4...
the patch can be found here

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!