How can Seam be configured to use different security-constraints for different web-resource-collections?
In web.xml
I included a sections like
<security-constraint>
<web-resource-collection>
<web-resource-name>AdminPages</web-resource-name>
<url-pattern>/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>admin</role-name>
</security-role>
If I omit the configuration above (web.xml). The user is authenticated (only password) using JAAS. I would prefer not write code for Authenticatin, I really only need to check that the user has the required role (admin).
In Seam this doesn't work like expected. I receive HTTP-Errorcode 403 while trying to access the pages in /secure/*
I configured in components.xml
This works when web.xml is not changed.
<security:identity jaas-config-name="admins" />
And jboss-web.xml
<jboss-web>
<security-domain>java:/jaas/admins</security-domain>
</jboss-web>
The question is where do I configure the role.