Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize the concept of permissions annotation for JAX-RS resources #126

Open
jycr opened this issue Jan 9, 2024 · 1 comment
Open

Comments

@jycr
Copy link

jycr commented Jan 9, 2024

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

@jycr
Copy link
Author

jycr commented Apr 24, 2024

any news or feedbacks for this proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant