Adding a security identity (bean level)

Assigning a security identity to a bean is useful when another bean calls that bean. The security identity can be set to use the identity of the caller or the identity of a specific security role.

About this task

Bean-level security identity was introduced in the EJB 2.0 specification. It was not a part of the EJB 1.1 specification.

Procedure

  1. In the Enterprise Explorer view of the Java™ EE perspective, right-click the deployment descriptor for your EJB project and select Open With > Deployment Descriptor Editor to open the deployment descriptor editor.
  2. On the Access page of the editor, click Add in the Security Identity (Bean Level) section.
  3. Select one of the following options:
    • Use identity of caller
    • Use identity of specific role (below)
  4. If you selected Use identity of specific role (below), complete the following steps:
    1. In the Role name drop-down list, select the existing security role that you want to enforce for this bean-level security identity.
    2. In the Role description field, enter a description for the role.
  5. Type a description for the security identity and click Next.
  6. Select one or more enterprise beans from the list of beans found.
  7. Click Finish.

Results

The security identity is added. To remove the security identity, select it and click Remove.

Feedback