How can I configure JBoss EAP to map one role to another role and define the mapping in the application?
Issue
-
How can I configure JBoss EAP to map one role to another role and define the mapping in the application?
-
In our company it is possible for different applications to define the same application role name and map different "physical names" to it. This would lead to problems when these applications are deployed on the same JBoss instance and the mapping is done in a server properties file. That's the reason why we would like to keep the mapping within the application.
-
What I need is an indirection when using roles in my application. I need a way to map the role names from my service to the role names used in my application (in @RolesAllowed annocations or in java code like sessionContext.isCallerInRole("...."). And this way must be a way on application base, on server base (like the RoleMappingLoginModule does not suit my requirements).
Orrolecould be specified inweb.xmlfile like below .(It means the authenticated user should have roleRoleMappedTofor authorization)
<security-role>
<role-name>RoleMappedTo</role-name>
</security-role>
Environment
- Red Hat JBoss Enterprise Application Platform
- 6.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
