Skip to content

Metadata: require issuer to match the URL it was fetched from#17

Open
rohanharikr wants to merge 1 commit into
dickhardt:mainfrom
rohanharikr:verify-issuer-matches-fetched-url
Open

Metadata: require issuer to match the URL it was fetched from#17
rohanharikr wants to merge 1 commit into
dickhardt:mainfrom
rohanharikr:verify-issuer-matches-fetched-url

Conversation

@rohanharikr
Copy link
Copy Markdown
Contributor

Closes #12

Adds a normative MUST in the Metadata Documents section: when fetching a metadata document, implementations MUST verify that issuer matches the URL the document was retrieved from (less the /.well-known/{dwk} suffix). Mismatch → reject.

Why

Without this check, a "host-poisoned metadata" attack is possible against permissive verifiers — an attacker hosts a metadata document at their own domain claiming a different issuer, and a verifier that follows jwks_uri from such a document could end up trusting attacker-controlled keys for tokens claiming the impersonated issuer.

RFC 8414 (OAuth Authorization Server Metadata) makes the analogous check normative for OAuth. Bringing the AAuth metadata spec into alignment.

Diff scope

Two paragraphs added at the top of ## Metadata Documents. Applies uniformly across agent server, resource, PS, and AS metadata since they all share the same well-known fetch pattern.

Adds a normative MUST that verifiers check metadata.issuer matches the
URL they retrieved the document from (less the /.well-known/{dwk}
suffix). Rejects mismatch.

Prevents host-poisoned metadata: an attacker hosting metadata at one
domain claiming an issuer of another. Parallels RFC 8414's analogous
requirement for OAuth Authorization Server Metadata.

Closes dickhardt#12
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.

Verifiers should check issuer matches the URL metadata was fetched from

1 participant