Append .well-known/openid-configuration to iss claim URL upfront#47
Closed
mikehaas763 wants to merge 3 commits intoDuendeSoftware:mainfrom
Closed
Append .well-known/openid-configuration to iss claim URL upfront#47mikehaas763 wants to merge 3 commits intoDuendeSoftware:mainfrom
mikehaas763 wants to merge 3 commits intoDuendeSoftware:mainfrom
Conversation
… issuer URLs by retrying with discovery document path Co-authored-by: mikehaas763 <2096573+mikehaas763@users.noreply.github.com>
… fallback retries Co-authored-by: mikehaas763 <2096573+mikehaas763@users.noreply.github.com>
Member
|
@wcabus can you look into this? |
Member
|
Had to create another PR #48 to make our actions run, but thanks @mikehaas763 for this fix! |
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.
DISCLOSURE: I had copilot do this for me
When a JWT is pasted, the decoder auto-populates the URI field with the bare
issclaim value and immediately fetches it. This fails with "Error loading JWKs: Failed to fetch" since the issuer URL (e.g.https://demo.duendesoftware.com) isn't a JWKs or discovery endpoint.Instead of adding retry/fallback logic in
fetchJwks(), just append/.well-known/openid-configurationto theissvalue upfront — we know it's an issuer identifier, not a JWKs endpoint.issvalue inattemptSignatureValidation()before passing toloadJwks()appendDiscoveryPath()helper, reused by the existing non-JSON content type retry path