Adding users and groups to roles using an assembly tool

 

Before you begin

Before you perform this task, you should have already completed the steps in Securing Web applications using an assembly tool and Securing enterprise bean applications where you created new roles and assigned those roles to EJB and Web resources. Complete these steps during application installation. This is because the environment (user registry) under which the application is running is not known until deployment.

 

Overview

If you already know the environment in which the application is running and the user registry that is used, then use an assembly tool to assign users and groups to roles. It is recommended that you use the administrative console to assign users and groups to roles.

 

Procedure

  1. In the Project Explorer view of an assembly tool, right-click an enterprise application project (EAR file) and click Open With > Deployment Descriptor Editor. An application deployment descriptor editor opens on the EAR file. To access information about the editor, press F1 and click Application deployment descriptor editor.

  2. Click the Security tab and, under the main pane, click Add.

  3. In the Add Security Role wizard, name and describe the security role. Then click Finish.

  4. Under WebSphere Bindings, select the user or group extension properties for the security role. Available values include: Everyone, All authenticated users, and Users/Groups.

  5. If you selected Users/Groups, click Add beside the Users or Groups panes. In the wizard that opens, specify a user or group name and click Finish. Repeat this step until you have added all users and groups to which the security role applies.

  6. Close the application deployment descriptor editor and, when prompted, click Yes to save the changes.

 

Result

The ibm-application-bnd.xmi file in the application contains the users and groups to roles mapping table (authorization table).

 

What to do next

After securing an application, install the application using the administrative console.


 

See Also


Web component security
Role-based authorization

 

Related Tasks


Assembling applications

 

See Also


Security: Resources for learning