Add a security identity (method level)

 

+
Search Tips   |   Advanced Search

 

Security identities on the method-level are used when another bean calls that method. The security identity specified for the method is then used. The identity can be set to use the identity of the caller, the identity of the EJB server, or the identity of a specific security role.

Method-level security identities are valid for both EJB 1.1 and EJB 2.0 enterprise beans in either EJB 1.1 or 2.0 projects.

To add a security identity (method level) to an enterprise bean:

  1. Switch to...

    J2EE perspective | Project Explorer | EJB module. | Open With | Deployment Descriptor Editor | Access page | Security Identity | Add

  2. The Add Security Identity wizard appears.

  3. Select a run as mode from the following choices:

    Use identity of caller With this option, the security service makes no changes to the principal's credential settings.
    Use identity of EJB server With this option, the security service alters the principal's credential settings to match the credential settings associated with the EJB server.
    Use identity assigned to specific role With this option, a principal that has been assigned to the specified security role is used for the execution of the bean's methods. This association is part of the application binding in which the role is associated with a user ID and password of a user who is granted that role.

  4. If you selected Use identity assigned to specific role above, select a role name and role description.

  5. Type a description for the new identity in the Security identity description field.

  6. Click Next.

  7. Select one or more enterprise beans from the list of beans found, then click Next.

  8. Select one or more of the method elements for the security identity.

  9. Click Finish.

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