Default to S256 code challenge if not specified in authorization server metadata #992
+62
−58
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.
code_challenge_methods_supported
is not present in AS metadataMotivation and Context
This change makes metadata validation slightly more flexible by assuming S256 is supported as a code challenge method if the
code_challenge_methods_supported
field is not provided in AS metadata. This is the case for both Azure AD and Cognito, despite both supporting it.This is caused by a point of ambiguity in RFC 8414 in which OIDC metadata is supported as valid OAuth metadata, but existing OIDC-specific clients (with strict validation) do not understand the union of OAuth and OIDC metadata and will reject it. This poses challenges for integration with OIDC authorization servers that cannot trivially add support for this on existing metadata documents, but nevertheless support S256 in practice.
If
code_challenge_methods_supported
is present, validation happens in the same manner as today, rejecting documents that do not declare support for S256.How Has This Been Tested?
Adjusted unit tests and validated against a custom server using
simpleOAuthClient
.Breaking Changes
None.
Types of changes
Checklist
Additional context
#832