Repository navigation
Conversation
…n endpoint Registers a client_credentials client with revocation checking on and the CRL served through the FusionCache-backed CertificateDownloadCache, then publishes a new CRL that revokes the client certificate. Two cases: - the cached CRL reaches its nextUpdate, the next token request downloads the new CRL and the client gets invalid_client; - the cached CRL is evicted with RemoveCrlAsync, and the very next token request is rejected without waiting for nextUpdate. The test PKI (root CA, client certificate, CRLs) is built in memory. Closes #963 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JoeShook
force-pushed
the
test/963-revoked-after-registration
branch
from
November 22, 2026 14:28
4893408 to
ab45550
Compare
This branch has not been deployed
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.
What changed
Adds
_tests/UdapServer.Tests/Conformance/Basic/RevokedAfterRegistrationTests.cs(test-only, no library changes).The tests run on
UdapAuthServerPipelinewith revocation checking turned on. The shared pipeline turns it off. CRLs are downloaded through the real FusionCache-backedCertificateDownloadCache, using an in-memoryHttpMessageHandlerthat serves the current CRL and counts downloads. The test PKI (root CA, client certificate with URI SAN + CRL DP, CRLs) is built in memory withCertificateRequest/CertificateRevocationListBuilder, so it doesn't depend on the PKI generator's output.ClientCredentials_Token_Rejected_After_Revocation_Once_Cached_Crl_Expires: the client registers while CRL Develop #1 (5 s nextUpdate) is published, and its token request succeeds using the cached CRL (1 download). The CA then publishes CRL Bump FluentAssertions from 6.7.0 to 6.8.0 #2 revoking the client. Once CRL Develop #1's nextUpdate passes, the nextclient_credentialsrequest downloads CRL Bump FluentAssertions from 6.7.0 to 6.8.0 #2 and is rejected withinvalid_client/Certificate chain validation failed(2 downloads). This covers the CRL cache expiry path. It waits about 5 s.ClientCredentials_Token_Rejected_After_Revocation_When_Cached_Crl_Is_Evicted: same setup with a long-lived CRL Develop #1. After revocation the cached CRL is still used (token still issued). AfterICertificateDownloadCache.RemoveCrlAsync, the very next request is rejected.Result
The server already rejects the revoked client:
UdapJwtSecretValidatorre-runsTrustChainValidator(CRL included) on every token request. No server change was needed.How it was tested
dotnet test _tests/Udap.PKI.Generator: 17 passed, 10 skippeddotnet test _tests/UdapServer.Tests: 395 passed, 0 failed, 3 skipped (includes the 2 new tests)Open questions
Assertto match the rest ofUdapServer.Tests, which doesn't reference Shouldly.Closes #963
🤖 Generated with Claude Code