Skip to content
IAM Insights

Briefing · Article · source · published · Boston Identity

RFC 8414 tells an OAuth client to discard server metadata whose issuer differs from the URL it started from

RFC 8414, published in June 2018 by Michael Jones, Nat Sakimura and John Bradley, defines the JSON document an OAuth client reads to learn a server's endpoints and keys. It generalizes OpenID Connect Discovery. Only two fields are required outright. If the issuer in the document is not identical to the issuer URL the client fetched from, the data must not be used.

RFC Editor · Michael B. Jones, Nat Sakimura, John Bradley · June 1, 2018 · read

share
6,789 words. With Michael B. Jones, author, Microsoft; Nat Sakimura, author, Nomura Research Institute; John Bradley, author, Yubico.
01

What's happening

Finding4
BI-FIND-2018-0001Lead finding

Under RFC 8414, metadata whose issuer is not identical to the one the client built the URL from MUST NOT be used, the client's guard against a fake server.

RFC 8414 makes the issuer value the client's guard against a fake authorization server. The client builds the metadata URL from the issuer identifier, and the "issuer" the document returns MUST be identical to it; if the two differ, the RFC says "the data contained in the response MUST NOT be used." Section 6.2 names the attack this blocks: a document that claims a real server's issuer but lists the attacker's own endpoints and signing keys. Clients MUST also check the TLS certificate, which the authors say prevents man-in-the-middle and DNS-based attacks. Section 4 sets what identical means: strings are compared code point by code point, and Unicode normalization MUST NOT be applied. A client that supports signed metadata MUST let the values in the signed JWT take precedence over the plain JSON ones.

high confidencebest source: independent researchobserved Jun 2018EvidenceSection 2Section 3Metadata format and signed metadata
flag a problem with BI-FIND-2018-0001
Figure steps
  1. The client inserts the well-known string between the host and the issuer's path. OpenID Connect Discovery would append it after the path instead.
  2. It fetches the document over HTTPS and must check that the TLS certificate is valid for the issuer URL.
  3. The issuer in the document must be identical to the issuer URL the client started from. If it is not, the client must not use the data.
  4. Only then does the client use the endpoints and keys the document lists.
Fig. 1

A client uses a server's metadata only after two checks: the TLS certificate must fit the issuer URL, and the issuer the document names must be identical to the URL the client started from.

Drawn from RFC 8414, Sections 3, 5 and 6.2Source dated June 1, 2018Passage: Section 2

Swipe for the full figure →

BI-FIND-2018-0002

For an issuer with a path, RFC 8414 puts the well-known string between the host and the path, while OpenID Connect Discovery appends it after the path.

For an issuer with a path, such as https://example.com/issuer1, RFC 8414 puts the well-known string between the host and the path, while OpenID Connect Discovery appends it after the path. With no path, the two give the same URL. Section 5 says metadata locations should use the RFC's form going forward. Where the OpenID form is already in use, servers may need to publish at both locations for a transition period. Clients should try the RFC location first and fall back only if that fetch fails, a step the RFC expects to need only when the suffix is openid-configuration.

high confidencebest source: independent researchobserved Jun 2018EvidenceSection 2
flag a problem with BI-FIND-2018-0002
BI-FIND-2018-0003

Only two server metadata fields are required outright, issuer and response_types_supported, so a client cannot assume most fields are there.

Only two fields are required outright: issuer and response_types_supported. The authorization and token endpoints are required unless the server's grant types do not use them. Most other fields are optional, scopes_supported is RECOMMENDED, and a few become required only when a related value is listed, which means a client cannot assume most fields are there. Some absences carry meaning: a server that omits code_challenge_methods_supported does not support PKCE. New fields go into an IANA registry the RFC creates with 23 initial entries, on a Specification Required basis after a two-week review period. Our briefings on two later OAuth drafts found each adding its own metadata field.

BI-FIND-2018-0004

Section 6.4 puts out of scope the secure choice, for all use cases, of which protected resources a client uses with an authorization server.

