POC: Synchronous result-based validation fast path for issuer (#3459)#3538
Open
debchoudhury-id4s wants to merge 1 commit into
Open
POC: Synchronous result-based validation fast path for issuer (#3459)#3538debchoudhury-id4s wants to merge 1 commit into
debchoudhury-id4s wants to merge 1 commit into
Conversation
Contributor
|
I think this is related to my intern project. I'm also working on making a synchronous result-based validation method |
debchoudhury-id4s
force-pushed
the
debchoudhury/sync-validation
branch
2 times, most recently
from
July 9, 2026 18:51
572bed6 to
3d01ac6
Compare
Contributor
Author
|
perf results are in Perf Comparison synchronous validation POC.docx. TL;DR the POC is safe to be merged (not saying we should NOW). Check section 2 which does a sync vs async comparison showing how the POC reduces latency and improves perf |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
debchoudhury-id4s
force-pushed
the
debchoudhury/sync-validation
branch
from
July 20, 2026 00:11
3d01ac6 to
6f04adb
Compare
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.
Overview
Adds a synchronous validation path to the experimental model, scoped to the issuer check (#3459). When the configuration is already cached (or no
ConfigurationManageris set), validation runs without the per-callTaskand configuration awaits. The shippedTokenValidationParameterspath and the async path are unchanged.The goal is to keep this as a POC and capture benchmarking results comparing the synchronous and asynchronous paths.
Changes
BaseConfigurationManager.TryGetCurrentConfiguration(out BaseConfiguration?)— synchronous config peek; base returnsfalse,ConfigurationManager<T>overrides it and reuses the async fast-path predicate so the two can't drift.ISynchronousIssuerValidator+Validators.ValidateIssuer/ValidateIssuerInternal— synchronous issuer validation on the peeked config, implemented byDefaultIssuerValidator.JsonWebTokenHandler.ValidateToken(...)+ privateValidateJWS/ValidateJWE— synchronous pipeline; runs sync on a cache hit, otherwise falls back toValidateTokenAsync. Records last-known-good on success.PublicAPI.Unshipped.txt,CHANGELOG.md, andValidateTokenSyncTests(sync vs async golden master, including a cache-hit case).Validation
Build clean (0 warnings, 0 errors) on all target frameworks.
Microsoft.IdentityModel.Tokens.Tests,Microsoft.IdentityModel.JsonWebTokens.Tests, andMicrosoft.IdentityModel.Protocols.Testspass.