Skip to content

test(server): cover client_credentials and the CIBA token request at the mTLS alias - #1004

Merged
osanderson merged 3 commits into
mainfrom
test/dpop-alias-route-cc-ciba
Nov 27, 2026
Merged

osanderson merged 3 commits into
mainfrom
test/dpop-alias-route-cc-ciba

Conversation

@osanderson

Copy link
Copy Markdown
Collaborator

This adds local tests for the two DPoP call sites that #1002 left to conformance: the client_credentials grant 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 with self_signed_tls_client_auth and request DPoP-bound tokens. The CIBA test runs a full poll flow to an approved request first.

Route Proof for Expected
MTLSEndpointAlias the alias URL accepted, token_type DPoP, the access token's cnf.jkt is the proof key's
none the alias URL 400 invalid_dpop_proof
none the primary URL accepted
MTLSEndpointAlias the primary URL refused, invalid_dpop_proof
PrimaryEndpoint the primary URL accepted

Mutants: two new ones, server-client-credentials-passes-route and server-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

osanderson and others added 3 commits November 27, 2026 09:25
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

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@osanderson
osanderson merged commit 3d174ef into main Nov 27, 2026
32 checks passed
@osanderson
osanderson deleted the test/dpop-alias-route-cc-ciba branch November 27, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant