Internet-Draft | Updates to Audience Values for ASs | April 2025 |
Jones, et al. | Expires 25 October 2025 | [Page] |
This specification updates the requirements for audience values for tokens whose audience is an OAuth 2.0 authorization server to address a security vulnerability identified in the previous requirements for those audience values in multiple OAuth 2.0 specifications.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 25 October 2025.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Multiple OAuth 2.0 specifications use tokens (also known as "assertions")
that are sent to authorization servers.
These tokens contain an audience value or values intended to
identify the recipients that the token is intended for.
When the token is a JSON Web Token (JWT) [JWT],
the audience value(s) are contained in the
aud
(audience) claim.¶
When performing a security analysis of a pre-final version of the OpenID Federation specification [OpenID.Federation.ID4], University of Stuttgart security researchers Pedram Hosseyni, Dr. Ralf Küsters, and Tim Würtele discovered a vulnerability affecting multiple OpenID and OAuth specifications caused by ambiguities in the audience values of tokens sent to authorization servers. The vulnerability was disclosed to the OAuth working group in an interim meeting in January 2025 called for that purpose, including providing a description of the vulnerability [private_key_jwt.Disclosure]. A paper they published describing the attack is [Audience.Injection].¶
This specification updates the affected OAuth specifications to address the security vulnerability identified. Specifically, it eliminates former ambiguities in the audience values of tokens sent to OAuth 2.0 authorization servers.¶
A general description of the update made to each specification is for it to require that the issuer identifier URL of the authorization server, as defined in [RFC8414], be used as the sole value of the token audience. Furthermore, the authorization server MUST reject any such token that does not contain its own issuer identifier as the sole audience value. An explicit type for each affected kind of token, as defined in [RFC8725], is also defined to facilitate distinguishing between tokens produced in accordance with specifications published prior to these updates and those incorporating them. Specific updates made to each affected specification follow.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This section updates "Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7521] to tighten its audience requirements.¶
The description of the Audience parameter in Section 5.1 of [RFC7521] (Assertion Metamodel) is replaced by:¶
The description of the Audience parameter in Section 5.2 of [RFC7521] (General Assertion Format and Processing Rules) is replaced by:¶
The assertion MUST contain an audience that identifies the authorization server as the intended audience, with the issuer identifier [RFC8414] of the authorization server as its sole value. The authorization server MUST reject any assertion that does not contain its own issuer identifier as the sole audience value.¶
In the list of agreements required by participants in Section 7 of [RFC7521] (Interoperability Considerations), "audience identifiers" is removed from the list.¶
This section updates "Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7522] to tighten its audience requirements.¶
The description of the Audience element in Item 2 of Section 3 of [RFC7522] (Assertion Format and Processing Requirements) is replaced by:¶
The Assertion MUST contain a <Conditions> element with an <AudienceRestriction> element with a single <Audience> element that identifies the authorization server as the intended audience. The value of the <Audience> element MUST be the issuer identifier [RFC8414] of the authorization server. Section 2.5.1.4 of "Assertions and Protocols for the OASIS Security Assertion Markup Language (SAML) V2.0" [OASIS.saml-core-2.0-os] defines the <AudienceRestriction> and <Audience> elements. Unlike the audience value specified in [RFC7522], there MUST be no value other than the issuer identifier of the intended authorization server used as the audience of the assertion; this includes that the token endpoint URL of the authorization server MUST NOT be used as an audience value.¶
The authorization server MUST reject any assertion that does not contain its own issuer identifier as the sole audience value.¶
In Section 4 of [RFC7522] (Authorization Grant Example), the sentence:¶
The intended audience of the Assertion is
https://saml-sp.example.net
,
which is an identifier for a SAML Service Provider
with which the authorization server identifies itself.¶
is replaced by:¶
The intended audience of the Assertion is
https://authz.example.net
,
which is the authorization server's issuer identifier.¶
In the same section, the SAML 2.0 Assertion example is replaced by:¶
<Assertion IssueInstant="2024-11-17T00:53:34.619Z" ID="ef1xsbZxPV2oqjd7HTLRLIBlBb7" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> <Issuer>https://saml-idp.example.com</Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> [...omitted for brevity...] </ds:Signature> <Subject> <NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"> brian@example.com </NameID> <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <SubjectConfirmationData NotOnOrAfter="2024-11-17T00:58:34.619Z" Recipient="https://authz.example.net/token.oauth2"/> </SubjectConfirmation> </Subject> <Conditions> <AudienceRestriction> <Audience>https://authz.example.net</Audience> </AudienceRestriction> </Conditions> <AuthnStatement AuthnInstant="2024-11-17T00:53:34.371Z"> <AuthnContext> <AuthnContextClassRef> urn:oasis:names:tc:SAML:2.0:ac:classes:X509 </AuthnContextClassRef> </AuthnContext> </AuthnStatement> </Assertion>
In the list of agreements required by participants in Section 5 of [RFC7521] (Interoperability Considerations), "audience identifiers" is removed from the list.¶
This section updates "JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7523] to tighten its audience requirements.¶
In Section 3 of [RFC7523] (JWT Format and Processing Requirements), Item 3, which describes the audience value, is replaced by:¶
The JWT MUST contain an aud
(audience) claim containing
the issuer identifier [RFC8414]
of the authorization server as its sole value.
The authorization server MUST have an issuer identifier
to be used with this specification.
Unlike the aud
value specified
in [RFC7523], there MUST be no value other than
the issuer identifier of the intended authorization server
used as the audience of the JWT;
this includes that the token endpoint URL of the authorization server
MUST NOT be used as an audience value.
To simplify implementations,
the aud
claim value MUST
be a JSON string, and not a single-valued JSON array.
The authorization server MUST reject any JWT that does not
contain its issuer identifier as its sole audience value.
In the absence of an application profile specifying
otherwise, compliant applications MUST compare the audience
values using the Simple String Comparison method defined in Section
6.2.1 of RFC 3986 [RFC3986].¶
In Section 3.1 of [RFC7523] (Authorization Grant Processing), the following requirement is added:¶
Authorization grant JWTs MUST be explicitly typed by using the
typ
header parameter value
authorization-grant+jwt
or
another more specific explicit type value defined by a specification profiling this specification.
Authorization grant JWTs not using the explicit type value
MUST be rejected by the authorization server.¶
In Section 3.2 of [RFC7523] (Client Authentication Processing), the following requirement is added:¶
Client authentication JWTs MUST be explicitly typed by using the
typ
header parameter value
client-authentication+jwt
another more specific explicit type value defined by a specification profiling this specification.
Client authentication JWTs not using the explicit type value
MUST be rejected by the authorization server.¶
In Section 4 of [RFC7523] (Authorization Grant Example), the sentence:¶
The intended audience of the JWT is
https://jwt-rp.example.net
, which is an
identifier with which the authorization server identifies itself.¶
is replaced by:¶
The intended audience of the JWT is
https://authz.example.net
,
which is the authorization server's issuer identifier.¶
In the same section, the JWT Claims Set example is replaced by:¶
{"aud":"https://authz.example.net", "iss":"https://jwt-idp.example.com", "sub":"mailto:mike@example.com", "iat":1731721541, "exp":1731725141, "http://claims.example.com/member":true }
In the same section, the sentence:¶
The following example JSON object, used as the header of a
JWT, declares that the JWT is signed with the Elliptic Curve
Digital Signature Algorithm (ECDSA) P-256
SHA-256 using a key identified by the kid
value 16
.¶
is replaced by:¶
The following example JSON object, used as the header parameters of a JWT,
declares that the JWT is an authorization grant JWT,
is signed with the Elliptic Curve Digital Signature Algorithm (ECDSA) P-256 with SHA-256,
and was signed with a key identified by
the kid
value 16
.¶
In the same section, the JOSE Header Parameters example is replaced by:¶
{"typ":"authorization-grant+jwt","alg":"ES256","kid":"16"}
In the same section, the example POST body is replaced by:¶
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer &assertion=eyJ0eXAiOiJhdXRob3JpemF0aW9uLWdyYW50K2p3dCIsImFsZyI6Ik VTMjU2Iiwia2lkIjoiMTYifQ. eyJhdWQiOiJodHRwczovLw[...omitted for brevity...]. J9l-ZhwP[...omitted for brevity...]
In the list of agreements required by participants in Section 5 of [RFC7523] (Interoperability Considerations), "audience identifiers" is removed from the list.¶
This section updates "OAuth 2.0 Pushed Authorization Requests" [RFC9126] to tighten its audience requirements.¶
The paragraph describing the audience value in Section 2 of [RFC9126] (Pushed Authorization Request Endpoint) is replaced by:¶
This update resolves the potential ambiguity regarding
the appropriate audience value to use when employing
JWT client assertion-based authentication
(as defined in Section 2.2 of [RFC7523] with the
private_key_jwt
or
client_secret_jwt
authentication method names
per Section 9 of [OpenID.Core])
that was described in [RFC9126].
To address that ambiguity, the issuer identifier URL
of the authorization server according to [RFC8414]
MUST be used as the sole value of the audience.
The authorization server MUST reject any such JWT that does not
contain its own issuer identifier as the sole audience value.¶
The security considerations described within the following specifications are all applicable to this document: "Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7521], "Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7522], "JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants" [RFC7523], "OAuth 2.0 Pushed Authorization Requests" [RFC9126], "The OAuth 2.0 Authorization Framework" [RFC6749], and "JSON Web Token (JWT)" [JWT].¶
This specification tightens token audience requirements to prevent attacks that could result from exploiting audience ambiguities previously allowed by [RFC7521], [RFC7522], [RFC7523], and [RFC9126]. These attacks are described in [private_key_jwt.Disclosure] and [Audience.Injection].¶
This section registers the following media types [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the manner described in [RFC6838].¶
Type name: application¶
Subtype name: authorization-grant+jwt¶
Required parameters: n/a¶
Optional parameters: n/a¶
Encoding considerations: binary; An authorization grant JWT is a JWT; JWT values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters.¶
Security considerations: See Section 6 of this specification¶
Interoperability considerations: n/a¶
Applications that use this media type: Applications that use this specification¶
Fragment identifier considerations: n/a¶
Additional information:¶
Person & email address to contact for further information:¶
Michael B. Jones, michael_b_jones@hotmail.com¶
Intended usage: COMMON¶
Restrictions on usage: none¶
Author: Michael B. Jones, michael_b_jones@hotmail.com¶
Change controller: IETF¶
Provisional registration? No¶
Type name: application¶
Subtype name: client-authentication+jwt¶
Required parameters: n/a¶
Optional parameters: n/a¶
Encoding considerations: binary; A client authentication JWT is a JWT; JWT values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters.¶
Security considerations: See Section 6 of this specification¶
Interoperability considerations: n/a¶
Applications that use this media type: Applications that use this specification¶
Fragment identifier considerations: n/a¶
Additional information:¶
Person & email address to contact for further information:¶
Michael B. Jones, michael_b_jones@hotmail.com¶
Intended usage: COMMON¶
Restrictions on usage: none¶
Author: Michael B. Jones, michael_b_jones@hotmail.com¶
Change controller: IETF¶
Provisional registration? No¶
[[ to be removed by the RFC Editor before publication as an RFC ]]¶
-01¶
Reworked to make updates to RFC 7523, rather than replacing it.¶
Removed updates to RFC 9101.¶
Added reference to the University of Stuttgart paper [Audience.Injection].¶
-00¶
Initial working group draft, replacing draft-jones-oauth-rfc7523bis-00.¶
We would like to acknowledge the contributions of the following people to this specification: John Bradley, Ralph Bragg, Joseph Heenan, Pedram Hosseyni, Aaron Parecki, Filip Skokan, and Tim Würtele.¶