11.3.2. Secure a JAX-RS Web Service using Annotations


This topic covers the steps to secure a JAX-RS web service using the supported security annotations

Procedure 11.2. Secure a JAX-RS Web Service using Supported Security Annotations

  1. Enable role-based security. For more information, refer to: Section 11.3.1, “Enable Role-Based Security for a RESTEasy JAX-RS Web Service”
  2. Add security annotations to the JAX-RS web service. RESTEasy supports the following annotations:
    Defines which roles can access the method. All roles should be defined in the web.xml file.
    Allows all roles defined in the web.xml file to access the method.
    Denies all access to the method.