fix(client): apply every mTLS endpoint alias, whatever the reason for mutual TLS - #552
Merged
Merged
Conversation
… mutual TLS RFC 8705 §5: a client "intending to do mutual TLS (for OAuth client authentication and/or to acquire or use certificate-bound tokens) when making a request directly to the authorization server MUST use the alias URL of the endpoint", wherever the server advertises one. MTLSEndpoints split the aliases by purpose instead. ApplyForClientAuth moved Token, PAR and revocation, but not the CIBA backchannel authentication endpoint, where CIBA Core §7.1 requires the client to authenticate with its registered method, so a certificate-authenticated CIBA client sent its request to the plain endpoint. ApplyForSenderConstrain moved Token, CIBA and revocation, but not PAR. Both now apply every advertised alias (Token, PAR, backchannel authentication and revocation), the same way; Authorization, which the user agent calls, is never aliased. Callers keep calling whichever they did; a client doing both needs one call. The mTLS guide and the conformance client's comment say so. 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.



Summary
What RFC 8705 §5 requires. A client "intending to do mutual TLS (for OAuth client authentication and/or to acquire or use certificate-bound tokens) when making a request directly to the authorization server MUST use the alias URL of the endpoint within the
mtls_endpoint_aliases, when present."client.MTLSEndpointssplit the aliases by purpose instead, and each helper missed one endpoint:ApplyForClientAuthApplyForSenderConstrainThe fix:
This follows #550, which fixed the revocation case of the same split.
Verification
go vet, the full test suite, golangci-lint, the conformance client's build and the payroll-run demo's build are all clean.🤖 Generated with Claude Code