Catalog: exercise identifier identity with trailing-slash data - #3
Open
RobertoIskandarani wants to merge 1 commit into
Open
Catalog: exercise identifier identity with trailing-slash data#3RobertoIskandarani wants to merge 1 commit into
RobertoIskandarani wants to merge 1 commit into
Conversation
RFC 8414 §3.3 and RFC 9728 §3.3 require the advertised issuer/resource to be identical to the configured identifier, and both well-known URLs are formed by pure insertion — but no case data exercised a trailing-slash identifier, so implementations drifted. Extend three existing cases (no new case IDs): - rfc9728-well-known-path-must-derive-from-resource-uri: a resource of "https://api.example.com/mcp/" must derive "/.well-known/oauth-protected-resource/mcp/" (RFC 9728 §3 insertion preserves the path verbatim). - rfc8414-metadata-issuer-must-match-configured-issuer: metadata issuer "https://auth.example.com/" against configured "https://auth.example.com" must reject — equivalent is not identical. - rfc9068-issuer-must-match: a token whose iss carries the configured trailing slash ("https://auth.example.com/") must verify.
RobertoIskandarani
force-pushed
the
rob/identifier-identity-trailing-slash-cases
branch
from
July 28, 2026 20:02
194098d to
58de1cf
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.
What
Extends three existing cases with trailing-slash data — no new case IDs, no restructuring:
rfc9728-well-known-path-must-derive-from-resource-uri— adds"https://api.example.com/mcp/"tosetup.resources, expecting"/.well-known/oauth-protected-resource/mcp/".rfc8414-metadata-issuer-must-match-configured-issuer— adds a variant: configuredhttps://auth.example.com, metadata issuerhttps://auth.example.com/→ reject. The metadata document is otherwise valid, so the rejection can only come from the issuer comparison.rfc9068-issuer-must-match— adds a variant: configured issuerhttps://auth.example.com/, tokenisshttps://auth.example.com/→ accept.The two issuer variants use a
variants:list undersetupwith a per-itemexpected_outcome, following the shapeerror_scenariosalready uses inrfc6750-error-response-must-map-error-codes.Why
RFC 9728 §3 and RFC 8414 §3 form the well-known URL by inserting the well-known path segment between the host and the path of the identifier — a pure string insertion with no normalisation step. RFC 9728 §3.3 and RFC 8414 §3.3 then require the advertised
resource/issuerto be identical to the configured value ("If these values are not identical, the data contained in the response MUST NOT be used"), an exact-string comparison that exists to defeat metadata substitution. RFC 3986 §6.2.3's "an empty path is equivalent to '/'" is a comparison technique a consumer may use — equivalent is not identical, and these specs chose simple string comparison.Both amended issuer cases are
criticaland already state exactness in theirrequirement_summary; only their test data failed to exercise it — none of the existing inputs carried a trailing slash, so implementations could normalise identifiers without any case going red. This closes that coverage gap; it introduces no new requirement.The accept variant also pins the sharpest consequence of normalising: an SDK that strips a configured trailing-slash issuer before comparing it against a token's
issrejects every valid token from that authorization server.Validation
make checkpasses (yamllint +validate_catalog.py, 104 cases).make format(yamlfix) leaves the file unchanged.