Validate Audience for SAML2TokenHandler with New Model#2863
Merged
brentschmaltz merged 18 commits intodevfrom Oct 14, 2024
Merged
Validate Audience for SAML2TokenHandler with New Model#2863brentschmaltz merged 18 commits intodevfrom
brentschmaltz merged 18 commits intodevfrom
Conversation
iNinja
reviewed
Oct 2, 2024
...tyModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.ValidateTokenAsyncTests.Audience.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.IdentityModel.Tokens.Saml.Tests/SkipValidationDelegates.cs
Outdated
Show resolved
Hide resolved
…ML' of https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet into francofung/NewModelValidateAudienceRegressionTestsForSAML
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...icrosoft.IdentityModel.Tokens.Saml/Saml2/Saml2SecurityTokenHandler.ValidateToken.Internal.cs
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...tyModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.ValidateTokenAsyncTests.Audience.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...tyModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.ValidateTokenAsyncTests.Audience.cs
Outdated
Show resolved
Hide resolved
jennyf19
reviewed
Oct 7, 2024
...tityModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.ValidateTokenAsyncTests.Common.cs
Outdated
Show resolved
Hide resolved
Contributor
|
I haven't done a compare yet, but are these regression tests following the same model as the ones from @iNinja for JWT? |
Contributor
Author
For the most part except if we have a SAML specific case that show up when validating an audience but, so far it was only dealing with TokenValidationParameters.RequireAudience on the new path. We decided to remove it this morning. Update: Simplified the tests in This PR to only account for the comparison between the new and old call graphs to work as expected. |
This was referenced Dec 8, 2025
This was referenced Jan 21, 2026
This was referenced Feb 9, 2026
Closed
This was referenced Feb 16, 2026
Closed
Closed
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.
Validate Audience for SAML2TokenHandler with New Model
Description
In order to build the new ValidateTokenAsync method for SAML2TokenHandler we will be taking an integration test approach to validate that both old and new paths function equally while constructing the new methods along the way. This PR validates only cases applicable to audience validation that exists in both JsonWebTokenHandler and Saml2SecurityTokenhandler, a separate PR will be done for Saml2SecurityTokenhandler specific tests.
Follow-up issue for additional testing: #2875