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

OIDC UserInfo support #10417

Merged
merged 1 commit into from
Jul 8, 2020
Merged

Conversation

sberyozkin
Copy link
Member

Fixes #8719
Fixes #8396

This PR has taken me a long time to complete, here is what it does:

  • Small update to the opaque token processing (Vertx Auth checks scope from the introspection so it is checked in Quarkus too now)
  • UserInfo is retrieved and optionally injected if required, initial UserInfo representation built around JSONP is done
  • Access token retrieved as part of the code flow is now always verified by default - we support injecting it but we don't verify it which is not entirely safe - the docs suggest that it can be disabled if the AT is only meant for the propagation.
  • For the code flow it is now possible to choose where the roles should be extracted from, id token (default), AT (it appears that quite often ID token will not have the roles but AT will), and I do recall a user having to write a custom augmentor to get the roles from UserInfo.

@sberyozkin sberyozkin added this to the 1.7.0 - master milestone Jul 1, 2020
@sberyozkin
Copy link
Member Author

@pedroigor Hi Pedro, thanks, I've missed your approval :-). I'll merge once the build goes green again. We can tweak a few things going forward for sure. Cheers

@sberyozkin
Copy link
Member Author

This is fine, DevMojoIT.testResourcesFromClasspath:802 issue on Win/JDK11. Security Tests are good. But I need to check one more thing

@sberyozkin
Copy link
Member Author

@pedroigor Hi Pedro, had to do a small tweak to get a better coverage of #8396 (there ID token is returned with the opaque access token). roles.source=accesstoken is tested against the JWT access token, in case of the opaque access token Vertx OAuth2TokenImpl.principal() has to be used directly. Opaque access tokens are currently tested for the service applications as it is possible to emulate. Once WireMock is supported well for testing OIDC we can do more tests easily.

@sberyozkin
Copy link
Member Author

Again, looks like the same Dev test is failing, but I'll update the docs about the roles while I'm on this PR..

@sberyozkin
Copy link
Member Author

OK, I've opened #10587 and will start working on it tomorrow, merging this one now

@sberyozkin sberyozkin merged commit 91b6981 into quarkusio:master Jul 8, 2020
@sberyozkin sberyozkin deleted the oidc_user_info branch September 16, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot get roles with oidc on web application OIDC code flow fails when Auth0 returns a binary access token
2 participants