Show Table of Contents
12.3.3. EJB Security Annotations
12.3.3.1. About EJB Security Annotations
EJBs use security annotations to pass information about security to the deployer. These include:
- @DeclareRoles
- Declares which roles are available.
- @SecurityDomain
- Specifies the security domain to use for the EJB. If the EJB is annotated for authorization with
@RolesAllowed, authorization will only apply if the EJB is annotated with a security domain. - @RolesAllowed, @PermitAll, @DenyAll
- Specifies which method permissions are allowed. For information about method permissions, refer to Section 12.3.2.1, “About EJB Method Permissions”.
- @RolesAllowed, @PermitAll, @DenyAll
- Specifies which method permissions are allowed. For information about method permissions, refer to Section 12.3.2.1, “About EJB Method Permissions”.
- @RunAs
- Configures the propagated security identify of a component.
For more information, refer to Section 12.3.3.2, “Use EJB Security Annotations”.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.