RFC 9201
Additional OAuth Parameters for Authentication and Authorization for Constrained Environments (ACE)
RFC 9201: Additional OAuth Parameters for Authentication and Authorization for Constrained Environments (ACE) π
Okay bestie, let's get into this one! This RFC is from the IETF (Internet Engineering Task Force), written by L. Seitz of Combitech. It's a Standards Track document, dated August 2022, with ISSN 2070-1721. It doesn't list anything it obsoletes or updates, so it's a standalone thing π¦
Abstract
okay so this spec adds new parameters and encodings for the OAuth 2.0 token and introspection endpoints, but only when you're using the ACE framework (Authentication and Authorization for Constrained Environments) β¨ it's all about three proof-of-possession (PoP) keys: the one the client wants to use, the one the authorization server ends up picking, and the one the resource server uses to prove itself to the client. it's giving key management main character energy π
Status of This Memo
this is an Internet Standards Track document πΈ
it's a product of the IETF, so it represents the consensus of the IETF community. it got public review and was approved for publication by the Internet Engineering Steering Group (IESG). if you want more on Internet Standards, check Section 2 of RFC 7841.
info about the current status, any errata, and how to send feedback lives at https://www.rfc-editor.org/info/rfc9201.
Copyright Notice
Copyright (c) 2022 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) as they stood on the publication date. please read these carefully, because they spell out your rights and restrictions. any Code Components pulled out of this document must include Revised BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Revised BSD License π
Table of Contents
1. Introduction
2. Terminology
3. Parameters for the Token Endpoint
3.1. Client-to-AS Request
3.2. AS-to-Client Response
4. Parameters for the Introspection Endpoint
5. Confirmation Method Parameters
6. CBOR Mappings
7. Requirements When Using Asymmetric Keys
8. Security Considerations
9. Privacy Considerations
10. IANA Considerations
10.1. OAuth Parameter Registration
10.2. OAuth Parameters CBOR Mappings Registration
10.3. OAuth Token Introspection Response CBOR Mappings
Registration
11. References
11.1. Normative References
11.2. Informative References
Acknowledgments
Author's Address
1. Introduction β¨
so the ACE specification [RFC9200] needs some new parameters for talking to the OAuth 2.0 [RFC6749] token and introspection endpoints, plus some new claims for access tokens. these parameters and claims are useful in other contexts too, so they got their own doc. that way they can be used without depending on [RFC9200] π¦
quick note: even though all the examples are in Concise Binary Object Representation (CBOR) [RFC8949], JSON [RFC8259] MAY be used as an alternative for HTTP-based communications, as specified in [RFC9200].
2. Terminology π
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 read as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they show up in all capitals, just like here π«Ά
you're assumed to already know the terminology from [RFC9200], especially the entities in the architecture: client (C), resource server (RS), and authorization server (AS).
the examples use terminology from [RFC8152], especially COSE_Key, which is defined in Section 7 of [RFC8152].
also, the word "endpoint" is used here following its OAuth 2.0 [RFC6749] definition, meaning resources like token and introspection at the AS, and authz-info at the RS. the Constrained Application Protocol (CoAP) [RFC7252] definition, which is "[a]n entity participating in the CoAP protocol", is NOT what we're using here π ββοΈ
3. Parameters for the Token Endpoint π
this section adds more parameters for interactions with the token endpoint in the ACE framework [RFC9200].
3.1. Client-to-AS Request π
this section defines the req_cnf parameter, which lets clients ask for a specific PoP key in an access token from a token endpoint in the ACE framework [RFC9200]:
req_cnf: this one is OPTIONAL. it holds info about the key the client would like to bind to the access token for proof of possession. it is RECOMMENDED that an AS rejects a request containing a symmetric key value in the req_cnf field (kty=Symmetric), because the AS is expected to make way better symmetric keys than a constrained client can π
(quick note: this doesn't apply to key identifiers that reference a symmetric key.) the AS MUST verify that the client really is in possession of the corresponding key. profiles of [RFC9200] that use this spec MUST define the PoP method the AS uses if they let clients use this request parameter. the values follow the syntax and semantics of the cnf claim, either from Section 3.1 of [RFC8747] for CBOR-based interactions or from Section 3.1 of [RFC7800] for JSON-based interactions.
Figure 1 shows a request for an access token that uses req_cnf to ask for a specific public key as the PoP key. the content is in CBOR diagnostic notation, with line breaks so it's easier to read π
Header: POST (Code=0.02)
Uri-Host: "as.example.com"
Uri-Path: "token"
Content-Format: application/ace+cbor
Payload:
{
/ req_cnf / 4 : {
/ COSE_Key / 1 : {
/ kty / 1 : 2 /EC2/,
/ kid / 2 : h'11',
/ crv / -1 : 1 /P-256/,
/ x / -2 : h'BAC5B11CAD8F99F9C72B05CF4B9E26D24
4DC189F745228255A219A86D6A09EFF',
/ y / -3 : h'20138BF82DC1B6D562BE0FA54AB7804A3
A64B6D72CCFED6B6FB6ED28BBFC117E'
}
}
}
Figure 1: Example Request for an Access Token Bound to an
Asymmetric Key
3.2. AS-to-Client Response π¦
this section adds the following extra parameters for an AS response to a request sent to the token endpoint:
cnf: this one is REQUIRED if the token type is "pop" and a symmetric key is used. it MAY be present for asymmetric PoP keys. this field holds the PoP key the AS selected for the token. the values follow the syntax and semantics of the cnf claim, either from Section 3.1 of [RFC8747] for CBOR-based interactions or from Section 3.1 of [RFC7800] for JSON-based interactions. see Section 5 for more on how this parameter gets used πΈ
rs_cnf: this one is OPTIONAL if the token type is "pop" and asymmetric keys are used. it MUST NOT be present otherwise. this field holds info about the public key the RS uses to authenticate. if this parameter is missing, either the RS doesn't use a public key, or the AS knows the RS can authenticate itself to the client without extra info. the values follow the syntax and semantics of the cnf claim, either from Section 3.1 of [RFC8747] for CBOR-based interactions or from Section 3.1 of [RFC7800] for JSON-based interactions. see Section 5 for more on how this parameter gets used β¨
Figure 2 shows an AS response with a token and a cnf parameter holding a symmetric PoP key π₯
Header: Created (Code=2.01)
Content-Format: application/ace+cbor
Payload:
{
/ access_token / 1 : h'4A5015DF686428/...
(remainder of CWT omitted for brevity;
CWT contains COSE_Key in the "cnf" claim)/',
/ cnf / 8 : {
/ COSE_Key / 1 : {
/ kty / 1 : 4 / Symmetric /,
/ kid / 2 : h'DFD1AA97',
/ k / -1 : h'849B5786457C1491BE3A76DCEA6C427108'
}
}
}
Figure 2: Example AS Response with an Access Token Bound to a
Symmetric Key
Figure 3 shows an AS response with a token bound to a previously requested asymmetric PoP key (not shown), plus an rs_cnf parameter holding the RS's public key π
Header: Created (Code=2.01)
Content-Format: application/ace+cbor
Payload:
{
/ access_token / 1 : h'D08343A1010AA1054D2A45DF6FBC5A5A/...
(remainder of CWT omitted for brevity)/',
/ rs_cnf / 41 : {
/ COSE_Key / 1 : {
/ kty / 1 : 2 /EC2/,
/ kid / 2 : h'12',
/ crv / -1 : 1 /P-256/,
/ x / -2 : h'BCEE7EAAC162F91E6F330F5771211E220
B8B546C96589B0AC4AD0FD24C77E1F1',
/ y / -3 : h'C647B38C55EFBBC4E62E651720F002D5D
75B2E0C02CD1326E662BCA222B90416'
}
}
}
Figure 3: Example AS Response Including the RS's Public Key
4. Parameters for the Introspection Endpoint π§
this section is all about using CBOR instead of JSON for the cnf introspection response parameter, which is specified in Section 9.4 of [RFC8705] π
if CBOR is used instead of JSON in an interaction with the introspection endpoint, the AS MUST use the parameter mapping specified in Table 1, and the value must follow the syntax of cnf claim values from Section 3.1 of [RFC8747].
Figure 4 shows an AS response to an introspection request that includes the cnf parameter, to show which PoP key is bound to the token β¨
Header: Created (Code=2.01)
Content-Format: application/ace+cbor
Payload:
{
/ active / 10 : true,
/ scope / 9 : "read",
/ aud / 3 : "tempSensor4711",
/ cnf / 8 : {
/ COSE_Key / 1 : {
/ kty / 1 : 2 /EC2/,
/ kid / 2 : h'11',
/ crv / -1 : 1 /P-256/,
/ x / -2 : h'BAC5B11CAD8F99F9C72B05CF4B9E26D24
4DC189F745228255A219A86D6A09EFF',
/ y / -3 : h'20138BF82DC1B6D562BE0FA54AB7804A3
A64B6D72CCFED6B6FB6ED28BBFC117E'
}
}
}
Figure 4: Example Introspection Response
- Confirmation Method Parameters β¨
The confirmation method parameters get used in [RFC9200] like this, bestie π
req_cnfin the access token request C -> AS is OPTIONAL. It's how the client says "hey, this is the raw public key, or the key ID of one we already set up between C and RS, that I want to use for proof of possession of the access token" πcnfin the token response AS -> C is OPTIONAL if you're using an asymmetric key, or a key the client asked for via a key ID in the request. It's REQUIRED if the client didn't send areq_cnfand symmetric keys are in play. It's the symmetric key the AS generated for proof of possession of the access token π¦cnfin the introspection response AS -> RS is REQUIRED if the access token being introspected is a PoP token, and absent otherwise. It shows which PoP key is bound to the access token πΈrs_cnfin the token response AS -> C is OPTIONAL. It carries the RS's public key if the RS uses one to authenticate itself to the client, and the binding between that key and the RS identity isn't established some other way π§
Note that a COSE_Key structure in a confirmation claim or parameter might have an alg or key_ops parameter in it. If those are present, a client MUST NOT use a key that doesn't fit the profile or PoP algorithm they describe. An RS MUST reject a proof of possession using such a key with a response code equivalent to the CoAP code 4.00 (Bad Request). No cap, that's a hard rule π
ββοΈπ
If an access token is issued for an audience with several RSs in it, the rs_cnf parameter MUST NOT be used, because the client can't tell which RS the key is for π This document recommends specifying a different endpoint the client can use to get RS authentication keys in those cases. Specifying that endpoint is out of scope for this document π
- CBOR Mappings π
If CBOR is used, the new parameters and claims defined in this document MUST be mapped to CBOR types, as specified in Table 1, using the given integer abbreviation for the map key. Here's the table, periodt:
+=========+==========+============+========================+
| Name | CBOR Key | Value Type | Usage |
+=========+==========+============+========================+
| req_cnf | 4 | map | token request |
+---------+----------+------------+------------------------+
| cnf | 8 | map | token response |
+---------+----------+------------+------------------------+
| cnf | 8 | map | introspection response |
+---------+----------+------------+------------------------+
| rs_cnf | 41 | map | token response |
+---------+----------+------------+------------------------+
Table 1: CBOR Mappings for New Parameters and Claims
- Requirements When Using Asymmetric Keys π
An RS using asymmetric keys to authenticate to the client MUST NOT hold several different asymmetric key pairs applicable to the same authentication algorithm. For example, when using DTLS, the RS MUST NOT hold several asymmetric key pairs applicable to the same cipher suite. Why? The RS has no way of figuring out which key to use before the client's identity is established. So authentication attempts by the RS could randomly fail depending on which key it picks, unless the algorithm negotiation produces a unique choice of key pair for the RS. Lowkey chaotic, so don't do it πβ¨
- Security Considerations π¨
This document is an extension to [RFC9200]. All security considerations from that document apply here as well. Read RFC 9200's security section, it's serious business ππ«Ά
- Privacy Considerations π
This document is an extension to [RFC9200]. All privacy considerations from that document apply here as well. Same energy as the security stuff, so go check RFC 9200 π
- IANA Considerations π
10.1. OAuth Parameter Registration
This section registers the following parameters in the "OAuth Parameters" registry [IANA.OAuthParameters]:
Name: req_cnf
Parameter Usage Location: token request
Change Controller: IETF
Reference: Section 5 of RFC 9201
Name: rs_cnf
Parameter Usage Location: token response
Change Controller: IETF
Reference: Section 5 of RFC 9201
Name: cnf
Parameter Usage Location: token response
Change Controller: IETF
Reference: Section 5 of RFC 9201
10.2. OAuth Parameters CBOR Mappings Registration
This section registers the following parameter mappings in the "OAuth Parameters CBOR Mappings" registry established in Section 8.10 of [RFC9200].
Name: req_cnf
CBOR Key: 4
Value Type: map
Reference: Section 3.1 of RFC 9201
Original Specification: RFC 9201
Name: cnf
CBOR Key: 8
Value Type: map
Reference: Section 3.2 of RFC 9201
Original Specification: RFC 9201
Name: rs_cnf
CBOR Key: 41
Value Type: map
Reference: Section 3.2 of RFC 9201
Original Specification: RFC 9201
10.3. OAuth Token Introspection Response CBOR Mappings Registration
This section registers the following parameter mapping in the "OAuth Token Introspection Response CBOR Mappings" registry established in Section 8.12 of [RFC9200].
Name: cnf
CBOR Key: 8
Value Type: map
Reference: Section 4 of RFC 9201
Original Specification: [RFC8705]
- References π
11.1. Normative References
[IANA.OAuthParameters]
IANA, "OAuth Parameters",
<https://www.iana.org/assignments/oauth-parameters>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012,
<https://www.rfc-editor.org/info/rfc6749>.
[RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of-
Possession Key Semantics for JSON Web Tokens (JWTs)",
RFC 7800, DOI 10.17487/RFC7800, April 2016,
<https://www.rfc-editor.org/info/rfc7800>.
[RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
RFC 8152, DOI 10.17487/RFC8152, July 2017,
<https://www.rfc-editor.org/info/rfc8152>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
[RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T.
Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication
and Certificate-Bound Access Tokens", RFC 8705,
DOI 10.17487/RFC8705, February 2020,
<https://www.rfc-editor.org/info/rfc8705>.
[RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
Tschofenig, "Proof-of-Possession Key Semantics for CBOR
Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March
2020, <https://www.rfc-editor.org/info/rfc8747>.
[RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", STD 94, RFC 8949,
DOI 10.17487/RFC8949, December 2020,
<https://www.rfc-editor.org/info/rfc8949>.
[RFC9200] Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and
H. Tschofenig, "Authentication and Authorization for
Constrained Environments (ACE) Using the OAuth 2.0
Framework (ACE-OAuth)", RFC 9200, DOI 10.17487/RFC9200,
August 2022, <https://www.rfc-editor.org/info/rfc9200>.
11.2. Informative References
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>.
Acknowledgments π«Ά
This document is a product of the ACE Working Group of the IETF. Special thanks to Brian Campbell for his thorough review of this document.
Ludwig Seitz worked on this document as part of the CelticNext projects CyberWI and CRITISEC with funding from Vinnova.
Author's Address π
Ludwig Seitz
Combitech
DjΓ€knegatan 31
SE-211 35 MalmΓΆ
Sweden
Email: ludwig.seitz@combitech.com
π¦ where this page comes from
- ietf: rfc9201 2022-08
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms