About this task
Step 4 towards the goal:
Implementing secure JAX-RS applications
Procedure
Using the security services available to the web container,
you can secure REST resources by configuring security mechanisms that
define user authentication, transport security, authorization control,
and user to role mappings.