Difference Between OIDC and Keycloak Authorization Services, Role Management, and Token Propagation #45782
Replies: 4 comments 4 replies
-
/cc @pedroigor (keycloak,oidc), @sberyozkin (keycloak,oidc) |
Beta Was this translation helpful? Give feedback.
-
@Michele971 Here are some answers,
No, one should use them only if the authorization decisions are made by Keycloak Authorization Services, as opposed to by the role-based access control
keycloak-authorization is not required. As far as token propagation is concerned. To propagate the already existing tokens, you need to use the token propagation feature.
It is an application level decision how roles are associated with the identity, you can rely on roles being in the token or in the DB if you'd like (that would require an addition security augmentation), or indeed, in Keycloak authorization services. FYI, if you work with bearer access tokens then the access token is the only source of roles, so you can drop that config property. HTH |
Beta Was this translation helpful? Give feedback.
-
@Michele971 For your scenario, you need to use
I don't know, probably when you run it directly with docker some other users/properties are used in Keycloak realms |
Beta Was this translation helpful? Give feedback.
-
I followed this tutorial:RestClientWithOidcClientFilter, which uses an OIDC client filter provided by the quarkus-rest-client-oidc-filter extension to get and propagate an access token thanks again! |
Beta Was this translation helpful? Give feedback.
-
I’m using Keycloak for user authentication and role management in a microservices architecture with Quarkus. Here’s what I aim to achieve:
Questions:
Keycloak Auth dependency
Do I also need Keycloak Authorization Services dependency?
Concerning "role-management", based on my understanding, OIDC alone should suffice for this.
Are Keycloak Authorization Services necessary if I don’t need resource-based policies or granular permissions but only want to manage user roles? I believe no
Token propagation between microservices:
My goal is to propagate the token from one microservice to another, ensuring the token remains intact and valid (they interact using rest client).
Do I need the keycloak-authorization dependency, or is using the OidcClientFilter strategy sufficient?
My Configuration (.properties)
OIDC
For OIDC in Quarkus, I’ve configured the following:
Token propagation
For token propagation in a REST client, I use the OidcClientFilter strategy with the following settings:
Is the quarkus.oidc.roles.source=accesstoken configuration sufficient for managing roles, or is there a better approach?
Are Keycloak Authorization Services overkill for my use case if I’m only relying on roles included in the token?
Does the OidcClientFilter approach correctly propagate the token, or do I need additional configuration to secure inter-service communication?
Beta Was this translation helpful? Give feedback.
All reactions