jakartaee / jakartaee/rest

Enable SecurityContext to handle composite principals

Open
#417 3 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

Injectable SecurityContext only naturally supports authentication schemes with a single principal.

However, OAuth and similar, delegation-oriented, authentication schemes have more than one principal. For example, OAuth has client and resource owner.

When writing filters for these schemes, one has to work around SecurityContext - in fact, the only way to make the second principal available to a resource class is by creating a specialized Principal and casting to that in the resource class - relying on the filter chain to have set an appropriate SecurityContext instance.

Discussion on how to do this is probably best done on the list.

Priority explanation: I put the priority to "major" because it currently negatively affects work I do on general filters in the delegated authorization space. I think this is a major area of JAX-RS to operate in - hence I am reluctant to set it to "minor".
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.