Skip to content

Catalog: exercise identifier identity with trailing-slash data - #3

Open
RobertoIskandarani wants to merge 1 commit into
mainfrom
rob/identifier-identity-trailing-slash-cases
Open

Catalog: exercise identifier identity with trailing-slash data#3
RobertoIskandarani wants to merge 1 commit into
mainfrom
rob/identifier-identity-trailing-slash-cases

Conversation

@RobertoIskandarani

@RobertoIskandarani RobertoIskandarani commented Jul 28, 2026

Copy link
Copy Markdown

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/" to setup.resources, expecting "/.well-known/oauth-protected-resource/mcp/".
  • rfc8414-metadata-issuer-must-match-configured-issuer — adds a variant: configured https://auth.example.com, metadata issuer https://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 issuer https://auth.example.com/, token iss https://auth.example.com/accept.

The two issuer variants use a variants: list under setup with a per-item expected_outcome, following the shape error_scenarios already uses in rfc6750-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/issuer to 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 critical and already state exactness in their requirement_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 iss rejects every valid token from that authorization server.

Validation

  • make check passes (yamllint + validate_catalog.py, 104 cases).
  • make format (yamlfix) leaves the file unchanged.

@RobertoIskandarani RobertoIskandarani self-assigned this Jul 28, 2026
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
RobertoIskandarani force-pushed the rob/identifier-identity-trailing-slash-cases branch from 194098d to 58de1cf Compare July 28, 2026 20:02
@RobertoIskandarani
RobertoIskandarani requested review from a team, dbauthplane and muralx July 28, 2026 22:30
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