Implement Google OAuth/OIDC and OneTimeCode#2533
Open
chrisknoll wants to merge 4 commits into
Open
Conversation
Add migration for OTC tales. Change session cleanup to fixedDelay. Added scheduled to OTCService cleanup.
… registration. Communicate authenticated session/jwt with one-time-code. Added article describing the One-Time-Codes. Removed obsolete config settings from application.yaml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the Google authentication via Spring Security Oauth2, and the One Time Code functionality that is needed to relay the JWT token securely to the browser.
We now infer the callback url from the request (instead of making implementors encode a callback URL) which handles reverse proxy using
X-headers, which is handled by Spring. This eliminates a application config variable and a docker environment variable.This also modifies the existing OIDC login flow to generate the OTC code. Once this PR is in place, the UI will need to be updated to implement a client-side route /#otc?code={uuid} that will then call back to the WebAPI
/user/login/otc?code={uuid}that will return the JWT associated with the authenticated user. The OTC works once, and then is revoked, with a TTL of 10 minutes (configurable, by default).