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:

  1. Open the web.xml file.

  2. Create the role as shown below:

                      <security-role>
                      <role-name>MyApplicationRole</role-name>
                      </security-role>
                   
  3. Save the file.

To map the J2EE role to a UME role, proceed as follows:

  1. Open the web-j2ee-engine.xml deployment descriptor file.

  2. Map the roles as shown below:

                      <security-role-map>
                      <role-name>MyApplicationRole</role-name>
                      <server-role-name>ApplicationUsers</server-role-name>
                      </security-role-map>
                   
  3. 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.