Our current application uses JSF/JPA technology and is deployed on Weblogic 12.1.2 and does the following:
- Authenticates a user through an IDP
 - The IDP after authenticating the user sends back the Groups the user belong to
 - Using Web.xml and WebLogic.xml we map the Groups to Roles
 
Our Application Scoped roles are very granular and it helps us do the following:
- Hide UI pages or components on UI
 - use RolesAllowed annotation on methods
 
Since Group to Role mapping is in Weblogic.xml, our application users can't change the groups to roles mapping and this is the problem that I have to solve.
My goal is to do the following:
- Authenticate a user through our IDP
 - The IDP will send us the Groups user belongs to
 - Define the roles in web.xml
 - Define tables that our application will read to find Group to Role mapping
 - Use Weblogic API to do Group to Role Mapping
 - Create a UI to allow our users to change the Group to Role mapping
 
The problem that i am running into is that i can't find how to do Group to Role Mapping dynamically using WebLogic since i can't get access to WebLogic API that will allow me to change Group to Role mapping in my deployed application. Has anyone done this before?
I have looked at creating a custom Role mapper but i am not sure how to get the handle to this custom Role Mapper in our deployed application.