You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-oauth-attestation-based-client-auth.md
+80-5Lines changed: 80 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,7 @@ The following example is the decoded header and payload of a JWT meeting the pro
204
204
{
205
205
"iss": "https://attester.example.com",
206
206
"sub": "https://client.example.com",
207
+
"iat": 1300814780,
207
208
"nbf": 1300815780,
208
209
"exp": 1300819380,
209
210
"cnf": {
@@ -233,7 +234,6 @@ The following content applies to the JWT Claims Set:
233
234
* `jti`: REQUIRED. The `jti` (JWT identifier) claim MUST specify a unique identifier for the Client Attestation PoP. The authorization server can utilize the `jti` value for replay attack detection, see [](#security-consideration-replay).
234
235
* `iat`: REQUIRED. The `iat` (issued at) claim MUST specify the time at which the Client Attestation PoP was issued. Note that the authorization server may reject JWTs with an "iat" claim value that is unreasonably far in the past.
235
236
* `challenge`: OPTIONAL. The `challenge` (challenge) claim MUST specify a String value that is provided by the authorization server for the client to include in the Client Attestation PoP JWT.
236
-
* `nbf`: OPTIONAL. The `nbf` (not before) claim MUST specify the time before which the Client Attestation PoP MUST NOT be accepted for processing.
237
237
238
238
The following additional rules apply:
239
239
@@ -258,7 +258,7 @@ The following example is the decoded header and payload of a JWT meeting the pro
@@ -325,6 +325,8 @@ To validate an HTTP request which contains the client attestation headers, the r
325
325
2. There is precisely one OAuth-Client-Attestation-PoP HTTP request header field, where its value is a single well-formed JWT conforming to the syntax outlined in [](#client-attestation-pop-jwt).
326
326
3. The signature of the Client Attestation PoP JWT obtained from the OAuth-Client-Attestation-PoP HTTP header verifies with the Client Instance Key contained in the `cnf` claim of the Client Attestation JWT obtained from the OAuth-Client-Attestation HTTP header.
327
327
328
+
Alternatively if client attestations are being used in conjunction with DPoP in the combined mode as specified in [](#combined-dpop) the processing rules as specified in that section apply.
329
+
328
330
When validation errors specifically related to the use of client attestations are encountered the following additional error codes are defined for use in either Authorization Server authenticated endpoint error responses (as defined in Section 5.2 of {{RFC6749}}) or Resource Server error responses (as defined in Section 3 of {{RFC6750}}).
329
331
330
332
- `use_attestation_challenge`MUST be used when the Client Attestation PoP JWT is not using an expected server-provided challenge. When used this error code MUST be accompanied by the `OAuth-Client-Attestation-Challenge` HTTP header field parameter (as described in [](#challenge-header)).
@@ -340,6 +342,8 @@ The Authorization Server MUST perform all of the checks outlined in [](#checking
340
342
341
343
If the token request contains a `client_id` parameter as per {{RFC6749}} the Authorization Server MUST verify that the value of this parameter is the same as the client_id value in the `sub` claim of the Client Attestation and `iss` claim of the Client Attestation PoP.
342
344
345
+
If the Authorization Server supports it, a client MAY instead use the combined client attestation and DPoP mode described in [](#combined-dpop).
346
+
343
347
The following example demonstrates usage of the client attestation mechanism in an access token request (with extra line breaks for display purposes only):
344
348
345
349
~~~
@@ -372,6 +376,8 @@ A Client Attestation can be used at the PAR endpoint instead of alternative clie
372
376
373
377
The Authorization Server MUST perform all of the checks outlined in [](#checking-http-requests-with-client-attestations) for a received PAR request which is making use of the client attestation mechanism as defined by this draft.
374
378
379
+
If the Authorization Server supports it, a client MAY instead use the combined client attestation and DPoP mode described in [](#combined-dpop).
380
+
375
381
The following example demonstrates usage of the client attestation mechanism in a PAR request (with extra line breaks for display purposes only):
## Usage of Client Instance Key as DPoP Key {#combined-dpop}
410
+
411
+
This section defines an OPTIONAL optimization that allows a single Proof of Possession (PoP) JWT to satisfy both (a) the Client Attestation PoP defined in this specification and (b) the DPoP proof defined in {{RFC9449}}. In this "combined mode" the Client Instance Key and the DPoP Key are the same asymmetric key pair, and a request using the mechanism carries only one PoP, the DPoP proof, instead of two separate PoP JWTs (the DPoP proof and Client Attestation PoP).
412
+
413
+
### Validating HTTP requests
414
+
415
+
In order to detect whether this combined mode is being used, the following conditions MUST be met:
416
+
1. There is precisely one OAuth-Client-Attestation HTTP request header field, where its value is a single well-formed JWT conforming to the syntax outlined in [](#client-attestation-jwt).
417
+
2. There is precisely one DPoP HTTP request header field, its value is conforming to the syntax outlined in {{RFC9449}}.
418
+
3. There is no OAuth-Client-Attestation-PoP HTTP request header field present.
419
+
420
+
Provided the above conditions are meet the following additional rules apply:
421
+
1. The public key located in the DPoP proof MUST match the public key located in the `cnf` claim of the Client Attestation JWT.
422
+
2. Beyond what is defined in {{RFC9449}} the following additional claims in the DPoP proof apply.
423
+
* `iss`: REQUIRED. Value is the client_id (matching the `sub` of the Client Attestation JWT).
424
+
3. As per {{RFC9449}} the DPoP proof `typ` header value MUST be `dpop+jwt`.
425
+
426
+
// TODO error handling
427
+
428
+
The following non-normative example shows a token request using combined mode (line breaks for display only):
Implementations should be aware of the trade offs of using this mechanism, namely the benefits are as follows:
464
+
* It authenticates (attests) the DPoP key used for sender-constraining tokens against the Client deployment.
465
+
* It can reduce implementation complexity for both the Client and Authorization Server by reducing the number of JWTs that need to be constructed and or validated in a request.
466
+
467
+
Conversely using this mechanism means the key used for client authentication and token binding is shared, which maybe undesirable depending on the various deployment considerations the Client and or Authorization Server may have.
468
+
403
469
# Concatenated Serialization for Client Attestations {#alternative-representation}
404
470
405
471
A Client Attestation according to this specification MAY be presented using an alternative representation for cases where the header-based mechanism (as introduced in introduced in [](#headers) does not fit the underlying protocols, e.g., for direct calls to Browser APIs.
Upon receiving a Client Attestation, the receiving server MUST ensure the following conditions and rules:
504
570
505
-
1. If the Client Attestation was received via Header based Syntax (as described in [](#header-based)):
571
+
1. If the Client Attestation was received via Header based Syntax (as described in [](#header-based)) the HTTP request MUST conform to exactly one of the following:
506
572
507
-
* The HTTP request contains exactly one field `OAuth-Client-Attestation` and one field `OAuth-Client-Attestation-PoP`.
508
-
* Both fields contain exactly one well-formed JWT.
573
+
* Separate proofs pattern: exactly one field `OAuth-Client-Attestation` and exactly one field `OAuth-Client-Attestation-PoP`, each containing exactly one well-formed JWT; OR
574
+
* Combined DPoP pattern: exactly one field `OAuth-Client-Attestation` and exactly one field `DPoP` meeting the requirements of [](#combined-dpop), and no `OAuth-Client-Attestation-PoP` field present.
509
575
510
576
2. The Client Attestation JWT contains all claims and header parameters as per [](#client-attestation-jwt).
511
577
3. The Client Attestation PoP JWT contains all claims and header parameters as per [](#client-attestation-pop-jwt).
@@ -603,6 +669,15 @@ This specification requests registration of the following values in the IANA "OA
603
669
* Change Controller: IETF
604
670
* Reference: this specification
605
671
672
+
## OAuth Authorization Server Metadata Registration
673
+
674
+
This specification requests registration of the following values in the IANA "OAuth Authorization Server Metadata" registry of {{IANA.OAuth.Params}} established by [RFC8414].
* Metadata Description: JSON Boolean indicating whether the usage of client attestations and dpop together in a combined mode is supported
678
+
* Change Controller: IETF
679
+
* Reference: [](#checking-http-requests-with-client-attestations) of this specification
680
+
606
681
## Registration of attest_jwt_client_auth Token Endpoint Authentication Method
607
682
608
683
This section registers the value "attest_jwt_client_auth" in the IANA "OAuth Token Endpoint Authentication Methods" registry established by OAuth 2.0 Dynamic Client Registration Protocol {{RFC7591}}.
0 commit comments