Section 6.4 puts the secure choice of which protected resources to use with an authorization server "for all use cases" out of scope. It assumes the client already has a way, calls the means application dependent and gives examples, such as a fixed set of resources or locations the server publishes as metadata. It warns that if a client uses an inappropriate resource, an attacker may be able to act as a man-in-the-middle proxy to a valid one without the server or the client noticing. We read later work as closing that gap from the resource side: our briefing on the MCP authorization spec found it requires MCP servers to publish protected resource metadata naming their authorization server.

medium confidencebest source: independent researchobserved Jun 2018 – Jul 2026EvidenceSection 3
Also reported in +1 briefing
flag a problem with BI-FIND-2018-0004
02

Section by section

4

showing 4 of 4

[1]

Metadata format and signed metadata

Michael B. Jones, Microsoft · Nat Sakimura, Nomura Research Institute · John Bradley, Yubico

Standards

RFC 8414 defines a JSON document an OAuth client reads to learn an authorization server's endpoints and capabilities, generalizing OpenID Connect Discovery. Only issuer and response_types_supported are unconditionally REQUIRED; most other fields are optional. Metadata may also be carried as a signed JWT (signed_metadata), which takes precedence if supported.

technical artifactfrom published text

[2]

Retrieval, well-known path and OpenID compatibility

Michael B. Jones, Microsoft · Nat Sakimura, Nomura Research Institute · John Bradley, Yubico

Standards

Servers that support metadata MUST serve the document by HTTPS GET at /.well-known/oauth-authorization-server, inserted between the host and any path in the issuer. The issuer the document returns MUST equal the issuer URL used to fetch it. With a path, this differs from OpenID Connect Discovery, which appends the string; during a transition, clients should try the RFC location first and fall back to the OpenID one only if that fails.

technical artifactfrom published text

[3]

Security considerations and string comparison

Michael B. Jones, Microsoft · Nat Sakimura, Nomura Research Institute · John Bradley, Yubico

Standards

Clients MUST check the TLS certificate and that the issuer matches the fetch URL, which blocks a rogue metadata document naming an impersonated issuer. Choosing which protected resources suit a server is out of scope. A standard format helps attackers as well as clients. String comparison is code-point exact, with no Unicode normalization.

technical artifactfrom published text

[4]

IANA registries and well-known URI

Michael B. Jones, Microsoft · Nat Sakimura, Nomura Research Institute · John Bradley, Yubico

Standards

The RFC creates the IANA OAuth Authorization Server Metadata registry, with registration on a Specification Required basis after a two-week review period and 23 initial entries, and registers the oauth-authorization-server well-known suffix. Other specifications add their metadata fields through this registry.

technical artifactfrom published text

Terms used

OAuth 2.0 Authorization Server Metadata
An IETF standard (RFC 8414) defining a well-known JSON document an OAuth client fetches to discover an authorization server's endpoints and capabilities, generalizing OpenID Connect Discovery to OAuth 2.0.
JavaScript Object Notation (JSON)
The standardized JSON data-interchange syntax, defined in RFC 8259.
OAuth
The web's standard framework for delegated authorization — letting one application act at another on a user's (or machine's) behalf without sharing passwords.
OpenID Connect Discovery 1.0
OpenID Connect Discovery — how a client finds an OpenID Provider's endpoints and keys from a published metadata document.
RFC
Request for Comments: the numbered document series in which the Internet Engineering Task Force publishes internet specifications, from standards such as RFC 8693 to informational notes. A draft is not an RFC.
TLS
Transport Layer Security, the protocol that encrypts traffic between two systems and lets each check the other's certificate. Mutual TLS (mTLS) makes both sides prove who they are, which is how many workload identity schemes authenticate services.
Man-in-the-middle attack
An attacker sits between two parties, reading and possibly changing their traffic.
DNS
The Internet's naming system: it maps names to typed records, such as addresses and TXT text records, that clients can look up.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity