What's new in 3.1
Version 3.1 lets a client become known by its metadata document, gives the host more say over what a registered client may do, and holds client authentication, redirect addresses, refresh tokens and token exchange closer to the specifications. What a 3.0 deployment has to change to move to 3.1 is in Upgrading to 3.1.
Client ID Metadata Documents
A client can use an HTTPS address as its client identifier, and the server reads the client's metadata from the JSON document served at that address, as draft-ietf-oauth-client-id-metadata-document-03 describes. The feature is experimental: it is off until the host turns it on, and the compiler reports a diagnostic until the host suppresses it.
The host limits which addresses may serve as identifiers, how large a document may be and how long the server holds one. A document passes the same checks as a dynamic registration, and it carries no shared secret and no private key. A host that turns the feature on with no allowed identifier prefixes while granting consent for every client does not start.
- A client from a document is held to the first authentication method it declares that its tenant admits.
- A public client from a document takes none of the client credentials, password, JWT bearer and CIBA grants and none of the backchannel delivery settings, and is served without those flows.
- The server looks a client up once per request, so a document is fetched at most once per request, whichever steps read the client, the reading of tokens included. A document the server refuses is never kept for the next request, since section 6.2 of the draft forbids caching an error.
- When a document cannot be fetched for a reason that may pass and no valid copy is held, the endpoints where the missing client decides the answer (token, pushed authorization request, revocation and introspection) answer 503 with no body, as section 6.1 of the draft has the token and pushed authorization request endpoints answer. During such a failure a held copy is served past its lifetime. Telemetry names this outcome apart from the 429 of a rate limit. The authorization endpoint answers
invalid_clientwithout a redirect, and so does a request object or request URI there that names a client whose document is refused. - A
software_statementinside a document is not read, and a software statement the host requires applies to registration requests only. - While the feature is on, dynamic registration refuses a proposed client identifier that is an absolute https address in any spelling.
- For development on one machine, documents may be fetched from a loopback address while the tenant's issuer is itself on loopback, as section 10.7 of the draft allows. This is refused in the Production environment and together with an outbound proxy, and copies fetched under the two rules are held apart.
Dynamic client registration
- The host names the grant types and the resources a registered client may take, in every registration mode, and a registration or an RFC 7592 update asking for another one is refused. By default a new client may take the authorization code and refresh token grants and reaches no resource.
- The host sets the offline access a registered client gets and the most it may ask for. The end user's agreement to offline access stays with the consent provider, as OpenID Connect Core, section 11 requires.
- Registration and update accept a scope that only a resource of the tenant declares, as an authorization request does, and registering such a scope grants nothing by itself. A client such as the C# MCP SDK can then register with a server that describes its MCP server as a resource.
- Registration assigns every client identifier, as RFC 9700, section 4.15.1 recommends and RFC 7591, section 3.1 describes. A host can let registrants propose their own, and a proposal is then refused when another client holds it in any letter case.
- Read and update return the client secret issued at registration, as RFC 7592, section 3 and Appendix A.1 require. The server keeps the secret encrypted beside its hash, under a key of the tenant. A client registered before 3.1 reads back without it.
- An update that carries a client secret is accepted only when it is the secret issued to the client, as RFC 7592, section 2.2 requires.
- A trusted software statement takes precedence over the request body for every member it names, as RFC 7591, section 2 requires, and the client keeps those values through every RFC 7592 update. The registration, read and update responses return the statement unmodified (RFC 7591, section 3.2.1). An update that sends the registered statement again is served after the statement expires, and another statement presented at an update is validated in full and sets only the members it carries that the registered statement does not, without being stored.
- A host that grants every client everything it asks for while anybody may register a client does not start.
- A client from a metadata document takes the same default grant types and reaches no resource unless the host names it, so a server describing an MCP server as a resource opens it only to the clients the host chose.
- The host sets the access token and refresh token settings of clients registered dynamically or resolved from a metadata document.
- The client credentials, password, JWT bearer and CIBA grants are for clients that authenticate. RFC 6749, section 4.4 requires this of client credentials and CIBA Core, sections 7.1 and 10.1 of the CIBA grant, and the server holds the password and JWT bearer grants to the same rule. Registration, update, the startup check of the settings and the token endpoint all hold to it.
- A native client registers a private-use scheme only with a period in it, as RFC 8252, section 8.4 recommends. A claimed https redirect address (section 7.2) registers the client as a web client authenticating with
none, since OpenID Connect Dynamic Client Registration 1.0, section 2 requires a native client to register only private-use schemes and http loopback addresses. A native client takes only response types with a code that issue no access token at the authorization endpoint, or none, as section 8.2 and RFC 9700, section 2.1.2 recommend. - Registration accepts an authentication method exactly when discovery lists it for the tenant.
- A registration access token answers inactive at introspection once it is revoked, replaced by an update, or its client is deleted (RFC 7592, section 2.3 and Appendix A.1, RFC 7662, section 2.2).
- A client revokes its registration access token at the revocation endpoint.
Client authentication
- Client identifiers are compared exactly, letter case included, in every store. The server refuses a client declared in the settings or a registration whose identifier differs only in case from one it holds, and a host's own registration store keeps that rule itself.
tls_client_authvalidates the client's certificate chain against the certificate authorities its tenant lists, and downloads nothing. The subject DN is compared by the distinguishedNameMatch rule of RFC 4517, a SAN URI as written, and a SAN IP address in binary, as RFC 8705, sections 2.1, 2.1.2 and 7.4 describe. A tenant that lists no certificate authority does not offer the method.self_signed_tls_client_authchecks the certificate's validity period.- Under a security profile requiring sender-constrained tokens, a client registered for certificate-bound access tokens that presents no client certificate at the token endpoint, for example at the top-level endpoint instead of its mutual TLS alias, is refused with
invalid_client, and the description names the certificate and the alias (RFC 8705, sections 2, 3.4 and 5). A FAPI 2.0 client not registered for certificate-bound tokens that sends no DPoP proof still getsinvalid_dpop_proof. client_secret_basiccredentials are decoded as form-encoded, the encoding RFC 6749, section 2.3.1 and Appendix B have the client apply. Secrets are hashed as UTF-8, and any matching secret that has not expired authenticates the client.- A client identifier in the request names the client its credentials identify, as RFC 7521, section 4.2 requires. The pushed authorization request endpoint authenticates a client as the token endpoint does, as RFC 9126, section 2 describes.
- A server setting bounds the lifetime of a client assertion, which RFC 7523, section 3 lets the server limit.
client_secret_jwtuses only the HMAC algorithms its secret is long enough for, as RFC 7518, section 3.2 requires, andprivate_key_jwtonly asymmetric ones. A generated secret is longer by default. Discovery and registration list only those algorithms, and an RFC 7592 update can move a client betweenclient_secret_basicandclient_secret_jwt.- A
private_key_jwtorclient_secret_jwtassertion names the issuer identifier as its audience, compared as written, at every endpoint that authenticates clients. A client the host lets keep an older form also has the token, backchannel authentication or pushed authorization request endpoint address accepted, on the issuer's address or its mutual TLS address, and a FAPI 2.0 profile accepts the issuer alone. - Client assertions, JWT bearer assertions and DPoP proofs reserve their single-use identifier under one key made of the kind of token, its issuer and a digest of the identifier.
- A tenant whose security profile leaves no client authentication method at its token endpoint is refused, with a message that gives each method's reason.
Authorization endpoint and redirect addresses
- Every native and public client uses PKCE, whatever its registration says, as RFC 9700, section 2.1.1 requires of public clients and RFC 8252, section 8.1 recommends for native apps. A confidential web client keeps the opt-out.
- A code challenge without a method is
plainin a request that issues a code, as RFC 7636, section 4.3 defines. It is refused unless the client allowsplain; when allowed, its code is redeemed with the challenge as its verifier. Discovery listsplainamong the supported methods (RFC 8414, section 2) only for a tenant that declares a client allowed to use it. - Redirect addresses are compared as written at the authorization and token endpoints, as RFC 9700, section 4.1.3 requires. A loopback IP address takes any port, as RFC 8252, section 7.3 requires.
- A web client redirects to https only. http on loopback and private-use schemes are for native apps (RFC 9700, section 2.6, RFC 8252, section 7.1). The post-logout addresses of web clients keep their schemes.
- Each client stores whether someone responsible for the deployment approved it, decided when the client is created, so every replica answers its requests the same way. A client the host declares counts as trusted; one that registered itself while registration was open, or came from a metadata document no allowed prefix covers, counts as untrusted.
- An authorization error is redirected only after the end user signs in, as RFC 9700, section 4.11.2 requires, and only to a trusted client, as the same section recommends; a request with
prompt=nonegets its answer at once. For an untrusted client the server answers the error itself. A host can register a redirect address trust policy of its own. - The form_post page sends
Referrer-Policy: no-referrer(RFC 9700, section 4.2.4), and the front-channel logout page refuses to be framed (RFC 9700, section 4.16). - A request object that carries an audience is accepted only when that audience is the issuer identifier, which RFC 9101, section 4 and OpenID Connect Core, section 6.1 recommend. The server holds a CIBA login hint token to the same rule.
- Clients declared in the settings hold absolute redirect addresses without a fragment, as RFC 6749, section 3.1.2 requires, and without a script or data scheme. The refusal escapes control characters, so it stays on one log line.
- A request object that names an unknown client is answered
unauthorized_client.
OAuth 2.1
The server follows the authorization server requirements of the current revision of the OAuth 2.1 draft, draft-ietf-oauth-v2-1-17. A client the host allows plain or excuses from PKCE stays an OAuth 2.0 client, as section 1.8 describes a server serving both.
- A request that authenticates with HTTP Basic gets 401 with a Basic challenge when client authentication fails (section 3.2.4); any other request gets the endpoint's own status, so the answer says nothing about how the client is registered.
- An OAuth request of a client with one registered redirect address may leave out
redirect_uri(section 4.1.1), and a code issued with PKCE is redeemed without it (section 10.2). - The code challenge and the code verifier are checked for their syntax, and a malformed verifier is answered
invalid_request(sections 4.1.1 and 3.2.4). - A redirect address cannot name a parameter of the authorization response in its query (section 2.3).
- A public client refreshes its token without sending
client_id(sections 3.2.2 and 4.3.1). - Registration, pushed authorization requests and introspection apply the CORS policy as the other endpoints do (section 3.2).
- A grant type the server does not support is answered
unsupported_grant_typebefore the client's permission is checked.
Backchannel authentication
- The host sets the longest
binding_messageit accepts, 128 code points by default, and a message carrying control, format, private-use or unassigned code points, or line and paragraph separators, is refused withinvalid_binding_message. CIBA Core 1.0, section 7.1 recommends a relatively short message in a limited set of plain text characters, so the device shows the text that was sent.
Sessions and logout
- Ending a session revokes its tokens by default, which RFC 10017, section 6.3.2.3 recommends for the refresh tokens of browser-based apps. Its refresh tokens are refused, its access tokens are inactive at introspection and refused at UserInfo, its tokens are refused in token exchange, and its unredeemed codes and the device and backchannel grants the host recorded under it are refused. A host whose native apps stay signed in after a browser sign-out turns it off. Revoking a token that is already revoked is logged as information.
- An ID token carries the session identifier only for a client registered for back-channel logout, or for front-channel logout that requires it.
- A logout request whose ID token hint carries no session identifier ends the session without a question when the hint names the signed-in end user, carries that session's authentication time and was issued to a client that signed in to it. Otherwise the end user is asked to confirm, as RP-Initiated Logout 1.0, section 2 requires.
- A tenant can name a logout confirmation page. The end session endpoint then redirects there with 303 and
Referrer-Policy: no-referrer. When the end user declines, the page does not follow thepost_logout_redirect_uriin its query: section 3 forbids post-logout redirection to an address that does not exactly match one the client registered.
Refresh tokens
- A refresh token is issued only to a client that can redeem one, through the refresh token grant or the exchange of refresh tokens. For any other client
offline_accessis dropped (RFC 6749, section 3.3, RFC 7591, section 2). - A public client's refresh token rotates on each use unless it is bound to a DPoP key, as RFC 9700, section 2.2.2 requires. A warning names a public client that declares reuse without DPoP.
- A rotating refresh token is renewed for a narrower scope too, one without
offline_accessincluded, and the new refresh token keeps the scope of the presented one, as RFC 6749, section 6 requires. - A refresh token older than its client's absolute lifetime is refused, at the refresh token grant and as the subject token of an exchange.
- A reused authorization code revokes the refresh token family its first redemption started (RFC 6749, section 4.1.2, RFC 9700, section 4.2.4).
- A refresh token is addressed to the issuer, the one party that reads it (RFC 7519, section 4.1.3), and the resources and audiences of its grant travel in claims of the server's own. A refresh token issued by 3.0 keeps renewing, and a deployment using resource indicators replaces all its instances at once (Upgrading to 3.1).
Token exchange
- An exchanged token belongs to its subject token's session, keeps its authentication time, context class and methods, and expires no later than the subject token. RFC 8693, section 2.1 lets the output token's expiry follow the input token's and leaves the rest of the linkage to the implementation.
- Errors a host's resolver returns are answered
invalid_request, as RFC 8693, section 2.2.2 requires; onlyserver_errorandtemporarily_unavailablepass as written. - A delegated token exchanged again keeps its actors (section 4.1). The actors of a pairwise client carry its pseudonyms, and introspection shows the actors to every authorized caller in that caller's own terms. The exchanged token names the original identity provider.
- Only the authorization code grant compares the redirect address of a token request.
- A client exchanging its own token bound to a DPoP key or a client certificate proves possession of that key or certificate. A public client's refresh token that is not bound is not exchanged.
- Cross-client exchange takes one of three values: refused by default, any token, or only access tokens addressed to a location the client is the resource server for. The last fits an MCP server that calls an upstream API on behalf of its caller.
- At the exchange of a refresh token, the server decides who owns the token before it does anything with it.
Revocation, introspection and UserInfo
- Revocation and introspection check that a token belongs to the caller before reading its records. Revocation checks that the token was issued to the caller, as RFC 7009, section 2.1 describes, and answers another client's token as section 2.2 answers an invalid one, 200 with nothing revoked, so the answer tells the caller nothing about a token that is not its own. Each token type has a defined owner.
- A token from the client credentials grant carries an identity provider mark that introspection shows to every authorized caller, so a caller tells a client's own token from an end user's by that mark.
- UserInfo answers only tokens issued for an end user (OpenID Connect Core, section 5.3) and reads the token from the
Authorizationheader or the form body. It ignores a token in the query, as OAuth 2.1, section 5.1 requires, so a token in the query alone is answered as no token.
Discovery and endpoint addresses
- Every endpoint is published on the issuer's scheme, host and port, whatever host discovery is fetched by, and so is the management address of RFC 7592. The JWT bearer grant accepts the issuer and its token endpoint at that address.
- Discovery publishes the authentication methods of the revocation and introspection endpoints and their signing algorithms, as RFC 8414, section 2 defines.
- The lists of authentication methods follow the tenant's security profile. Each list of signing algorithms appears only beside a method that uses a JWT, and never empty.
Outbound requests to client-supplied addresses
- The server resolves a host name once and connects only to the addresses it checked. While private networks are blocked, special-purpose address blocks and HTTP/3 are refused too. No system proxy is used. A forward proxy named in the settings resolves the name again itself.
- These requests send no cookies.
- The host sets the TLS options, such as a private certificate authority or a client certificate. By default the server downloads no certificates and makes no online revocation checks.
Tenants and hosting
- A tenant holding a null where its types rule one out is refused alone, with a message naming the tenant and the path of the setting. From the settings it stops the host at startup. From a store it is left out while the other tenants are served, answers 404 at every endpoint until the store holds it fixed, and keeps its issuer and keys from any other tenant that claims them.
- A host that registers no cache of its own starts and runs as a single instance on in-process caches. A cache the host registers wins in any registration order.
- A client secret serialized to JSON carries each hash once, and JSON written by 3.0 reads to the same hashes.
Logs and traces
- The log records every token response, the tokens the authorization endpoint hands out, every change to a dynamically registered client and every client resolved from a metadata document, at Information under stable event ids. A record names the tenant, the client, the grant and what the tokens are for, and stands for the end user only by a fingerprint, under a key the host sets once for the deployment.
- Endpoint spans name the client once it is known.
Security events
- A complex subject is written with only its format and the simple subjects it holds, as Shared Signals Framework 1.0, section 3.3 describes, and a stored subject reads back as it was written.