rfc-9701

JSON Web Token (JWT) Response for OAuth Token Introspection

T. Lodderstedt (Editor), V. Dzhuvinov
date2025-01 streamIETF areasec wgoauth statusPROPOSED STANDARD pages13 canonicalhttps://www.rfc-editor.org/rfc/rfc9701 doi10.17487/RFC9701
This specification proposes an additional response secured by JSON Web Token (JWT) for OAuth 2.0 Token Introspection.

Extracted elements (27)

design-rationale §5

Introspection response members are encapsulated in a dedicated 'token_introspection' JWT claim rather than placed at the top level to prevent conflict and confusion with top-level JWT claims that may bear the same name (e.g., sub, exp, scope), thereby also preventing misuse of the JWT as an access token.

oauth, jose, security

design-rationale §1

RFC 7662 introspection responses are plain JSON objects, providing no cryptographic assurance. This specification adds a signed JWT response for use cases where the resource server requires stronger assurance that the authorization server issued the introspection response, including cases where the AS assumes liability for the response content.

oauth, jose, security

interoperability-note §3

One way to manage RS credentials is to use dynamic client registration (RFC 7591), treating each RS as an OAuth client. The AS should maintain at minimum a client_id and token_endpoint_auth_method, plus complementary authentication metadata such as jwks or client_secret.

oauth, security

normative-requirement §5 MUST

An AS compliant with this specification MUST refuse to serve introspection requests that don't authenticate the caller and return an HTTP status code 400, to prevent downgrading to plain RFC 7662 behavior and ensure token data is released only to legitimate recipients.

oauth, security, http

normative-requirement §4 MUST

An RS requests a JWT introspection response by sending an introspection request with an Accept HTTP header field set to 'application/token-introspection+jwt'. The AS MUST authenticate the caller at the token introspection endpoint.

oauth, jose, http

normative-requirement §5 MUST NOT

If the access token is invalid, expired, revoked, or not intended for the calling RS, the AS MUST set the active member in token_introspection to false and MUST NOT include other members.

oauth, jose

normative-requirement §5 MUST

If the introspection response is both signed and encrypted, it MUST be a Nested JWT as defined in RFC 7519.

oauth, jose, crypto

normative-requirement §3 MUST

The AS MUST be able to determine whether an RS is the audience for a particular access token and what data it is entitled to receive; otherwise the RS is not authorized to obtain data for the access token.

oauth, security

normative-requirement §5 MUST

The AS MUST ensure the release of any privacy-sensitive data within the token_introspection claim is legally based, with RS-specific policy determining what identity claims to return when the AS acts as a provider of resource owner identity claims.

oauth, privacy

normative-requirement §3 MUST

The AS MUST restrict the use of client credentials by an RS to the calls it requires; for example, the AS MAY restrict such a client to call only the token introspection endpoint.

oauth, security

normative-requirement §9 MUST

The AS MUST retain the scope of the legal basis with the access token (e.g., in the scope value), MUST authenticate the RS, and MUST determine the data an RS is allowed to receive based on the RS's identity and suitable token data.

oauth, privacy, security

normative-requirement §3 MUST

The authorization server MUST be able to identify, authenticate, and authorize resource servers in order to process introspection requests in a secure and privacy-preserving manner.

oauth, security

normative-requirement §6 MUST NOT

The introspection_encrypted_response_enc parameter MUST NOT be specified without also setting introspection_encrypted_response_alg.

oauth, jose

normative-requirement §5 SHOULD NOT

The JWT SHOULD NOT include the sub and exp claims at the top level, as an additional measure to prevent misuse of the JWT as an access token (cross-JWT confusion).

oauth, jose, security

normative-requirement §5 MUST

Token introspection response parameter names intended for use across domains MUST be registered in the 'OAuth Token Introspection Response' registry defined by RFC 7662.

oauth, registry

privacy-consideration §9 MUST

A token introspection request reveals to the AS when the client (and potentially the user) is accessing the RS. If this timing disclosure is not acceptable, implementers MUST use other means to relay access token data, such as embedding the needed data directly within the access token.

oauth, privacy

privacy-consideration §9

The introspection response may transfer personal identifiable information (PII) from the AS to the RS. The AS MUST conform to legal and jurisdictional constraints before releasing data to a particular RS, typically established via explicit user consent, out-of-band contracts, or 1st-party service terms.

oauth, privacy, security

protocol-element §5

The JWT introspection response MUST include four top-level claims: 'iss' (AS issuer URL), 'aud' (the RS receiving the response), 'iat' (response creation time), and 'token_introspection' (a JSON object containing the RFC 7662 introspection response members).

oauth, jose

protocol-element §7

Three optional AS metadata parameters are introduced: 'introspection_signing_alg_values_supported', 'introspection_encryption_alg_values_supported', and 'introspection_encryption_enc_values_supported', each as JSON arrays of supported algorithm identifiers, published via RFC 8414 AS metadata.

oauth, jose

protocol-element §6

Three optional client metadata parameters are introduced for RS registration: 'introspection_signed_response_alg' (JWS algorithm, default RS256), 'introspection_encrypted_response_alg' (JWE key encryption algorithm, default no encryption), and 'introspection_encrypted_response_enc' (JWE content encryption algorithm, default A128CBC-HS256 when encryption is used).

oauth, jose, crypto

registry §10.4

The JWT claim name 'token_introspection' registered in the IANA 'JSON Web Token (JWT)' registry with description 'Token introspection response', per Section 5 of RFC 9701.

oauth, jose, registry

registry §10.3

The media type 'application/token-introspection+jwt' registered in the IANA 'Media Types' registry to indicate that content is a token introspection response in JWT format (binary encoding, base64url-encoded values separated by '.' characters).

oauth, jose, registry

registry §10.2

Three entries registered in the IANA 'OAuth Authorization Server Metadata' registry: introspection_signing_alg_values_supported, introspection_encryption_alg_values_supported, and introspection_encryption_enc_values_supported (Section 7 of RFC 9701).

oauth, registry, jose

registry §10.1

Three entries registered in the IANA 'OAuth Dynamic Client Registration Metadata' registry: introspection_signed_response_alg, introspection_encrypted_response_alg, and introspection_encrypted_response_enc (Section 6 of RFC 9701).

oauth, registry, jose

security-consideration §8.1

Cross-JWT confusion: an attacker could pass a JWT introspection response as an access token to the RS, since iss and aud may resemble those of a JWT access token. Countermeasures are the 'token-introspection+jwt' typ header and encapsulation of introspection claims inside token_introspection; RS MUST check the typ header and verify all minimally required access token claims are present.

oauth, jose, security

security-consideration §8.2 MUST

To prevent token data leakage, the AS MUST use TLS 1.2 or higher per BCP 195 (RFC 9325), and MUST require all requests to the introspection endpoint to be authenticated, preventing introspection by parties that are not the intended consumer.

oauth, tls, security

wire-format §5

The introspection endpoint responds with Content-Type 'application/token-introspection+jwt' and the JWT typ header parameter set to 'token-introspection+jwt'. The JWT is a base64url-encoded structure per RFC 7519.

oauth, jose, http