Add JWKS endpoint for one login#2181
Open
stephencdaly wants to merge 3 commits into
Open
Conversation
As part of the omniauth initializer, resolve the public key from the private key and convert it to JWK format. Store this on the application config so that we can retrieve it later when we need to serve it from the JWKS endpoint. Set the JWK kid on the omniauth configuration so it is sent with requests to One Login.
Add a publicly accessible endpoint that returns a JSON Web Key Set (JWKS) to share our public key with GOV.UK One Login.
The kid is used to identify individual keys returned by the JWKS endpoint. As per the documentation for the gem (https://github.com/jwt/ruby-jwt) we can use the standardised JWK thumbprint as the kid for the JWK rather than the legacy custom approach the gem uses by default.
2ff845e to
07a9d12
Compare
Contributor
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2181.submit.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
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.
What problem does this pull request solve?
Trello card: https://trello.com/c/qwLQt9Ur
Add a publicly accessible endpoint that returns a JSON Web Key Set (JWKS) to share our public key with GOV.UK One Login.
I've tested that this works on the dev environment.
Things to consider when reviewing