-
Anyone see this when trying to use Quarkus verified JWT tokens that don't have claims in the accessToken but in the idToken? (some parts replace w/ "..." to keep spam bots from scraping my email)
The token looks like this (and can be validated in any JWT token verifier):
application.settings looks like this to try to tell it to use UserInfo:
I think this is a bug (should not throw an exception if the "groups" field is missing from the accessToken) but I'm not sure how to create a repro project because it needs so much setup... |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 12 replies
-
/cc @pedroigor, @sberyozkin |
Beta Was this translation helpful? Give feedback.
-
@kenyee Hi, Is this exception returned from the OIDC provider (is it |
Beta Was this translation helpful? Give feedback.
-
oh..nvm...I'm doing this to myself... I'm checking the claimNames and finding that it's null and throwing that exception :-( |
Beta Was this translation helpful? Give feedback.
-
yep..sorry for the false alarm 😞 Works well..I can use
To grab both tokens now. |
Beta Was this translation helpful? Give feedback.
-
@kenyee Np at all, good you've figured it out. Note if the reason you access user info is because the access token has no claims then you can inject the id token without doing a userinfo call, just add |
Beta Was this translation helpful? Give feedback.
-
sorry..to forgot to mention this is a service. Web UI is React.js so typical SPA usage where the JWT accessToken gets passed into APIs via the Authorization: Bearer header. idToken looks like this:
I'd like to map the TeamCodeHealth_claims field in the idToken (which Quarkus does read from the userinfo properly) into @RolesAllowed but using the claim path doesn't seem to work. Something I find a bit lacking in the docs is a few small examples of how to use the "quarkus.oidc.roles.role-claim-path" FWIW...it mentions a few things you can set it to, but some example where you show how to map the claim path to a field in the accessToken or idToken would be helpful. |
Beta Was this translation helpful? Give feedback.
-
@kenyee Np, so a bearer access token is posted to Quarkus, Id token stays with the SPA, makes sense. But there is a possible hint in this IdToken, you have I agree a few more examples would help, please open an issue and list what you see should be improved |
Beta Was this translation helpful? Give feedback.
-
@kenyee Note you should be able to use OIDC devconsole in devmode to test the endpoint (with Adding swagger-ui would let you test the endpoint with Swagger Ui from OIDC dev console |
Beta Was this translation helpful? Give feedback.
yep..sorry for the false alarm 😞
Works well..I can use
To grab both tokens now.