Quarkus OIDC: how to support both end user and service account #30971
-
We have services which uses OIDC to handle the auth.
The challenge is, how to make the two systems work together?
But, to make service account work (there is no user info or idtoken from IdP), config must be
What is the Quarkus way to support the this use case? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
/cc @pedroigor (oidc), @sberyozkin (oidc) |
Beta Was this translation helpful? Give feedback.
-
@jie-huang Hi, sounds like OIDC multi-tenancy can help, https://quarkus.io/guides/security-openid-connect-multitenancy, one tenant definition (default one for ex) for one type of service, and a custom tenant for another type of service, what do you think ? |
Beta Was this translation helpful? Give feedback.
-
@sberyozkin
There are two ways to resolve which tenant it should be.
Which one do you think it is better? |
Beta Was this translation helpful? Give feedback.
-
Though I'm not sure what exactly it is going to save. Can you prototype these endpoints ? Ex if you have 3 JAX-RS endpoints, 2 of them require user info, one - does not, but you have a single OIDC tenant configuration, then as far as OIDC is concerned, when the endpoint requiring no OIDC is invoked, OIDC won't know if UserInfo is only required for 2 other endpoints, all it will know UserInfo injection point exists. |
Beta Was this translation helpful? Give feedback.
Though I'm not sure what exactly it is going to save. Can you prototype these endpoints ? Ex if you have 3 JAX-RS endpoints, 2 of them require user info, one - does not, but you have a single OIDC tenant configuration, then as far as OIDC is concerned, when the endpoint requiring no OIDC is invoked, OIDC won't know if UserInfo is only required for 2 other endpoints, all it will know UserInfo injection point exists.
Mult-tenancy approach is simpler IMHO