jakartaee / jakartaee/common-annotations-api

Standardize the concept of permissions annotation for JAX-RS resources

Open
#126 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
67
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Quarkus allows you to use the concept of permissions to protect a JAX-RS resource.
Example of how to define security policy for a web resource via permissions:
https://quarkus.io/guides/security-authorize-web-endpoints-reference#permission-annotation

This is another philosophy different from the concept of Role (cf. `jakarta.annotation.security.RolesAllowed`).
This principle, based on permissions, is very useful for certain use cases.

Typically, this makes it possible to dissociate the roles from possible uses, and therefore to make the configuration of what a role has the right to do more flexible.
Very interesting thing, this allows, by simple configuration (via properties), to authorize a role on certain actions for specific resource, without needing to change the source code.

This is like the concept of standard permission in Java (see https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html)

This concept, proposed by Quarkus, would be really interesting to be standardized in order to allow several implementations to exist.

Proposal of the PermissionsAllowed annotation to standardize (with `jakarta.annotation.security.PermissionsAllowed`):
https://github.com/quarkusio/quarkus-security/blob/main/src/main/java/io/quarkus/security/PermissionsAllowed.java

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked Quarkus PermissionsAllowed annotation and the Jakarta Security and Java permissions references. The issue names no implementation files or tests; progress would require defining and agreeing on a standard PermissionsAllowed annotation and its behavior before implementation can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.