Add users and groups to roles using the Assembly Toolkit

Before you perform this task, have already completed the steps in the Securing Webapplications and Securing EJB applications articles 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. If you already know the environment in which the application is running and the user registry that is used, then you can use the Assembly Toolkit to assign users and groups to roles. Using the administrative console to assign users and groups to roles is recommended.

  1. In the J2EE Hierarchy view of the Assembly Toolkit, 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.

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

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

 

See Also

Web component security
Security: Resources for learning