Skip to content

Commit 5d16432

Browse files
authored
Merge pull request #92 from oauth-wg/pb/typ_values
add typ values
2 parents 0bc7bce + 9af6469 commit 5d16432

File tree

1 file changed

+34
-65
lines changed

1 file changed

+34
-65
lines changed

draft-ietf-oauth-attestation-based-client-auth.md

Lines changed: 34 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -131,76 +131,40 @@ The Remote Attestation Procedures (RATS) architecture defined by {{RFC9334}} has
131131
- a RATS "Attestion Result" relates to the "Client Attestation JWT" defined by this specification
132132
- a RATS "Endorser", "Reference Value Provider", "Endorsement", "Evidence" and "Policies and Reference Values" are out of scope for this specification
133133

134-
# Client Attestation
135-
136-
This draft introduces the concept of client attestations to the OAuth 2 protocol, using two JWTs: a Client Attestation and a Client Attestation Proof of Possession (PoP). These JWTs are transmitted via HTTP headers in an HTTP request from a Client Instance to an Authorization Server or Resource Server. The primary purpose of these headers is to authenticate the Client Instance.
137-
138-
## Client Attestation HTTP Headers {#headers}
139-
140-
A Client Attestation JWT and Client Attestation PoP JWT is included in an HTTP request using the following request header fields.
141-
142-
OAuth-Client-Attestation:
143-
: A JWT that conforms to the structure and syntax as defined in [](#client-attestation-jwt)
144-
145-
OAuth-Client-Attestation-PoP:
146-
: A JWT that adheres to the structure and syntax as defined in [](#client-attestation-pop-jwt)
147-
148-
The following is an example of the OAuth-Client-Attestation header.
149-
150-
~~~
151-
OAuth-Client-Attestation: eyJhbGciOiAiRVMyNTYiLCJraWQiOiAiMTEifQ.eyJ\
152-
pc3MiOiJodHRwczovL2NsaWVudC5leGFtcGxlLmNvbSIsInN1YiI6Imh0dHBzOi8vY2x\
153-
pZW50LmV4YW1wbGUuY29tIiwibmJmIjoxMzAwODE1NzgwLCJleHAiOjEzMDA4MTkzODA\
154-
sImNuZiI6eyJqd2siOnsia3R5IjoiRUMiLCJ1c2UiOiJzaWciLCJjcnYiOiJQLTI1NiI\
155-
sIngiOiIxOHdITGVJZ1c5d1ZONlZEMVR4Z3BxeTJMc3pZa01mNko4bmpWQWlidmhNIiw\
156-
ieSI6Ii1WNGRTNFVhTE1nUF80Zlk0ajhpcjdjbDFUWGxGZEFnY3g1NW83VGtjU0EifX1\
157-
9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
158-
~~~
159-
160-
The following is an example of the OAuth-Client-Attestation-PoP header.
161-
162-
~~~
163-
OAuth-Client-Attestation-PoP: eyJhbGciOiJFUzI1NiJ9.ewogICJpc3MiOiAia\
164-
HR0cHM6Ly9jbGllbnQuZXhhbXBsZS5jb20iLAogICJhdWQiOiAi\aHR0cHM6Ly9hcy5l\
165-
eGFtcGxlLmNvbSIsCiAgIm5iZiI6MTMwMDgxNTc4MCwKICAiZXhwIjoxMzAwODE5Mzgw\
166-
LAogICJqdGkiOiAiZDI1ZDAwYWItNTUyYi00NmZjLWFlMTktOThmNDQwZjI1MDY0IiwK\
167-
ICAibm9uY2UiIDogIjVjMWE5ZTEwLTI5ZmYtNGMyYi1hZTczLTU3YzA5NTdjMDljNCIK\
168-
fQ.coB_mtdXwvi9RxSMzbIey8GVVQLv9qQrBUqmc1qj9Bs
169-
~~~
170-
171-
Note that per {{RFC9110}} header field names are case-insensitive; so OAUTH-CLIENT-ATTESTATION, oauth-client-attestation, etc., are all valid and equivalent
172-
header field names. Case is significant in the header field value, however.
173-
174134
# Client Attestation Format
175135

176136
This draft introduces the concept of client attestations to the OAuth 2 protocol, using two JWTs: a Client Attestation and a Client Attestation Proof of Possession (PoP). The primary purpose of these JWTs is to authenticate the Client Instance. These JWTs can be transmitted via HTTP headers in an HTTP request (as described in [](#headers)) from a Client Instance to an Authorization Server or Resource Server, or via a concatenated serialization (as described in [](#alternative-representation)) to enable usage outside of the traditional OAuth2 ecosystem .
177137

178138
## Client Attestation JWT {#client-attestation-jwt}
179139

180-
The following rules apply to validating the Client Attestation JWT. Application of additional restrictions and policy are at the discretion of the Authorization Server.
181-
182-
1. The JWT MUST contain an "iss" (issuer) claim that contains a unique identifier for the entity that issued the JWT. In the absence of an application profile specifying otherwise, compliant applications MUST compare issuer values using the Simple String Comparison method defined in Section 6.2.1 of {{RFC3986}}.
140+
The Client Attestation MUST be encoded as a "JSON Web Token (JWT)" according to {{RFC7519}}.
183141

184-
2. The JWT MUST contain a "sub" (subject) claim with a value corresponding to the "client_id" of the OAuth client.
142+
The following content applies to the JWT Header:
185143

186-
3. The JWT MUST contain an "exp" (expiration time) claim that limits the time window during which the JWT can be used. The authorization server MUST reject any JWT with an expiration time that has passed, subject to allowable clock skew between systems.
144+
* `typ`: REQUIRED. The JWT type MUST be `oauth-client-attestation+jwt`.
187145

188-
4. The JWT MUST contain an "cnf" claim conforming {{RFC7800}} that conveys the key to be used for producing the client attestation pop for client authentication with an authorization server. The key MUST be expressed using the "jwk" representation.
146+
The following content applies to the JWT Claims Set:
189147

190-
5. The JWT MAY contain an "nbf" (not before) claim that identifies the time before which the token MUST NOT be accepted for processing.
148+
* `iss`: REQUIRED. The `iss` (subject) claim MUST contains a unique identifier for the entity that issued the JWT. In the absence of an application profile specifying otherwise, compliant applications MUST compare issuer values using the Simple String Comparison method defined in Section 6.2.1 of {{RFC3986}}.
149+
* `sub`: REQUIRED. The `sub` (subject) claim MUST specify client_id value of the OAuth Client.
150+
* `exp`: REQUIRED. The `exp` (expiration time) claim MUST specify the time at which the Client Attestation is considered expired by its issuer. The authorization server MUST reject any JWT with an expiration time that has passed, subject to allowable clock skew between systems.
151+
* `cnf`: REQUIRED. The `cnf` (confirmation) claim MUST specify a key conforming to {{RFC7800}} that is used by the Client Instance to generate the Client Attestation PoP JWT for client authentication with an authorization server. The key MUST be expressed using the "jwk" representation.
152+
* `iat`: OPTIONAL. The `iat` (issued at) claim MUST specify the time at which the Client Attestation was issued.
153+
* `nbf`: OPTIONAL. The `nbf` (not before) claim MUST specify the time before which the Client Attestation MUST NOT be accepted for processing.
191154

192-
6. The JWT MAY contain an "iat" (issued at) claim that identifies the time at which the JWT was issued.
155+
The following additional rules apply:
193156

194-
7. The JWT MAY contain other claims.
157+
1. The JWT MAY contain other claims. All claims that are not understood by implementations MUST be ignored.
195158

196-
8. The JWT MUST be digitally signed using an asymmetric cryptographic algorithm. The authorization server MUST reject the JWT if it is using a Message Authentication Code (MAC) based algorithm. The authorization server MUST reject JWTs with an invalid signature.
159+
2. The JWT MUST be digitally signed using an asymmetric cryptographic algorithm. The authorization server MUST reject the JWT if it is using a Message Authentication Code (MAC) based algorithm. The authorization server MUST reject JWTs with an invalid signature.
197160

198-
9. The authorization server MUST reject a JWT that is not valid in all other respects per "JSON Web Token (JWT)" {{RFC7519}}.
161+
3. The authorization server MUST reject a JWT that is not valid in all other respects per "JSON Web Token (JWT)" {{RFC7519}}.
199162

200163
The following example is the decoded header and payload of a JWT meeting the processing rules as defined above.
201164

202165
~~~
203166
{
167+
"typ": "oauth-client-attestation+jwt"
204168
"alg": "ES256",
205169
"kid": "11"
206170
}
@@ -224,34 +188,37 @@ The following example is the decoded header and payload of a JWT meeting the pro
224188

225189
## Client Attestation PoP JWT {#client-attestation-pop-jwt}
226190

227-
The following rules apply to validating the Client Attestation PoP JWT. Application of additional restrictions and policy are at the discretion of the Authorization Server.
228-
229-
1. The JWT MUST contain an "iss" (issuer) claim with a value corresponding to the "client_id" of the OAuth client.
230-
231-
2. The JWT MUST contain an "exp" (expiration time) claim that limits the time window during which the JWT can be used. The authorization server MUST reject any JWT with an expiration time that has passed, subject to allowable clock skew between systems. Note that the authorization server may reject JWTs with an "exp" claim value that is unreasonably far in the future.
191+
The Client Attestation PoP MUST be encoded as a "JSON Web Token (JWT)" according to {{RFC7519}}.
232192

233-
3. The JWT MUST contain a "jti" (JWT ID) claim that provides a unique identifier for the token. The authorization server MAY ensure that JWTs are not replayed by maintaining the set of used "jti" values for the length of time for which the JWT would be considered valid based on the applicable "exp" instant.
193+
The following content applies to the JWT Header:
234194

235-
4. The JWT MUST contain an "aud" (audience) claim containing a value that identifies the authorization server as an intended audience. The {{RFC8414}} issuer identifier URL of the authorization server MUST be used as a value for an "aud" element to identify the authorization server as the intended audience of the JWT.
195+
* `typ`: REQUIRED. The JWT type MUST be `oauth-client-attestation-pop+jwt`.
236196

237-
5. The JWT MAY contain an "nonce" claim containing a String value that is provided by the authorization server to associate the Client Attestation PoP JWT with a particular transaction and prevent replay attacks.
197+
The following content applies to the JWT Claims Set:
238198

239-
6. The JWT MAY contain an "nbf" (not before) claim that identifies the time before which the token MUST NOT be accepted for processing.
199+
* `iss`: REQUIRED. The `iss` (subject) claim MUST specify client_id value of the OAuth Client.
200+
* `exp`: REQUIRED. The `exp` (expiration time) claim MUST specify the time at which the Client Attestation PoP is considered expired. The authorization server MUST reject any JWT with an expiration time that has passed, subject to allowable clock skew between systems. Note that the authorization server may reject JWTs with an "exp" claim value that is unreasonably far in the future.
201+
* `aud`: REQUIRED. The `aud` (audience) claim MUST specify a value that identifies the authorization server as an intended audience. The {{RFC8414}} issuer identifier URL of the authorization server MUST be used as a value for an "aud" element to identify the authorization server as the intended audience of the JWT.
202+
* `jti`: REQUIRED. The `jti` (JWT identifier) claim MUST specify a unique identifier for the Client Attestation PoP. The authorization server MAY ensure that JWTs are not replayed by maintaining the set of used "jti" values for the length of time for which the JWT would be considered valid based on the applicable "exp" instant.
203+
* `nonce`: OPTIONAL. The `nonce` (nonce) claim MUST specify a String value that is provided by the authorization server to associate the Client Attestation PoP JWT with a particular transaction and prevent replay attacks.
204+
* `iat`: OPTIONAL. 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.
205+
* `nbf`: OPTIONAL. The `nbf` (not before) claim MUST specify the time before which the Client Attestation PoP MUST NOT be accepted for processing.
240206

241-
7. The JWT MAY contain an "iat" (issued at) claim that identifies the time at which the JWT was issued. Note that the authorization server may reject JWTs with an "iat" claim value that is unreasonably far in the past.
207+
The following additional rules apply:
242208

243-
8. The JWT MAY contain other claims.
209+
1. The JWT MAY contain other claims. All claims that are not understood by implementations MUST be ignored.
244210

245-
9. The JWT MUST be digitally signed using an asymmetric cryptographic algorithm. The authorization server MUST reject the JWT if it is using a Message Authentication Code (MAC) based algorithm. The authorization server MUST reject JWTs with an invalid signature.
211+
2. The JWT MUST be digitally signed using an asymmetric cryptographic algorithm. The authorization server MUST reject the JWT if it is using a Message Authentication Code (MAC) based algorithm. The authorization server MUST reject JWTs with an invalid signature.
246212

247-
10. The public key used to verify the JWT MUST be the key located in the "cnf" claim of the corresponding Client Attestation JWT.
213+
3. The public key used to verify the JWT MUST be the key located in the "cnf" claim of the corresponding Client Attestation JWT.
248214

249-
11. The Authorization Server MUST reject a JWT that is not valid in all other respects per "JSON Web Token (JWT)" {{RFC7519}}.
215+
4. The Authorization Server MUST reject a JWT that is not valid in all other respects per "JSON Web Token (JWT)" {{RFC7519}}.
250216

251217
The following example is the decoded header and payload of a JWT meeting the processing rules as defined above.
252218

253219
~~~
254220
{
221+
"typ": "oauth-client-attestation-pop",
255222
"alg": "ES256"
256223
}
257224
.
@@ -527,6 +494,8 @@ This non-normative example shows a client attestations used as an wallet instanc
527494

528495
-04
529496

497+
* restructured JWT Claims for better readability
498+
* added JOSE typ values for Client Attestation and Client Attestation PoP
530499
* add RATS relation
531500
* add concatenated representation without headers
532501
* add PAR endpoint example

0 commit comments

Comments
 (0)