RFC 8414 — OAuth 2.0 Authorization Server Metadata
Implemented (apiauth.MountASMetadata)
Source: docs/oauth/RFC_8414.md
RFC 8414 — OAuth 2.0 Authorization Server Metadata ¶
Status: Standards Track
Published: 2018-06
L-tier / T-tier: L2 · T0 (setup / discovery)
OneAuth coverage: Implemented (apiauth.MountASMetadata)
See also:RFC_9728.md·LANDSCAPE.md
In one sentence ¶
RFC 8414 is the standard “discovery doc” for an OAuth AS — a JSON document
at a well-known URL that tells clients where the AS’s endpoints are, which
algorithms it supports, which grants it accepts, and where to find its
JWKS.
What problem does it solve? ¶
| Without 8414 | With 8414 |
|---|---|
Clients hardcode endpoint URLs (/oauth/token, /oauth2/v1/token, vendor variations) |
One well-known URL; client SDKs auto-configure |
| Adding a new grant or capability requires every consumer to know about it out-of-band | Discovery doc declares it; SDKs see new fields appear and adapt |
| Cross-org integrations need a setup checklist of URLs and key locations | Pointer to the well-known URL is the whole setup |
| Verifying public keys means hardcoding key material or PEM files | jwks_uri points at the live JWKS (RFC 7517) |
8414 is the spec that made “drop in an issuer URL and have the rest auto-wire”
the default UX for modern OAuth SDKs. Before 8414, OIDC Discovery 1.0 (2014)
established the pattern; 8414 generalized it for OAuth-only deployments.
Relatable example ¶
Every modern OAuth SDK works like this:
# Auth0 SDK
auth0 = Auth0Client(issuer="https://tenant.us.auth0.com")
# SDK fetches: https://tenant.us.auth0.com/.well-known/openid-configuration
# Now it knows: token endpoint, JWKS URI, supported algs, scopes, ...
// OneAuth client SDK (package client)
meta, err := client.DiscoverASWithContext(ctx, "https://as.example.com")
// SDK fetches https://as.example.com/.well-known/oauth-authorization-server,
// falls back to /.well-known/openid-configuration, and refuses a document
// whose issuer doesn't match the URL it asked (RFC 8414 §3.3).
// meta.TokenEndpoint, meta.JWKSURI and the rest are now known.
That’s 8414 at work. The single string https://as.example.com is enough
because the discovery doc carries everything else.
Key concepts ¶
- Two well-known paths. RFC 8414 specifies
/.well-known/oauth-authorization-server; OIDC Discovery 1.0 uses
/.well-known/openid-configuration. Most servers serve both with
identical content for compatibility — OneAuth does this via
MountASMetadata. issueris load-bearing. Theissuerfield must match the URL the
client used to fetch the doc (RFC 8414 §3.3). Mismatches mean an
attacker swapped the discovery doc. This is part of the mix-up defense
story (see RFC_9207.md).- Capability advertisements. Fields like
grant_types_supported,
code_challenge_methods_supported,scopes_supported,
response_types_supportedlet clients negotiate. RFC 9700 strongly
recommends advertising only secure choices (e.g.,S256only for PKCE,
noplain). - Extensibility is by design. New RFCs add new metadata fields. E.g.,
authorization_details_types_supported(RFC 9396),
dpop_signing_alg_values_supported(RFC 9449),
backchannel_logout_supported(OIDC BCL),
authorization_response_iss_parameter_supported(RFC 9207). Discovery
is the extension surface. - Caching matters. Discovery docs are read often. Set sensible
Cache-Controlheaders (typical: 1 hour). OneAuth honors a
configurableCacheMaxAgeonASServerMetadata.
Wire example ¶
GET /.well-known/oauth-authorization-server HTTP/1.1
Host: as.example.com
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: public, max-age=3600
{
"issuer": "https://as.example.com",
"authorization_endpoint": "https://as.example.com/authorize",
"token_endpoint": "https://as.example.com/api/token",
"introspection_endpoint": "https://as.example.com/oauth/introspect",
"revocation_endpoint": "https://as.example.com/oauth/revoke",
"jwks_uri": "https://as.example.com/.well-known/jwks.json",
"registration_endpoint": "https://as.example.com/apps/dcr",
"scopes_supported": ["openid", "profile", "email", "read", "write"],
"response_types_supported": ["code"],
"grant_types_supported": [
"authorization_code", "refresh_token", "client_credentials",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:ietf:params:oauth:grant-type:jwt-bearer",
"urn:ietf:params:oauth:grant-type:token-exchange"
],
"code_challenge_methods_supported": ["S256"],
"token_endpoint_auth_methods_supported": [
"client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt"
],
"claims_supported": ["sub", "iss", "aud", "exp", "iat", "jti"],
"authorization_details_types_supported": ["payment_initiation", "account_information"],
"authorization_response_iss_parameter_supported": true,
"backchannel_logout_supported": true
}
The fields the AS chooses to populate are the deployment’s documentation.
A client SDK reading this doc knows it can do RAR (authorization_details_*),
that PKCE is S256-only (code_challenge_methods_supported), and that
backchannel logout is in scope.
Where it lands on the OAuth abstraction ¶
- L2 lifecycle & discovery. 8414 is what makes the AS self-describing.
- T0 (deployment setup). Discovery is queried once on client startup
(or on cache miss); subsequent flows assume it. - Sibling specs: OIDC Discovery 1.0 for identity-layer fields; RFC 9728
for protected resources (sibling, RS-side).
OAuth 2.0 status ¶
Published 2018, after 2.0. Not part of bare 6749. But the OIDC Discovery
spec (2014) established the pattern, and 8414 became the universal way to
advertise any OAuth AS in production — OIDC or not.
Modern major IdPs all publish 8414-shaped metadata, often at both
well-known paths (/oauth-authorization-server + /openid-configuration)
because clients historically went to the OIDC path first.
OAuth 2.1 status ¶
Not mandated by 2.1 either, but in practice if you’re shipping a 2.1-strict
AS you’ll publish 8414 metadata — that’s how clients negotiate the strict
features. 2.1 references 8414 throughout as the way to advertise required
capabilities (code_challenge_methods_supported, etc.).
OneAuth status ¶
| 8414 surface | Status | Where (grep-verified) | Notes |
|---|---|---|---|
/.well-known/oauth-authorization-server |
Implemented | apiauth/as_metadata.go MountASMetadata registers it |
Co-served with the OIDC path |
/.well-known/openid-configuration |
Implemented | Same — both paths share the handler | One JSON, two URLs |
ASServerMetadata struct |
Implemented | apiauth/as_metadata.go ASServerMetadata |
Covers 6749, 7517, 7591, 8628, 9126, 9207, 9396, 9449, OIDC BCL, OIDC discovery fields |
jwks_uri advertisement |
Implemented | ASServerMetadata.JWKSURI |
— |
authorization_response_iss_parameter_supported (RFC 9207) |
Implemented | ASServerMetadata.AuthorizationResponseIssParameterSupported; opt-in per-deployment |
Pointer to RFC 9207 |
authorization_details_types_supported (RFC 9396) |
Implemented | ASServerMetadata.AuthorizationDetailsTypesSupported |
RAR types enumerable per-deployment |
code_challenge_methods_supported=["S256"] |
Implemented | ASServerMetadata.CodeChallengeMethodsSupported |
plain deliberately absent, so clients refuse non-S256 ASes |
backchannel_logout_supported (OIDC BCL) |
Implemented | ASServerMetadata.BackchannelLogoutSupported |
Optional, advertised when wired |
dpop_signing_alg_values_supported (RFC 9449) |
Implemented | ASServerMetadata.DPoPSigningAlgValuesSupported, filled from DPoPProofValidator.SigningAlgValuesSupported |
Since 0.1.37. Advertise it only when a DPoP validator is wired |
pushed_authorization_request_endpoint (RFC 9126) |
Implemented | ASServerMetadata.PushedAuthorizationRequestEndpoint |
Since 0.1.38. Advertise it only where /par is mounted |
require_pushed_authorization_requests (RFC 9126) |
Implemented | ASServerMetadata.RequirePushedAuthorizationRequests |
Since 0.1.38. Set it only alongside AuthorizeMountConfig.RequirePushedRequests, which enforces it |
token_endpoint_auth_signing_alg_values_supported |
Implemented | ASServerMetadata.TokenEndpointAuthSigningAlgValuesSupported |
Required when private_key_jwt or client_secret_jwt is advertised |
Cache-Control on responses |
Implemented | ASServerMetadata.CacheMaxAge field |
Configurable per-deployment |
| Discovery-proxy mode (fetch upstream metadata) | Implemented | apiauth/as_metadata_proxy.go ASMetadataProxy |
For RS deployments that proxy a foreign AS’s discovery |
| Client-side discovery | Implemented | client/discovery.go DiscoverAS / DiscoverASWithContext |
Tries the RFC 8414 path, then the OIDC path; an issuer mismatch is ErrMetadataIssuerMismatch, with no fallback |
Reference server metadata ¶
cmd/oneauth-server/metadata.go serverASMetadata builds the document
from what the server mounts. The issuer is server.public_url
(scheme://host:port without one), and jwt.issuer follows it unless
set (0.1.44).
Since 0.1.51 the code response type, the RFC 9207 iss flag and the
none auth method are advertised only with code_flow on. The implicit
token response type is gone, and the advertised POST /oauth/revoke is
mounted.
With code_flow.par.enabled the document carries
pushed_authorization_request_endpoint, and require_pushed_authorization_requests
is true under code_flow.par.required or fapi2 (0.1.54).
Under fapi2: true the token endpoint auth methods are private_key_jwt
only, the signing algorithm list is ES256 only, and the password grant
is absent from grant_types_supported (0.1.54).
When NOT to use it ¶
You’ll almost always publish discovery metadata. The one carve-out is
locked-down internal deployments where the client population is known and
configured statically — even there, publishing the doc costs nothing.
Related RFCs ¶
- RFC 6749 — the framework whose endpoints discovery describes
- RFC 7517 — JWKS;
jwks_uripoints here - RFC 9728 — Protected Resource Metadata; the RS-side sibling
- RFC 9207 —
authorization_response_iss_parameter_supported - RFC 9449 — DPoP advertises
dpop_signing_alg_values_supported - RFC 7591 — DCR;
registration_endpointpoints here - OIDC Discovery 1.0 — the predecessor / superset for identity-layer fields