Additional OAuth Parameters for Authentication and Authorization for Constrained Environments (ACE)CombitechDjäknegatan 31211 35MalmöSwedenludwig.seitz@combitech.com
Security
ACECoAPOAuth 2.0Access ControlAuthorizationInternet of ThingsThis specification defines new parameters and encodings for the OAuth
2.0 token and introspection endpoints when used with the framework for
Authentication and Authorization for Constrained Environments (ACE).
These are used to express the proof-of-possession (PoP) key the client
wishes to use, the PoP key that the authorization server
has selected, and the PoP key the resource server uses to authenticate
to the client.Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 7841.
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
.
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
() 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.
Table of Contents
IntroductionThe Authentication and Authorization for Constrained Environments (ACE)
specification requires some new
parameters for interactions with the OAuth 2.0 token
and introspection endpoints, as well as some new claims to be used in access
tokens. These parameters and claims can also be used in other contexts
and have therefore been put into a dedicated document to
facilitate their use in a manner independent of
.Note that although all examples are shown in Concise Binary Object
Representation (CBOR) , JSON
MAY be used as an alternative for HTTP-based
communications, as specified in .TerminologyThe 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 when, and only when, they appear in all capitals, as shown here.Readers are assumed to be familiar with the terminology from , especially the terminology
for entities in the architecture such as client (C), resource server (RS),
and authorization server (AS).Terminology from is used in the examples,
especially COSE_Key, which is defined in .Note that the term "endpoint" is used here following its OAuth 2.0
definition, which is to denote resources
such as token and introspection at the AS and authz-info at the RS. The Constrained
Application Protocol (CoAP) definition,
which is "[a]n entity participating in the CoAP protocol", is not used in this
specification.Parameters for the Token EndpointThis section defines additional parameters for the interactions with
the token endpoint in the ACE framework .Client-to-AS RequestThis section defines the req_cnf parameter allowing clients to
request a specific PoP key in an access token from a token
endpoint in the ACE framework :
req_cnf
OPTIONAL. This field contains information 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), since the AS is
expected to be able to generate better symmetric keys than a
constrained client. (Note: this does not apply to key identifiers
referencing a symmetric key.) The AS MUST verify that the client
really is in possession of the corresponding key. Profiles of
using this specification
MUST
define the PoP method used by the AS if they allow
clients to use this request parameter. Values of this parameter follow
the syntax and semantics of the cnf claim either from
for CBOR-based
interactions or from
for JSON-based
interactions.
shows a request for an access
token using the req_cnf parameter to request a specific public key as a
PoP key. The content is displayed in CBOR diagnostic
notation with line breaks for better readability.AS-to-Client ResponseThis section defines the following additional parameters for
an AS response to a request to the token endpoint:
cnf
REQUIRED if the token type is "pop" and a symmetric key is used.
MAY be present for asymmetric PoP keys. This field
contains the PoP key that the AS selected for the
token. Values of this parameter follow the syntax and semantics of the
cnf claim either from
for
CBOR-based interactions or from
for JSON-based interactions. See for
additional discussion of the usage of this parameter.
rs_cnf
OPTIONAL if the token type is "pop" and asymmetric keys are used.
MUST NOT be present otherwise. This field contains information about
the public key used by the RS to authenticate. If this parameter is
absent, either the RS does not use a public key or the AS knows that
the RS can authenticate itself to the client without additional
information. Values of this parameter follow the syntax and semantics
of the cnf claim either from
for CBOR-based
interactions or from
for JSON-based
interactions. See
for additional discussion of the usage
of this parameter.
shows an AS response containing
a token and a cnf parameter with a symmetric PoP key. shows an AS response containing
a token bound to a previously requested asymmetric PoP key (not
shown) and an rs_cnf parameter containing the public key of the RS.Parameters for the Introspection EndpointThis section defines the use of CBOR instead of JSON for the cnf
introspection response parameter specified in .If CBOR is used instead of JSON in an interaction with the introspection
endpoint, the AS MUST use the parameter mapping specified in and the value must follow the syntax
of cnf claim values from . shows an AS response to an introspection
request including the cnf parameter to indicate the PoP key bound to the token.Confirmation Method ParametersThe confirmation method parameters are used in
as follows:
req_cnf in the access token request C -> AS, OPTIONAL to
indicate the client's raw public key or the key identifier of a previously
established key between the C and RS that the client wishes to use
for proof of possession of the access token.
cnf in the token response AS -> C, OPTIONAL if using an
asymmetric key or a key that the client requested via a key identifier
in the request. REQUIRED if the client didn't specify a req_cnf and
symmetric keys are used. Used to indicate the symmetric key generated
by the AS for proof of possession of the access token.
cnf in the introspection response AS -> RS, REQUIRED if the
access token that was subject to introspection is a PoP
token, absent otherwise. Indicates the PoP key bound
to the access token.
rs_cnf in the token response AS -> C, OPTIONAL to indicate
the public key of the RS if it uses one to authenticate itself to the client
and the binding between the key and RS identity is not established through
other means.
Note that the COSE_Key structure in a confirmation claim or parameter
may contain an alg or key_ops parameter. If such parameters are
present, a client MUST NOT use a key that is incompatible with
the profile or PoP algorithm according to those
parameters. 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).
If an access token is issued for an audience that includes several RSs,
the rs_cnf parameter MUST NOT be used, since the client cannot
determine for which RS the key applies. This document recommends to
specify a different endpoint that the client can use to acquire RS
authentication keys in such cases. The specification of such an endpoint
is out of scope for this document.CBOR MappingsIf CBOR is used, the new parameters and claims defined in this document
MUST be mapped to CBOR types, as specified in , using the given integer abbreviation for the
map key.
CBOR Mappings for New Parameters and Claims
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
Requirements When Using Asymmetric KeysAn 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.
The reason for this restriction is that the RS has no way of determining
which key to use before the client's identity is established. Therefore,
authentication attempts by the RS could randomly fail based on which key the
RS selects, unless the algorithm negotiation produces a unique choice of key pair
for the RS.Security ConsiderationsThis document is an extension to . All
security considerations from that document apply here as well.Privacy ConsiderationsThis document is an extension to . All
privacy considerations from that document apply here as well.IANA ConsiderationsOAuth Parameter RegistrationThis section registers the following parameters in the "OAuth
Parameters" registry :
Name:
req_cnf
Parameter Usage Location:
token request
Change Controller:
IETF
Reference:
of RFC 9201
Name:
rs_cnf
Parameter Usage Location:
token response
Change Controller:
IETF
Reference:
of RFC 9201
Name:
cnf
Parameter Usage Location:
token response
Change Controller:
IETF
Reference:
of RFC 9201
OAuth Parameters CBOR Mappings RegistrationThis section registers the following parameter mappings
in the "OAuth Parameters CBOR Mappings" registry established in
.
Name:
req_cnf
CBOR Key:
4
Value Type:
map
Reference:
of RFC 9201
Original Specification:
RFC 9201
Name:
cnf
CBOR Key:
8
Value Type:
map
Reference:
of RFC 9201
Original Specification:
RFC 9201
Name:
rs_cnf
CBOR Key:
41
Value Type:
map
Reference:
of RFC 9201
Original Specification:
RFC 9201
OAuth Token Introspection Response CBOR Mappings RegistrationThis section registers the following parameter mapping
in the "OAuth Token Introspection Response CBOR Mappings" registry
established in .
Name:
cnf
CBOR Key:
8
Value Type:
map
Reference:
of RFC 9201
Original Specification:
ReferencesNormative ReferencesOAuth ParametersIANAKey words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.The OAuth 2.0 Authorization FrameworkThe OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. [STANDARDS-TRACK]Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)This specification describes how to declare in a JSON Web Token (JWT) that the presenter of the JWT possesses a particular proof-of- possession key and how the recipient can cryptographically confirm proof of possession of the key by the presenter. Being able to prove possession of a key is also sometimes described as the presenter being a holder-of-key.CBOR Object Signing and Encryption (COSE)Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need for the ability to have basic security services defined for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.Ambiguity of Uppercase vs Lowercase in RFC 2119 Key WordsRFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.The JavaScript Object Notation (JSON) Data Interchange FormatJavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access TokensThis document describes OAuth client authentication and certificate-bound access and refresh tokens using mutual Transport Layer Security (TLS) authentication with X.509 certificates. OAuth clients are provided a mechanism for authentication to the authorization server using mutual TLS, based on either self-signed certificates or public key infrastructure (PKI). OAuth authorization servers are provided a mechanism for binding access tokens to a client's mutual-TLS certificate, and OAuth protected resources are provided a method for ensuring that such an access token presented to it was issued to the client presenting the token.Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)This specification describes how to declare in a CBOR Web Token (CWT) (which is defined by RFC 8392) that the presenter of the CWT possesses a particular proof-of-possession key. Being able to prove possession of a key is also sometimes described as being the holder-of-key. This specification provides equivalent functionality to "Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)" (RFC 7800) but using Concise Binary Object Representation (CBOR) and CWTs rather than JavaScript Object Notation (JSON) and JSON Web Tokens (JWTs).Concise Binary Object Representation (CBOR)The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.Authentication and Authorization for Constrained Environments (ACE) Using the OAuth 2.0 Framework (ACE-OAuth)Informative ReferencesThe Constrained Application Protocol (CoAP)The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks. The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s. The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.AcknowledgmentsThis document is a product of the ACE Working Group of the IETF.
Special thanks to for his thorough review of
this document. worked on this document as part of the
CelticNext projects CyberWI and CRITISEC with funding from Vinnova.Author's AddressCombitechDjäknegatan 31211 35MalmöSwedenludwig.seitz@combitech.com