+

Search Tips   |   Advanced Search

 

Assigning users and groups to roles

 

This topic describes how to assign users and groups to roles if you are using WAS authorization for Java 2 Platform, Enterprise Edition (J2EE) roles. Before you perform this task:

 

Overview

These steps are common for both installing an application and modifying an existing application. If the application contains roles, you see the Security role to user/group mapping link during application installation and also during application management, as a link in the Additional properties section.

 

Procedure

  1. Access the console.

    Type http://localhost:port_number/ibm/console in a Web browser.

  2. Click Applications > Enterprise applications > application .

  3. Under Detail properties, click Security role to user/group mapping. A list of all the roles that belong to this application is displayed. If the roles already have users or All Authentication or Everyone special subjects assigned, they display here.

  4. To assign the special subjects, select either the Everyone or the All Authenticated option for the appropriate roles.

  5. To assign users or groups, select the role. You can select multiple roles at the same time, if the same users or groups are assigned to all the roles.

  6. Click Look up users or Look up groups.

  7. Get the appropriate users and groups from the user registry by completing the Limit and the Search string fields and by clicking Search. The Limit field limits the number of users that are obtained and displayed from the user registry. The pattern is a searchable pattern matching one or more users and groups. For example, user* lists users like user1, user2. A pattern of asterisk (*) indicates all users or groups.

    Use the limit and the search strings cautiously so as not to overwhelm the user registry. When you use large user registries such as LDAP (LDAP) where information on thousands of users and groups resides, a search for a large number of users or groups can make the system slow and can make it fail. When more entries exist than requests for entries, a message displays on top of the panel. You can refine your search until you have the required list.

  8. Select the users and groups to include as members of these roles from the Available field and click >> to add them to the roles.

  9. To remove existing users and groups, select them from the Selected field and click <<. When removing existing users and groups from roles, use caution if those same roles are used as RunAs roles.

    For example, if the user1 user is assigned to the role1 RunAs role and you try to remove the user1 user from the role1 role, the console validation does not delete the user. A user can only be part of a RunAs role if the user is already in a role either directly or indirectly through a group. In this case, the user1 user is in the role1 role. For more information on the validation checks that are performed between RunAs role mapping and user and group mapping to roles, see Assigning users to RunAs roles.

  10. Click OK. If any validation problems exist between the role assignments and the RunAs role assignments, the changes are not committed and an error message that indicates the problem displays at the top of the panel. If a problem exists, make sure that the user in the RunAs role is also a member of the regular role. If the regular role contains a group that contains the user in the RunAs role, make sure that the group is assigned to the role using the console. Follow steps 4 and 5. Avoid using the Application Server Toolkit or any other manual process where the complete name of the group, host name, group name, or distinguished name (DN) is not used.

 

Results

The user and group information is added to the binding file in the application. This information is used later for authorization purposes.

 

What to do next

This task is required to assign users and groups to roles, which enables the correct users and groups to access a secured application. If you are installing an application, complete your installation. After the application is installed and running you can access your resources according to the user and group mapping that you did in this task. If you manage applications and modify the users and groups to role mapping, make sure you save, stop, and restart the application so that the changes become effective. Try accessing the J2EE resources in the application to verify that the changes are effective.

In a distributed environment, when you install WAS with samples, enable security using federated repositories, and start the server1 server with sample applications, the server might create exceptions. However, the server starts successfully. The deployment manager did not create user and group samples when it created the deployment manager profile. To resolve exceptions caused by the samples failing to load, create your own sample users and groups. In the console...

  1. Click Users and Groups > Manage Users.

  2. Create the samples user and the sampadmn group. The samples user is a member of the sampadmn group.

For more assistance, refer to the "Managing users" help topic by clicking More information about this page at the top right of the Manage Users panel.



Adding users and groups to roles using an assembly tool

Mapping users to roles

Look up users and groups settings

Assigning users to RunAs roles

 

Related tasks


Enabling security
Securing applications during assembly and deployment