Fetch configuration when validating SAML issuer and signature#2412
Merged
Conversation
This is already done in the JwtSecurityTokenHandler and the semantics should be similar. This caused a regression in Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler which assumes the token handler will fetch the current configuration as part of the token validation if the ConfigurationManager is a subclass of BaseConfigurationManager. This change makes the SamlSecurityTokenHandler and Saml2SecurityTokenHandler equal to the JwtSecurityTokenHandler with regards to fetching the configuration before validation.
Author
|
@microsoft-github-policy-service agree company="Frende" |
added 2 commits
November 22, 2023 07:25
Refactor PopulateValidationParametersWithCurrentConfigurationAsync null check to guard with an early return. Rename cloned variable to make code easier to read.
Refactor PopulateValidationParametersWithCurrentConfigurationAsync null check to guard with an early return. Rename cloned variable to make code easier to read.
Author
|
@microsoft-github-policy-service agree company="Frende" |
Author
|
Do you need anything more from me on this issue? |
Contributor
|
@Hakon will you be continuing work on this PR? Please see above comments from @brentschmaltz thank you. |
Author
|
I will, it's just a bit busy period for me. If someone else want to continue this work I'm open to share :) |
added 2 commits
February 26, 2024 08:41
… a shared utility class
Issuer set, Key set, Issuer and key set and nothing set
1 task
Author
|
I implemented the changes mentioned, could you take another look? |
brentschmaltz
approved these changes
Mar 13, 2024
This was referenced Mar 18, 2024
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.

Fetch configuration when validating SAML issuer and signature
Fetch configuration on token validation for SAML in the same way as JwtSecurityTokenHandler
Description
This is already done in the JwtSecurityTokenHandler and the semantics should be similar.
This caused a regression in Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler which assumes the token handler will fetch the current configuration as part of the token validation if the ConfigurationManager is a subclass of BaseConfigurationManager.
This change makes the SamlSecurityTokenHandler and Saml2SecurityTokenHandler semantics equal to the JwtSecurityTokenHandler with regards to fetching the configuration before validation.
This discrepancy allowed the following bug to appear in Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler.
Fixes #2406