Repository navigation
test(server): cover client_credentials and the CIBA token request at the mTLS alias - #1004
Merged
Merged
Conversation
The client_credentials grant passes the request's endpoint route to the DPoP check, but no local test exercised it at the token endpoint's mTLS alias, so dropping the route would only show in a full conformance run. Add a table test for a certificate-authenticated client with DPoP sender-constraining: a proof for the alias is accepted on a request routed to the alias and refused as invalid_dpop_proof without a route; a proof for the primary URL is accepted without a route (and on the primary route) and refused on the alias route. Accepted requests get a DPoP token whose cnf.jkt is the proof's key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CIBA token request passes the request's endpoint route to the DPoP check, but no local test exercised it at the token endpoint's mTLS alias. Drive a poll-mode flow for a certificate-authenticated client to an approved request, then redeem its auth_req_id under each combination of route and proof URL: a proof for the alias is accepted only on a request routed to the alias, a proof for the primary URL only without a route or on the primary route, and the refusals are invalid_dpop_proof. Accepted requests get a DPoP token whose cnf.jkt is the proof's key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the request's endpoint route at the client_credentials grant's and the CIBA token request's DPoP check, each killed by the new alias-route test for that grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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.



This adds local tests for the two DPoP call sites that #1002 left to conformance: the
client_credentialsgrant and the CIBA token request at the mTLS alias. It changes tests only; nothing on the wire changes.Both tests share one table in
server/dpop_alias_route_grants_test.go. They authenticate withself_signed_tls_client_authand request DPoP-bound tokens. The CIBA test runs a full poll flow to an approved request first.MTLSEndpointAliastoken_typeDPoP, the access token'scnf.jktis the proof key'sinvalid_dpop_proofMTLSEndpointAliasinvalid_dpop_proofPrimaryEndpointMutants: two new ones,
server-client-credentials-passes-routeandserver-ciba-token-passes-route, drop the route at each call site. Both are killed: with the route dropped, only that path's test fails, on its two alias-route cases. No production bug turned up.Checks: the race suite passes, lint is clean, and the mutant static check reports 529 mutants with 0 problems.
🤖 Generated with Claude Code