Skip to content

Commit cfd3a6d

Browse files
committed
Incorporate Aaron Parecki's review suggestions
1 parent 64ebc82 commit cfd3a6d

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

draft-ietf-oauth-rfc8725bis.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,22 @@ informative:
125125
date: December 2023
126126
target: https://openid.net/specs/openid-connect-core-1_0.html
127127
title: OpenID Connect Core 1.0 incorporating errata set 2
128+
OpenID.Backchannel:
129+
author:
130+
- ins: M. Jones
131+
name: Michael B. Jones
132+
- ins: J. Bradley
133+
name: John Bradley
134+
date: December 2023
135+
target: https://openid.net/specs/openid-connect-backchannel-1_0.html
136+
title: OpenID Connect Back-Channel Logout 1.0 incorporating errata set 1
128137
RFC6749:
129138
RFC7159:
130139
RFC7517:
131140
RFC8414:
132141
RFC8417:
142+
RFC9068:
143+
RFC9700:
133144
Sanso:
134145
author:
135146
- ins: A. Sanso
@@ -188,10 +199,10 @@ that contain a set of claims that can be signed and/or encrypted.
188199
The JWT specification has seen rapid adoption because it encapsulates
189200
security-relevant information in one easy-to-protect location, and because
190201
it is easy to implement using widely available tools.
191-
One application area in which JWTs are commonly used is representing digital identity information,
192-
such as OpenID Connect ID Tokens {{OpenID.Core}}
193-
and OAuth 2.0 {{RFC6749}} access tokens and
194-
refresh tokens, the details of which are deployment-specific.
202+
One application area in which JWTs are commonly used is
203+
representing authorization information, such as OAuth 2.0 access tokens {{RFC9068}},
204+
and identity information, such as OpenID Connect ID Tokens {{OpenID.Core}}.
205+
The details of these uses are application- and deployment-specific.
195206

196207
Since the JWT specification was published, there have been several widely published
197208
attacks on implementations and deployments.
@@ -515,7 +526,8 @@ without new algorithm identifiers being required.
515526
All cryptographic operations used in the JWT MUST be validated and the entire JWT MUST be rejected
516527
if any of them fail to validate.
517528
This is true not only of JWTs with a single set of Header Parameters
518-
but also for Nested JWTs in which both outer and inner operations MUST be validated
529+
but also for Nested JWTs, as defined in {{Section 2 of RFC7519}},
530+
in which both outer and inner operations MUST be validated
519531
using the keys and algorithms supplied by the application.
520532

521533
Libraries MUST allow the verifier to distinguish between signed JWTs (JWSes) and encrypted JWTs (JWEs).
@@ -593,17 +605,19 @@ used for the cryptographic operations in the JWT belong to the issuer.
593605
If they do not, the application MUST reject the JWT.
594606

595607
The means of determining the keys owned by an issuer is application-specific.
596-
As one example, OpenID Connect {{OpenID.Core}}
597-
issuer values are "https" URLs
608+
As one example, OAuth 2.0 authorization server issuer values {{RFC8414}}
609+
are "https" URLs
598610
that reference a JSON metadata document that contains a "jwks_uri" value that is
599611
an "https" URL from which the issuer's keys are retrieved as a JWK Set {{RFC7517}}.
600-
This same mechanism is used by {{RFC8414}}.
612+
This same mechanism is used by OpenID Connect {{OpenID.Core}}.
601613
Other applications may use different means of binding keys to issuers.
602614

603615
Similarly, when the JWT contains a "sub" (subject) claim, the
604616
application MUST validate that
605617
the subject value corresponds to a valid subject and/or issuer-subject pair at the application.
606618
This may include confirming that the issuer is trusted by the application.
619+
Note that {{Section 4.15 of RFC9700}} discusses the possibility of
620+
confusing user identifier and client ID values.
607621
If the issuer, subject, or the pair are invalid, the application
608622
MUST reject the JWT.
609623

@@ -633,10 +647,14 @@ and/or sanitizing the received value.
633647
Similarly, blindly following a "jku" (JWK set URL) or "x5u" (X.509 URL) header,
634648
which may contain an arbitrary URL,
635649
could result in server-side request forgery (SSRF) attacks. Applications SHOULD protect against such
636-
attacks, e.g., by matching the URL to a whitelist of allowed locations
650+
attacks, e.g., by matching the URL to an allowlist of permitted locations
637651
and ensuring no cookies are sent in the GET request.
638652

639-
653+
Likewise, the authorization server SHOULD check what a hostname resolves to
654+
and avoid making a request if it resolves to a loopback or local IP address.
655+
An example of this is when "attacker.example.com/etc/passwd" is used
656+
as the "jwks_uri" value and there is a DNS entry for "attacker.example.com"
657+
that resolves to "127.0.0.1" or other local IP address values.
640658

641659

642660
## Use Explicit Typing {#use-typ}
@@ -651,6 +669,14 @@ For instance, the {{RFC8417}} specification uses
651669
the "application/secevent+jwt" media type
652670
to perform explicit typing of Security Event Tokens (SETs).
653671

672+
An example of an ad-hoc means of preventing confusion
673+
between different kinds of JWTs is the requirement in
674+
Logout Tokens {{OpenID.Backchannel}} prohibiting the inclusion of a "nonce" claim
675+
so that Logout Tokens will fail the validation rules for ID Tokens {{OpenID.Core}}.
676+
The use of explicit typing avoids the need for employing such ad-hoc mechanisms
677+
when the validation rules for both kind of JWTs include validating the "typ" values
678+
and the acceptable "typ" values for the two kinds of JWTs are distinct.
679+
654680
Per the definition of "typ" in Section 4.1.9 of [RFC7515], it is RECOMMENDED that the "application/" prefix
655681
be omitted from the "typ" Header Parameter value, compared to the associated media type.
656682
Therefore, for example, the "typ" value used to explicitly include a type for a SET SHOULD be "secevent+jwt".
@@ -801,6 +827,10 @@ This document obsoletes RFC 8725 and provides several significant improvements a
801827

802828
[[Note to RFC Editor: please remove before publication.]]
803829

830+
## draft-ietf-oauth-rfc8725bis-02
831+
832+
* Incorporated Aaron Parecki's review suggestions.
833+
804834
## draft-ietf-oauth-rfc8725bis-01
805835

806836
* Applied editorial suggestions by Dan Moore.

0 commit comments

Comments
 (0)