Creating Application Roles for Web Access
Use
You create a J2EE role and map it to an existing UME role on the AS Java to protect Web access to your application. Only users and/or groups of users who have the UME role assigned to them can access the application.
Procedure
To create the J2EE role for an application, proceed as follows:
-
Open the web.xml file.
-
Create the role as shown below:
<security-role> <role-name>MyApplicationRole</role-name> </security-role> -
Save the file.
To map the J2EE role to a UME role, proceed as follows:
-
Open the web-j2ee-engine.xml deployment descriptor file.
-
Map the roles as shown below:
<security-role-map> <role-name>MyApplicationRole</role-name> <server-role-name>ApplicationUsers</server-role-name> </security-role-map> -
Save the file.
Result
After you deploy the application, the system assigns the J2EE role to the UME role which you specified in the deployment descriptor.