jakartaee / jakartaee/rest

Specify mapping of AccessLocalException for EJBs with @RolesAllowed

Open
#32 5 comments 0 reactions 1 assignee View on GitHub

@glassfishrobot is already working on this.

Since Feb 10, 2018.

Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

When @RolesAllowed is declared on an session bean that is also a resource class
and then the EJB may throw a AccessLocalException if the client is not authorized.

JAX-RS implementations should map this AccessLocalException to a 401 response.

Applications will of course need to correctly set up credentials and the sharing
of those between the web and ejb containers.

It remains an open issue how a JAX-RS implementation can obtain information to
return a WWW-Authenticate response header.

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[2.1]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.