Why is redundant path mapping required when using @PermissionsAllowed with Keycloak UMA? #52708
-
|
Hi everyone, I’m currently integrating Quarkus Keycloak Authorization with UMA, and I’ve run into a pattern that feels like it requires redundant configuration. I’m wondering if I’m missing a specific setting or if this is a limitation of the current integration. The ScenarioI have a JAX-RS resource with a method secured like this: @Path("/hello/permission")
public class MyResource {
@GET
@PermissionsAllowed("server:list")
public String get() {
return "Hello";
}
}The IssueEven with If I remove the URI from the Keycloak Admin Console and the configuration from application.properties, the logs show that the PolicyEnforcer fails to find a configuration for the path and denies the request before the annotation logic is even evaluated: My Questions
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
|
/cc @sberyozkin (keycloak) |
Beta Was this translation helpful? Give feedback.
-
|
Hi @SDAChess, Currently, Keycloak authorization policies can only be set in It may warrant a new enhancement request where, instead of A far as the centralized authorization is concerned, #52233 is next so I'm not sure when we can ourselves prioritize on enhancing the By the way, you can link |
Beta Was this translation helpful? Give feedback.
Hi @SDAChess,
Currently, Keycloak authorization policies can only be set in
application.properties, annotations like@PermissionsAlloweddo not map.@PermissionsAllowedworks on the existing properties of the current identity.It may warrant a new enhancement request where, instead of
quarkus.keycloak.policy-enforcer.paths.1.paths=/hello/permissionone uses an annotation, which can be neat, but it can't be@PermissionsAllowedbut a keycloak authorization specific annotation like@KeycloakAuthorization. Would you be interested in working on the PR ?A far as the centralized authorization is concerned, #52233 is next so I'm not sure when we can ourselves prioritize on enhancing the
quarkus-…