Skip to content

Discovery: follow same-eTLD+1 redirects when fetching metadata#18

Open
rohanharikr wants to merge 1 commit into
dickhardt:mainfrom
rohanharikr:discovery-follow-same-etld-redirects
Open

Discovery: follow same-eTLD+1 redirects when fetching metadata#18
rohanharikr wants to merge 1 commit into
dickhardt:mainfrom
rohanharikr:discovery-follow-same-etld-redirects

Conversation

@rohanharikr
Copy link
Copy Markdown
Contributor

Closes #14

Adds a Following Redirects subsection to ## Metadata Documents defining HTTP redirect behavior during metadata discovery.

What's normative

  • Implementations MUST follow redirects within the same eTLD+1 as the original URL
  • Implementations SHOULD NOT follow redirects to a different eTLD+1
  • After redirect, validation (issuer match, iss claim) is performed against the final URL, not the original

Why

Allows deployments where the user-facing entry point and the canonical metadata host differ within the same registrable domain. Concretely:

  • User types hello.coop
  • Metadata fetch hits https://hello.coop/.well-known/aauth-person.json
  • Server returns 302 to https://person.hello.coop/.well-known/aauth-person.json
  • Implementation follows (same eTLD+1)
  • Document's issuer is https://person.hello.coop — matches post-redirect URL ✓

This works without protocol changes today only if implementations happen to follow redirects, and the issuer match works only if it's done against the post-redirect URL — both currently unspecified. This PR makes the behavior explicit and bounded.

Cross-reference

The post-redirect issuer check ties in with #12 (require metadata.issuer === fetched-URL). PR #17 mandates the check; this PR clarifies it applies to the post-redirect URL.

Diff scope

One new ### Following Redirects {#metadata-redirects} subsection in the Metadata Documents section. Three short paragraphs.

Defines redirect-handling behavior for metadata fetches:

- MUST follow redirects within the same eTLD+1
- SHOULD NOT follow redirects across eTLD+1 boundaries
- Validation (issuer match, iss claim) is performed against the
  post-redirect URL

Allows deployments where the user-facing entry point and the
canonical metadata host differ within the same registrable domain
(e.g. hello.coop → person.hello.coop). Either URL can serve as a
valid discovery entry point.

Closes dickhardt#14
@rohanharikr rohanharikr force-pushed the discovery-follow-same-etld-redirects branch from 9de5a87 to 2d7d5d1 Compare April 27, 2026 16:28
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.

Discovery: allow following HTTP redirects within the same eTLD+1

1 participant