draft-ietf-ace-oscore-profile-17.txt   draft-ietf-ace-oscore-profile-18.txt 
ACE Working Group F. Palombini ACE Working Group F. Palombini
Internet-Draft Ericsson AB Internet-Draft Ericsson AB
Intended status: Standards Track L. Seitz Intended status: Standards Track L. Seitz
Expires: September 9, 2021 Combitech Expires: 16 October 2021 Combitech
G. Selander G. Selander
Ericsson AB Ericsson AB
M. Gunnarsson M. Gunnarsson
RISE RISE
March 8, 2021 14 April 2021
OSCORE Profile of the Authentication and Authorization for Constrained OSCORE Profile of the Authentication and Authorization for Constrained
Environments Framework Environments Framework
draft-ietf-ace-oscore-profile-17 draft-ietf-ace-oscore-profile-18
Abstract Abstract
This memo specifies a profile for the Authentication and This document specifies a profile for the Authentication and
Authorization for Constrained Environments (ACE) framework. It Authorization for Constrained Environments (ACE) framework. It
utilizes Object Security for Constrained RESTful Environments utilizes Object Security for Constrained RESTful Environments
(OSCORE) to provide communication security and proof-of-possession (OSCORE) to provide communication security and proof-of-possession
for a key owned by the client and bound to an OAuth 2.0 access token. for a key owned by the client and bound to an OAuth 2.0 access token.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 9, 2021. This Internet-Draft will expire on 16 October 2021.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents (https://trustee.ietf.org/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect Please review these documents carefully, as they describe your rights
to this document. Code Components extracted from this document must and restrictions with respect to this document. Code Components
include Simplified BSD License text as described in Section 4.e of extracted from this document must include Simplified BSD License text
the Trust Legal Provisions and are provided without warranty as as described in Section 4.e of the Trust Legal Provisions and are
described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 4 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 4
3. Client-AS Communication . . . . . . . . . . . . . . . . . . . 6 3. Client-AS Communication . . . . . . . . . . . . . . . . . . . 7
3.1. C-to-AS: POST to token endpoint . . . . . . . . . . . . . 7 3.1. C-to-AS: POST to token endpoint . . . . . . . . . . . . . 7
3.2. AS-to-C: Access Token . . . . . . . . . . . . . . . . . . 8 3.2. AS-to-C: Access Token . . . . . . . . . . . . . . . . . . 9
3.2.1. The OSCORE_Input_Material . . . . . . . . . . . . . . 12 3.2.1. The OSCORE_Input_Material . . . . . . . . . . . . . . 13
4. Client-RS Communication . . . . . . . . . . . . . . . . . . . 15 4. Client-RS Communication . . . . . . . . . . . . . . . . . . . 16
4.1. C-to-RS: POST to authz-info endpoint . . . . . . . . . . 16 4.1. C-to-RS: POST to authz-info endpoint . . . . . . . . . . 16
4.1.1. The Nonce 1 Parameter . . . . . . . . . . . . . . . . 17 4.1.1. The Nonce 1 Parameter . . . . . . . . . . . . . . . . 18
4.1.2. The ace_client_recipientid Parameter . . . . . . . . 18 4.1.2. The ace_client_recipientid Parameter . . . . . . . . 18
4.2. RS-to-C: 2.01 (Created) . . . . . . . . . . . . . . . . . 18 4.2. RS-to-C: 2.01 (Created) . . . . . . . . . . . . . . . . . 19
4.2.1. The Nonce 2 Parameter . . . . . . . . . . . . . . . . 19 4.2.1. The Nonce 2 Parameter . . . . . . . . . . . . . . . . 20
4.2.2. The ace_server_recipientid Parameter . . . . . . . . 20 4.2.2. The ace_server_recipientid Parameter . . . . . . . . 20
4.3. OSCORE Setup . . . . . . . . . . . . . . . . . . . . . . 20 4.3. OSCORE Setup . . . . . . . . . . . . . . . . . . . . . . 20
4.4. Access rights verification . . . . . . . . . . . . . . . 22 4.4. Access rights verification . . . . . . . . . . . . . . . 23
5. Secure Communication with AS . . . . . . . . . . . . . . . . 23 5. Secure Communication with AS . . . . . . . . . . . . . . . . 23
6. Discarding the Security Context . . . . . . . . . . . . . . . 23 6. Discarding the Security Context . . . . . . . . . . . . . . . 23
7. Security Considerations . . . . . . . . . . . . . . . . . . . 24 7. Security Considerations . . . . . . . . . . . . . . . . . . . 24
8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 25 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 26
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26
9.1. ACE Profile Registry . . . . . . . . . . . . . . . . . . 26 9.1. ACE Profile Registry . . . . . . . . . . . . . . . . . . 27
9.2. OAuth Parameters Registry . . . . . . . . . . . . . . . . 26 9.2. OAuth Parameters Registry . . . . . . . . . . . . . . . . 27
9.3. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 27 9.3. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 27
9.4. OSCORE Security Context Parameters Registry . . . . . . . 27 9.4. OSCORE Security Context Parameters Registry . . . . . . . 28
9.5. CWT Confirmation Methods Registry . . . . . . . . . . . . 28 9.5. CWT Confirmation Methods Registry . . . . . . . . . . . . 29
9.6. JWT Confirmation Methods Registry . . . . . . . . . . . . 29 9.6. JWT Confirmation Methods Registry . . . . . . . . . . . . 29
9.7. Expert Review Instructions . . . . . . . . . . . . . . . 29 9.7. Expert Review Instructions . . . . . . . . . . . . . . . 29
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 30
10.1. Normative References . . . . . . . . . . . . . . . . . . 30 10.1. Normative References . . . . . . . . . . . . . . . . . . 30
10.2. Informative References . . . . . . . . . . . . . . . . . 31 10.2. Informative References . . . . . . . . . . . . . . . . . 32
Appendix A. Profile Requirements . . . . . . . . . . . . . . . . 31 Appendix A. Profile Requirements . . . . . . . . . . . . . . . . 33
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 32 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 34
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34
1. Introduction 1. Introduction
This memo specifies a profile of the ACE framework This document specifies the "coap_oscore" profile of the ACE
[I-D.ietf-ace-oauth-authz]. In this profile, a client and a resource framework [I-D.ietf-ace-oauth-authz]. In this profile, a client and
server use the Constrained Application Protocol (CoAP) [RFC7252] to a resource server use the Constrained Application Protocol (CoAP)
communicate. The client uses an access token, bound to a symmetric [RFC7252] to communicate. The client uses an access token, bound to
key (the proof-of-possession key) to authorize its access to the a symmetric key (the proof-of-possession key) to authorize its access
resource server. Note that this profile uses a symmetric-crypto- to the resource server. Note that this profile uses a symmetric-
based scheme, where the symmetric secret is used as input material crypto-based scheme, where the symmetric secret is used as input
for keying material derivation. In order to provide communication material for keying material derivation. In order to provide
security and proof of possession, the client and resource server use communication security and proof of possession, the client and
Object Security for Constrained RESTful Environments (OSCORE) resource server use Object Security for Constrained RESTful
[RFC8613]. Note that the proof of possession is not achieved through Environments (OSCORE) [RFC8613]. Note that the proof of possession
a dedicated protocol element, but rather occurs after the first is not achieved through a dedicated protocol element, but rather
message exchange using OSCORE. occurs after the first message exchange using OSCORE.
OSCORE specifies how to use CBOR Object Signing and Encryption (COSE) OSCORE specifies how to use CBOR Object Signing and Encryption (COSE)
[RFC8152] to secure CoAP messages. Note that OSCORE can be used to [I-D.ietf-cose-rfc8152bis-struct][I-D.ietf-cose-rfc8152bis-algs] to
secure CoAP messages, as well as HTTP and combinations of HTTP and secure CoAP messages. Note that OSCORE can be used to secure CoAP
CoAP; a profile of ACE similar to the one described in this document, messages, as well as HTTP and combinations of HTTP and CoAP; a
with the difference of using HTTP instead of CoAP as communication profile of ACE similar to the one described in this document, with
the difference of using HTTP instead of CoAP as communication
protocol, could be specified analogously to this one. protocol, could be specified analogously to this one.
1.1. Terminology 1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Certain security-related terms such as "authentication", Certain security-related terms such as "authentication",
"authorization", "confidentiality", "(data) integrity", "message "authorization", "confidentiality", "(data) integrity", "Message
authentication code", and "verify" are taken from [RFC4949]. Authentication Code (MAC)", "Hash-based Message Authentication Code
(HMAC)", and "verify" are taken from [RFC4949].
RESTful terminology follows HTTP [RFC7231]. RESTful terminology follows HTTP [RFC7231].
Readers are expected to be familiar with the terms and concepts Readers are expected to be familiar with the terms and concepts
defined in OSCORE [RFC8613], such as "Security Context" and defined in OSCORE [RFC8613], such as "Security Context" and
"Recipient ID". "Recipient ID".
Terminology for entities in the architecture is defined in OAuth 2.0 Terminology for entities in the architecture is defined in OAuth 2.0
[RFC6749], such as client (C), resource server (RS), and [RFC6749], such as client (C), resource server (RS), and
authorization server (AS). It is assumed in this document that a authorization server (AS). It is assumed in this document that a
given resource on a specific RS is associated to a unique AS. given resource on a specific RS is associated to a unique AS.
Concise Binary Object Representation (CBOR) [RFC8949] and Concise Concise Binary Object Representation (CBOR) [RFC8949] and Concise
Data Definition Language (CDDL) [RFC8610] are used in this Data Definition Language (CDDL) [RFC8610] are used in this document.
specification. CDDL predefined type names, especially bstr for CBOR CDDL predefined type names, especially bstr for CBOR byte strings and
byte strings and tstr for CBOR text strings, are used extensively in tstr for CBOR text strings, are used extensively in this document.
the document.
Note that the term "endpoint" is used here, as in Note that the term "endpoint" is used here, as in
[I-D.ietf-ace-oauth-authz], following its OAuth definition, which is [I-D.ietf-ace-oauth-authz], following its OAuth definition, which is
to denote resources such as token and introspect at the AS and authz- to denote resources such as token and introspect at the AS and authz-
info at the RS. The CoAP [RFC7252] definition, which is "An entity info at the RS. The CoAP [RFC7252] definition, which is "An entity
participating in the CoAP protocol" is not used in this memo. participating in the CoAP protocol" is not used in this document.
Examples throughout this document are expressed in CBOR diagnostic
notation without the tag and value abbreviations.
2. Protocol Overview 2. Protocol Overview
This section gives an overview of how to use the ACE Framework This section gives an overview of how to use the ACE Framework
[I-D.ietf-ace-oauth-authz] to secure the communication between a [I-D.ietf-ace-oauth-authz] to secure the communication between a
client and a resource server using OSCORE [RFC8613]. The parameters client and a resource server using OSCORE [RFC8613]. The parameters
needed by the client to negotiate the use of this profile with the needed by the client to negotiate the use of this profile with the
authorization server, as well as the OSCORE setup process, are authorization server, as well as the OSCORE setup process, are
described in detail in the following sections. described in detail in the following sections.
skipping to change at page 4, line 37 skipping to change at page 4, line 42
clients. clients.
This profile requires a client to retrieve an access token from the This profile requires a client to retrieve an access token from the
AS for the resource it wants to access on an RS, by sending an access AS for the resource it wants to access on an RS, by sending an access
token request to the token endpoint, as specified in section 5.8 of token request to the token endpoint, as specified in section 5.8 of
[I-D.ietf-ace-oauth-authz]. The access token request and response [I-D.ietf-ace-oauth-authz]. The access token request and response
MUST be confidentiality-protected and ensure authenticity. This MUST be confidentiality-protected and ensure authenticity. This
profile RECOMMENDS the use of OSCORE between client and AS, to reduce profile RECOMMENDS the use of OSCORE between client and AS, to reduce
the number of libraries the client has to support, but other the number of libraries the client has to support, but other
protocols fulfilling the security requirements defined in section 5 protocols fulfilling the security requirements defined in section 5
of [I-D.ietf-ace-oauth-authz] (such as TLS or DTLS) MAY be used as of [I-D.ietf-ace-oauth-authz] MAY alternatively be used, such as TLS
well. [RFC8446] or DTLS [I-D.ietf-tls-dtls13].
Once the client has retrieved the access token, it generates a nonce Once the client has retrieved the access token, it generates a nonce
N1, defined in this specification (see Section 4.1.1). The client N1, defined in this document (see Section 4.1.1). The client also
also generates its own OSCORE Recipient ID ID1 (see Section 3.1 of generates its own OSCORE Recipient ID ID1 (see Section 3.1 of
[RFC8613]), for use with the keying material associated to the RS. [RFC8613]), for use with the keying material associated to the RS.
The client posts the token, N1 and its Recipient ID to the RS using The client posts the token, N1 and its Recipient ID to the RS using
the authz-info endpoint and mechanisms specified in section 5.8 of the authz-info endpoint and mechanisms specified in section 5.8 of
[I-D.ietf-ace-oauth-authz] and Content-Format = application/ace+cbor. [I-D.ietf-ace-oauth-authz] and Content-Format = application/ace+cbor.
When using this profile, the communication with the authz-info When using this profile, the communication with the authz-info
endpoint is not protected, except for update of access rights. endpoint is not protected, except for update of access rights.
If the access token is valid, the RS replies to this request with a If the access token is valid, the RS replies to this request with a
2.01 (Created) response with Content-Format = application/ace+cbor, 2.01 (Created) response with Content-Format = application/ace+cbor,
which contains a nonce N2 and its newly generated OSCORE Recipient which contains a nonce N2 and its newly generated OSCORE Recipient
skipping to change at page 5, line 27 skipping to change at page 5, line 40
the OSCORE Security Context. The client then derives the complete the OSCORE Security Context. The client then derives the complete
Security Context from the Master Salt, the OSCORE Recipient ID Security Context from the Master Salt, the OSCORE Recipient ID
generated by the RS (set as its OSCORE Sender ID), its own OSCORE generated by the RS (set as its OSCORE Sender ID), its own OSCORE
Recipient ID, plus the parameters received from the AS. Recipient ID, plus the parameters received from the AS.
Finally, the client starts the communication with the RS by sending a Finally, the client starts the communication with the RS by sending a
request protected with OSCORE to the RS. If the request is request protected with OSCORE to the RS. If the request is
successfully verified, the server stores the complete Security successfully verified, the server stores the complete Security
Context state that is ready for use in protecting messages, and uses Context state that is ready for use in protecting messages, and uses
it in the response, and in further communications with the client, it in the response, and in further communications with the client,
until token deletion, due to e.g. expiration. This Security Context until token deletion due to, for example, expiration. This Security
is discarded when a token (whether the same or a different one) is Context is discarded when a token (whether the same or a different
used to successfully derive a new Security Context for that client. one) is used to successfully derive a new Security Context for that
client.
The use of nonces N1 and N2 during the exchange prevents the reuse of The use of nonces N1 and N2 during the exchange prevents the reuse of
an Authenticated Encryption with Associated Data (AEAD) nonce/key an Authenticated Encryption with Associated Data (AEAD) nonce/key
pair for two different messages. Reuse might otherwise occur when pair for two different messages. Reuse might otherwise occur when
client and RS derive a new Security Context from an existing (non- client and RS derive a new Security Context from an existing (non-
expired) access token, as might occur when either party has just expired) access token, as might occur when either party has just
rebooted, and might lead to loss of both confidentiality and rebooted, and might lead to loss of both confidentiality and
integrity. Instead, by using the exchanged nonces N1 and N2 as part integrity. Instead, by using the exchanged nonces N1 and N2 as part
of the Master Salt, the request to the authz-info endpoint posting of the Master Salt, the request to the authz-info endpoint posting
the same token results in a different Security Context, by OSCORE the same token results in a different Security Context, by OSCORE
skipping to change at page 7, line 17 skipping to change at page 8, line 9
3.1. C-to-AS: POST to token endpoint 3.1. C-to-AS: POST to token endpoint
The client-to-AS request is specified in Section 5.8.1 of The client-to-AS request is specified in Section 5.8.1 of
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
The client must send this POST request to the token endpoint over a The client must send this POST request to the token endpoint over a
secure channel that guarantees authentication, message integrity and secure channel that guarantees authentication, message integrity and
confidentiality (see Section 5). confidentiality (see Section 5).
An example of such a request, with payload in CBOR diagnostic An example of such a request is shown in Figure 2
notation without the tag and value abbreviations is reported in
Figure 2
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "as.example.com" Uri-Host: "as.example.com"
Uri-Path: "token" Uri-Path: "token"
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"req_aud" : "tempSensor4711", "audience" : "tempSensor4711",
"scope" : "read" "scope" : "read"
} }
Figure 2: Example C-to-AS POST /token request for an access token Figure 2: Example C-to-AS POST /token request for an access token
bound to a symmetric key. bound to a symmetric key.
If the client wants to update its access rights without changing an If the client wants to update its access rights without changing an
existing OSCORE Security Context, it MUST include in its POST request existing OSCORE Security Context, it MUST include in its POST request
to the token endpoint a req_cnf object, with the kid field carrying a to the token endpoint a req_cnf object, with the kid field carrying a
CBOR byte string containing the OSCORE Input Material Identifier CBOR byte string containing the OSCORE Input Material Identifier
(assigned as discussed in Section 3.2). This identifier, together (assigned as discussed in Section 3.2). This identifier, together
with other information such as audience (see Section 5.8.1 of with other information such as audience (see Section 5.8.1 of
[I-D.ietf-ace-oauth-authz]), can be used by the AS to determine the [I-D.ietf-ace-oauth-authz]), can be used by the AS to determine the
shared secret bound to the proof-of-possession token and therefore shared secret bound to the proof-of-possession token and therefore
MUST identify a symmetric key that was previously generated by the AS MUST identify a symmetric key that was previously generated by the AS
as a shared secret for the communication between the client and the as a shared secret for the communication between the client and the
RS. The AS MUST verify that the received value identifies a proof- RS. The AS MUST verify that the received value identifies a proof-
of-possession key that has previously been issued to the requesting of-possession key that has previously been issued to the requesting
client. If that is not the case, the Client-to-AS request MUST be client. If that is not the case, the Client-to-AS request MUST be
declined with the error code 'invalid_request' as defined in declined with the error code "invalid_request" as defined in
Section 5.8.3 of [I-D.ietf-ace-oauth-authz]. Section 5.8.3 of [I-D.ietf-ace-oauth-authz].
An example of such a request, with payload in CBOR diagnostic An example of such a request is shown in Figure 3
notation without the tag and value abbreviations is reported in
Figure 3
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "as.example.com" Uri-Host: "as.example.com"
Uri-Path: "token" Uri-Path: "token"
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"req_aud" : "tempSensor4711", "audience" : "tempSensor4711",
"scope" : "write", "scope" : "write",
"req_cnf" : { "req_cnf" : {
"kid" : h'01' "kid" : h'01'
} }
Figure 3: Example C-to-AS POST /token request for updating rights to Figure 3: Example C-to-AS POST /token request for updating rights
an access token bound to a symmetric key. to an access token bound to a symmetric key.
3.2. AS-to-C: Access Token 3.2. AS-to-C: Access Token
After verifying the POST request to the token endpoint and that the After verifying the POST request to the token endpoint and that the
client is authorized to obtain an access token corresponding to its client is authorized to obtain an access token corresponding to its
access token request, the AS responds as defined in section 5.8.2 of access token request, the AS responds as defined in section 5.8.2 of
[I-D.ietf-ace-oauth-authz]. If the client request was invalid, or [I-D.ietf-ace-oauth-authz]. If the client request was invalid, or
not authorized, the AS returns an error response as described in not authorized, the AS returns an error response as described in
section 5.8.3 of [I-D.ietf-ace-oauth-authz]. section 5.8.3 of [I-D.ietf-ace-oauth-authz].
The AS can signal that the use of OSCORE is REQUIRED for a specific The AS can signal that the use of OSCORE is REQUIRED for a specific
access token by including the "profile" parameter with the value access token by including the "ace_profile" parameter with the value
"coap_oscore" in the access token response. This means that the "coap_oscore" in the access token response. This means that the
client MUST use OSCORE towards all resource servers for which this client MUST use OSCORE towards all resource servers for which this
access token is valid, and follow Section 4.3 to derive the security access token is valid, and follow Section 4.3 to derive the security
context to run OSCORE. Usually it is assumed that constrained context to run OSCORE. Usually it is assumed that constrained
devices will be pre-configured with the necessary profile, so that devices will be pre-configured with the necessary profile, so that
this kind of profile signaling can be omitted. this kind of profile signaling can be omitted.
Moreover, the AS MUST send the following data: Moreover, the AS MUST send the following data:
o a master secret * a master secret
o an identifier of the OSCORE Input Material * an identifier of the OSCORE Input Material
Additionally, the AS MAY send the following data, in the same Additionally, the AS MAY send the following data, in the same
response. response.
o a context identifier * a context identifier
o an AEAD algorithm
o an HMAC-based key derivation function (HKDF) algorithm * an AEAD algorithm
* an HMAC-based key derivation function (HKDF, [RFC5869]) algorithm,
see section 3.1 of [I-D.ietf-cose-rfc8152bis-algs]
o a salt * a salt
o the OSCORE version number * the OSCORE version number
This data is transported in the OSCORE_Input_Material. The This data is transported in the OSCORE_Input_Material. The
OSCORE_Input_Material is a CBOR map object, defined in Section 3.2.1. OSCORE_Input_Material is a CBOR map object, defined in Section 3.2.1.
This object is transported in the 'cnf' parameter of the access token This object is transported in the "cnf" parameter of the access token
response as defined in Section 3.2 of [I-D.ietf-ace-oauth-params], as response as defined in Section 3.2 of [I-D.ietf-ace-oauth-params], as
the value of a field named 'osc', registered in Section 9.5 and the value of a field named "osc", registered in Section 9.5 and
Section 9.6. Section 9.6.
The AS MAY assign an identifier to the context (context identifier). The AS MAY assign an identifier to the context (context identifier).
This identifier is used as ID Context in the OSCORE context as This identifier is used as ID Context in the OSCORE context as
described in section 3.1 of [RFC8613]. If assigned, this parameters described in section 3.1 of [RFC8613]. If assigned, this parameters
MUST be communicated as the 'contextId' field in the MUST be communicated as the "contextId" field in the
OSCORE_Input_Material. The applications needs to consider that this OSCORE_Input_Material. The application needs to consider that this
identifier is sent in the clear and may reveal information about the identifier is sent in the clear and may reveal information about the
endpoints, as mentioned in section 12.8 of [RFC8613]. endpoints, as mentioned in section 12.8 of [RFC8613].
The master secret and the identifier of the OSCORE_Input_Material The master secret and the identifier of the OSCORE_Input_Material
MUST be communicated as the 'ms' and 'id' field in the 'osc' field in MUST be communicated as the "ms" and "id" field in the "osc" field in
the 'cnf' parameeter of the access token response. If included, the the "cnf" parameter of the access token response. If included, the
AEAD algorithm is sent in the 'alg' parameter in the AEAD algorithm is sent in the "alg" parameter in the
OSCORE_Input_Material; the HKDF algorithm in the 'hkdf' parameter of OSCORE_Input_Material; the HKDF algorithm in the "hkdf" parameter of
the OSCORE_Input_Material; a salt in the 'salt' parameter of the the OSCORE_Input_Material; a salt in the "salt" parameter of the
OSCORE_Input_Material; and the OSCORE version in the 'version' OSCORE_Input_Material; and the OSCORE version in the "version"
parameter of the OSCORE_Input_Material. parameter of the OSCORE_Input_Material.
The same parameters MUST be included in the claims associated with The same parameters MUST be included in the claims associated with
the access token. This profile RECOMMENDS the use of CBOR web token the access token. The OSCORE master secret MUST be encrypted by the
(CWT) as specified in [RFC8392]. If the token is a CWT, the same authorization server so that only the resource server can decrypt it
OSCORE_Input_Material structure defined above MUST be placed in the (see Section 6.1. of [I-D.ietf-ace-oauth-authz]). This profile
'osc' field of the 'cnf' claim of this token. RECOMMENDS the use of a CBOR web token (CWT) protected with
COSE_Encrypt/COSE_Encrypt0 as specified in [RFC8392]. If the token
is a CWT, the same OSCORE_Input_Material structure defined above MUST
be placed in the "osc" field of the "cnf" claim of this token.
The AS MUST send different OSCORE_Input_Material (and therefore The AS MUST send different OSCORE_Input_Material (and therefore
different access tokens) to different authorized clients, in order different access tokens) to different authorized clients, in order
for the RS to differentiate between clients. for the RS to differentiate between clients.
Figure 4 shows an example of an AS response, with payload in CBOR Figure 4 shows an example of an AS response. The access token has
diagnostic notation without the tag and value abbreviations. The been truncated for readability.
access token has been truncated for readability.
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Type: "application/ace+cbor" Content-Type: "application/ace+cbor"
Payload: Payload:
{ {
"access_token" : h'8343a1010aa2044c53 ... "access_token" : h'8343a1010aa2044c53 ...
(remainder of access token (CWT) omitted for brevity)', (remainder of access token (CWT) omitted for brevity)',
"profile" : "coap_oscore", "ace_profile" : "coap_oscore",
"expires_in" : "3600", "expires_in" : "3600",
"cnf" : { "cnf" : {
"osc" : { "osc" : {
"id" : h'01', "id" : h'01',
"ms" : h'f9af838368e353e78888e1426bd94e6f' "ms" : h'f9af838368e353e78888e1426bd94e6f'
} }
} }
} }
Figure 4: Example AS-to-C Access Token response with OSCORE profile. Figure 4: Example AS-to-C Access Token response with OSCORE profile.
Figure 5 shows an example CWT Claims Set, including the relevant Figure 5 shows an example CWT Claims Set, including the relevant
OSCORE parameters in the 'cnf' claim, in CBOR diagnostic notation OSCORE parameters in the "cnf" claim.
without tag and value abbreviations.
{ {
"aud" : "tempSensorInLivingRoom", "aud" : "tempSensorInLivingRoom",
"iat" : "1360189224", "iat" : "1360189224",
"exp" : "1360289224", "exp" : "1360289224",
"scope" : "temperature_g firmware_p", "scope" : "temperature_g firmware_p",
"cnf" : { "cnf" : {
"osc" : { "osc" : {
"ms" : h'f9af838368e353e78888e1426bd94e6f', "ms" : h'f9af838368e353e78888e1426bd94e6f',
"id" : h'01' "id" : h'01'
} }
} }
} }
Figure 5: Example CWT Claims Set with OSCORE parameters. Figure 5: Example CWT Claims Set with OSCORE parameters.
The same CWT Claims Set as in Figure 5, using the value abbreviations The same CWT Claims Set as in Figure 5, using the value abbreviations
defined in [I-D.ietf-ace-oauth-authz] and [RFC8747] and encoded in defined in [I-D.ietf-ace-oauth-authz] and [RFC8747] and encoded in
CBOR is shown in Figure 6. The bytes in hexadecimal are reported in CBOR is shown in Figure 6. The bytes in hexadecimal are reported in
the first column, while their corresponding CBOR meaning is reported the first column, while their corresponding CBOR meaning is reported
after the '#' sign on the second column, for easiness of readability. after the "#" sign on the second column, for easiness of readability.
NOTE TO THE RFC EDITOR: before publishing, it should be checked (and NOTE TO THE RFC EDITOR: before publishing, it should be checked (and
in case fixed) that the values used below (which are not yet in case fixed) that the values used below (which are not yet
registered) are the final values registered in IANA. registered) are the final values registered in IANA.
A5 # map(5) A5 # map(5)
63 # text(3) 63 # text(3)
617564 # "aud" 617564 # "aud"
76 # text(22) 76 # text(22)
74656D7053656E736F72496E4C6976696E67526F6F6D 74656D7053656E736F72496E4C6976696E67526F6F6D
skipping to change at page 11, line 42 skipping to change at page 12, line 42
50 # bytes(16) 50 # bytes(16)
F9AF838368E353E78888E1426BD94E6F F9AF838368E353E78888E1426BD94E6F
# "\xF9\xAF\x83\x83h\xE3S\xE7 # "\xF9\xAF\x83\x83h\xE3S\xE7
\x88\x88\xE1Bk\xD9No" \x88\x88\xE1Bk\xD9No"
62 # text(2) 62 # text(2)
6964 # "id" 6964 # "id"
41 # bytes(1) 41 # bytes(1)
01 # "\x01" 01 # "\x01"
Figure 6: Example CWT Claims Set with OSCORE parameters, CBOR Figure 6: Example CWT Claims Set with OSCORE parameters, CBOR
encoded. encoded.
If the client has requested an update to its access rights using the If the client has requested an update to its access rights using the
same OSCORE Security Context, which is valid and authorized, the AS same OSCORE Security Context, which is valid and authorized, the AS
MUST omit the 'cnf' parameter in the response, and MUST carry the MUST omit the "cnf" parameter in the response, and MUST carry the
OSCORE Input Material identifier in the 'kid' field in the 'cnf' OSCORE Input Material identifier in the "kid" field in the "cnf"
claim of the token. This identifier needs to be included in the claim of the token. This identifier needs to be included in the
token in order for the RS to identify the correct OSCORE Input token in order for the RS to identify the correct OSCORE Input
Material. Material.
Figure 7 shows an example of such an AS response, with payload in Figure 7 shows an example of such an AS response The access token has
CBOR diagnostic notation without the tag and value abbreviations. been truncated for readability.
The access token has been truncated for readability.
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Type: "application/ace+cbor" Content-Type: "application/ace+cbor"
Payload: Payload:
{ {
"access_token" : h'8343a1010aa2044c53 ... "access_token" : h'8343a1010aa2044c53 ...
(remainder of access token (CWT) omitted for brevity)', (remainder of access token (CWT) omitted for brevity)',
"profile" : "coap_oscore", "ace_profile" : "coap_oscore",
"expires_in" : "3600" "expires_in" : "3600"
} }
Figure 7: Example AS-to-C Access Token response with OSCORE profile, Figure 7: Example AS-to-C Access Token response with OSCORE
for update of access rights. profile, for update of access rights.
Figure 8 shows an example CWT Claims Set, containing the necessary Figure 8 shows an example CWT Claims Set, containing the necessary
OSCORE parameters in the 'cnf' claim for update of access rights, in OSCORE parameters in the "cnf" claim for update of access rights.
CBOR diagnostic notation without tag and value abbreviations.
{ {
"aud" : "tempSensorInLivingRoom", "aud" : "tempSensorInLivingRoom",
"iat" : "1360189224", "iat" : "1360189224",
"exp" : "1360289224", "exp" : "1360289224",
"scope" : "temperature_h", "scope" : "temperature_h",
"cnf" : { "cnf" : {
"kid" : h'01' "kid" : h'01'
} }
} }
Figure 8: Example CWT Claims Set with OSCORE parameters for update of Figure 8: Example CWT Claims Set with OSCORE parameters for
access rights. update of access rights.
3.2.1. The OSCORE_Input_Material 3.2.1. The OSCORE_Input_Material
An OSCORE_Input_Material is an object that represents the input An OSCORE_Input_Material is an object that represents the input
material to derive an OSCORE Security Context, i.e., the local set of material to derive an OSCORE Security Context, i.e., the local set of
information elements necessary to carry out the cryptographic information elements necessary to carry out the cryptographic
operations in OSCORE (Section 3.1 of [RFC8613]). In particular, the operations in OSCORE (Section 3.1 of [RFC8613]). In particular, the
OSCORE_Input_Material is defined to be serialized and transported OSCORE_Input_Material is defined to be serialized and transported
between nodes, as specified by this document, but can also be used by between nodes, as specified by this document, but can also be used by
other specifications if needed. The OSCORE_Input_Material can either other specifications if needed. The OSCORE_Input_Material can either
be encoded as a JSON object or as a CBOR map. The set of common be encoded as a JSON object or as a CBOR map. The set of common
parameters that can appear in an OSCORE_Input_Material can be found parameters that can appear in an OSCORE_Input_Material can be found
in the IANA "OSCORE Security Context Parameters" registry in the IANA "OSCORE Security Context Parameters" registry
(Section 9.4), defined for extensibility, and is specified below. (Section 9.4), defined for extensibility, and the initial set of
All parameters are optional. Table 1 provides a summary of the parameters defined in this document is specified below. All
parameters are optional. Table 1 provides a summary of the
OSCORE_Input_Material parameters defined in this section. OSCORE_Input_Material parameters defined in this section.
+-----------+-------+-------------+-------------------+-------------+ +===========+=======+==========+===================+===============+
| name | CBOR | CBOR type | registry | description | | name | CBOR | CBOR | registry | description |
| | label | | | | | | label | type | | |
+-----------+-------+-------------+-------------------+-------------+ +===========+=======+==========+===================+===============+
| id | 0 | byte string | | OSCORE | | id | 0 | byte | | OSCORE Input |
| | | | | Input | | | | string | | Material |
| | | | | Material | | | | | | Identifier |
| | | | | Identifier | +-----------+-------+----------+-------------------+---------------+
| | | | | | | version | 1 | unsigned | | OSCORE |
| version | 1 | unsigned | | OSCORE | | | | integer | | Version |
| | | integer | | Version | +-----------+-------+----------+-------------------+---------------+
| | | | | | | ms | 2 | byte | | OSCORE Master |
| ms | 2 | byte string | | OSCORE | | | | string | | Secret value |
| | | | | Master | +-----------+-------+----------+-------------------+---------------+
| | | | | Secret | | hkdf | 3 | text | [COSE.Algorithms] | OSCORE HKDF |
| | | | | value | | | | string / | Values (HMAC- | value |
| | | | | | | | | integer | based) | |
| hkdf | 3 | text string | [COSE.Algorithms] | OSCORE HKDF | +-----------+-------+----------+-------------------+---------------+
| | | / integer | Values (HMAC- | value | | alg | 4 | text | [COSE.Algorithms] | OSCORE AEAD |
| | | | based) | | | | | string / | Values (AEAD) | Algorithm |
| | | | | | | | | integer | | value |
| alg | 4 | text string | [COSE.Algorithms] | OSCORE AEAD | +-----------+-------+----------+-------------------+---------------+
| | | / integer | Values (AEAD) | Algorithm | | salt | 5 | byte | | an input to |
| | | | | value | | | | string | | OSCORE Master |
| | | | | | | | | | | Salt value |
| salt | 5 | byte string | | an input to | +-----------+-------+----------+-------------------+---------------+
| | | | | OSCORE | | contextId | 6 | byte | | OSCORE ID |
| | | | | Master Salt | | | | string | | Context value |
| | | | | value | +-----------+-------+----------+-------------------+---------------+
| | | | | |
| contextId | 6 | byte string | | OSCORE ID |
| | | | | Context |
| | | | | value |
+-----------+-------+-------------+-------------------+-------------+
Table 1: OSCORE_Input_Material Parameters Table 1: OSCORE_Input_Material Parameters
id: This parameter identifies the OSCORE_Input_Material and is id: This parameter identifies the OSCORE_Input_Material and is
encoded as a byte string. In JSON, the "id" value is a Base64 encoded as a byte string. In JSON, the "id" value is a Base64
encoded byte string. In CBOR, the "id" type is byte string, and encoded byte string. In CBOR, the "id" type is byte string, and
has label 0. has label 0.
version: This parameter identifies the OSCORE Version number, which version: This parameter identifies the OSCORE Version number, which
is an unsigned integer. For more information about this field, is an unsigned integer. For more information about this field,
see section 5.4 of [RFC8613]. In JSON, the "version" value is an see section 5.4 of [RFC8613]. In JSON, the "version" value is an
integer. In CBOR, the "version" type is integer, and has label 1. integer. In CBOR, the "version" type is integer, and has label 1.
skipping to change at page 14, line 17 skipping to change at page 15, line 13
ms: This parameter identifies the OSCORE Master Secret value, which ms: This parameter identifies the OSCORE Master Secret value, which
is a byte string. For more information about this field, see is a byte string. For more information about this field, see
section 3.1 of [RFC8613]. In JSON, the "ms" value is a Base64 section 3.1 of [RFC8613]. In JSON, the "ms" value is a Base64
encoded byte string. In CBOR, the "ms" type is byte string, and encoded byte string. In CBOR, the "ms" type is byte string, and
has label 2. has label 2.
hkdf: This parameter identifies the OSCORE HKDF Algorithm. For more hkdf: This parameter identifies the OSCORE HKDF Algorithm. For more
information about this field, see section 3.1 of [RFC8613]. The information about this field, see section 3.1 of [RFC8613]. The
values used MUST be registered in the IANA "COSE Algorithms" values used MUST be registered in the IANA "COSE Algorithms"
registry (see [COSE.Algorithms]) and MUST be HMAC-based HKDF registry (see [COSE.Algorithms]) and MUST be HMAC-based HKDF
algorithms. The value can either be the integer or the text algorithms (see section 3.1 of [I-D.ietf-cose-rfc8152bis-algs]).
string value of the HMAC-based HKDF algorithm in the "COSE The value can either be the integer or the text string value of
Algorithms" registry. In JSON, the "hkdf" value is a case- the HMAC-based HKDF algorithm in the "COSE Algorithms" registry.
sensitive ASCII string or an integer. In CBOR, the "hkdf" type is In JSON, the "hkdf" value is a case-sensitive ASCII string or an
text string or integer, and has label 3. integer. In CBOR, the "hkdf" type is text string or integer, and
has label 3.
alg: This parameter identifies the OSCORE AEAD Algorithm. For more alg: This parameter identifies the OSCORE AEAD Algorithm. For more
information about this field, see section 3.1 of [RFC8613] The information about this field, see section 3.1 of [RFC8613] The
values used MUST be registered in the IANA "COSE Algorithms" values used MUST be registered in the IANA "COSE Algorithms"
registry (see [COSE.Algorithms]) and MUST be AEAD algorithms. The registry (see [COSE.Algorithms]) and MUST be AEAD algorithms. The
value can either be the integer or the text string value of the value can either be the integer or the text string value of the
HMAC-based HKDF algorithm in the "COSE Algorithms" registry. In HMAC-based HKDF algorithm in the "COSE Algorithms" registry. In
JSON, the "alg" value is a case-sensitive ASCII string or an JSON, the "alg" value is a case-sensitive ASCII string or an
integer. In CBOR, the "alg" type is text string or integer, and integer. In CBOR, the "alg" type is text string or integer, and
has label 4. has label 4.
skipping to change at page 15, line 11 skipping to change at page 15, line 50
CBOR, the "contextID" type is byte string, and has label 6. CBOR, the "contextID" type is byte string, and has label 6.
An example of JSON OSCORE_Input_Material is given in Figure 9. An example of JSON OSCORE_Input_Material is given in Figure 9.
"osc" : { "osc" : {
"alg" : "AES-CCM-16-64-128", "alg" : "AES-CCM-16-64-128",
"id" : b64'AQ==' "id" : b64'AQ=='
"ms" : b64'+a+Dg2jjU+eIiOFCa9lObw' "ms" : b64'+a+Dg2jjU+eIiOFCa9lObw'
} }
Figure 9: Example JSON OSCORE_Input_Material Figure 9: Example JSON OSCORE_Input_Material
The CDDL grammar describing the CBOR OSCORE_Input_Material is: The CDDL grammar describing the CBOR OSCORE_Input_Material is:
OSCORE_Input_Material = { OSCORE_Input_Material = {
? 0 => bstr, ; id ? 0 => bstr, ; id
? 1 => int, ; version ? 1 => int, ; version
? 2 => bstr, ; ms ? 2 => bstr, ; ms
? 3 => tstr / int, ; hkdf ? 3 => tstr / int, ; hkdf
? 4 => tstr / int, ; alg ? 4 => tstr / int, ; alg
? 5 => bstr, ; salt ? 5 => bstr, ; salt
skipping to change at page 15, line 43 skipping to change at page 16, line 35
to the RS. The RS then generates a nonce N2 and an identifier ID2 to the RS. The RS then generates a nonce N2 and an identifier ID2
unique in the sets of its own Recipient IDs, and uses Section 3.2 of unique in the sets of its own Recipient IDs, and uses Section 3.2 of
[RFC8613] to derive a security context based on a shared master [RFC8613] to derive a security context based on a shared master
secret, the two exchanged nonces and the two identifiers, established secret, the two exchanged nonces and the two identifiers, established
between client and server. The exchanged nonces and identifiers are between client and server. The exchanged nonces and identifiers are
encoded as CBOR byte string if CBOR is used, and as Base64 string if encoded as CBOR byte string if CBOR is used, and as Base64 string if
JSON is used. This security context is used to protect all future JSON is used. This security context is used to protect all future
communication between client and RS using OSCORE, as long as the communication between client and RS using OSCORE, as long as the
access token is valid. access token is valid.
Note that the RS and client authenticates each other by generating Note that the RS and client authenticate each other by generating the
the shared OSCORE Security Context using the pop-key as master shared OSCORE Security Context using the pop-key as master secret.
secret. An attacker posting a valid token to the RS will not be able An attacker posting a valid token to the RS will not be able to
to generate a valid OSCORE Security Context and thus not be able to generate a valid OSCORE Security Context and thus not be able to
prove possession of the pop-key. Additionally, the mutual prove possession of the pop-key. Additionally, the mutual
authentication is only achieved after the client has successfully authentication is only achieved after the client has successfully
verified a response from the RS protected with the generated OSCORE verified a response from the RS protected with the generated OSCORE
Security Context. Security Context.
4.1. C-to-RS: POST to authz-info endpoint 4.1. C-to-RS: POST to authz-info endpoint
The client MUST generate a nonce value N1 very unlikely to have been The client MUST generate a nonce value N1 very unlikely to have been
previously used with the same input keying material. This profile previously used with the same input keying material. This profile
RECOMMENDS to use a 64-bit long random number as nonce's value. The RECOMMENDS using a 64-bit long random number as the nonce's value.
client MUST store the nonce N1 as long as the response from the RS is The client MUST store the nonce N1 as long as the response from the
not received and the access token related to it is still valid (to RS is not received and the access token related to it is still valid
the best of the client's knowledge). (to the best of the client's knowledge).
The client generates its own Recipient ID, ID1, for the OSCORE The client generates its own Recipient ID, ID1, for the OSCORE
Security Context that it is establishing with the RS. By generating Security Context that it is establishing with the RS. By generating
its own Recipient ID, the client makes sure that it does not collide its own Recipient ID, the client makes sure that it does not collide
with any of its Recipient IDs, nor with any other identifier ID1 if with any of its Recipient IDs, nor with any other identifier ID1 if
the client is executing this exchange with a different RS at the same the client is executing this exchange with a different RS at the same
time. time.
The client MUST use CoAP and the Authorization Information resource The client MUST use CoAP and the Authorization Information resource
as described in section 5.8.1 of [I-D.ietf-ace-oauth-authz] to as described in section 5.8.1 of [I-D.ietf-ace-oauth-authz] to
transport the token, N1 and ID1 to the RS. transport the token, N1 and ID1 to the RS.
Note that the use of the payload and the Content-Format is different Note that the use of the payload and the Content-Format is different
from what is described in section 5.8.1 of from what is described in section 5.8.1 of
[I-D.ietf-ace-oauth-authz], which only transports the token without [I-D.ietf-ace-oauth-authz], which only transports the token without
any CBOR wrapping. In this profile, the client MUST wrap the token, any CBOR wrapping. In this profile, the client MUST wrap the token,
N1 and ID1 in a CBOR map. The client MUST use the Content-Format N1 and ID1 in a CBOR map. The client MUST use the Content-Format
"application/ace+cbor" defined in section 8.14 of "application/ace+cbor" defined in section 8.14 of
[I-D.ietf-ace-oauth-authz]. The client MUST include the access token [I-D.ietf-ace-oauth-authz]. The client MUST include the access token
using the 'access_token' parameter, N1 using the 'nonce1' parameter using the "access_token" parameter, N1 using the "nonce1" parameter
defined in Section 4.1.1, and ID1 using the 'ace_client_recipientid' defined in Section 4.1.1, and ID1 using the "ace_client_recipientid"
parameter defined in Section 4.1.2. parameter defined in Section 4.1.2.
The communication with the authz-info endpoint does not have to be The communication with the authz-info endpoint does not have to be
protected, except for the update of access rights case described protected, except for the update of access rights case described
below. below.
Note that a client may be required to re-POST the access token in Note that a client may be required to re-POST the access token in
order to complete a request, since an RS may delete a stored access order to complete a request, since an RS may delete a stored access
token (and associated Security Context) at any time, for example due token (and associated Security Context) at any time, for example due
to all storage space being consumed. This situation is detected by to all storage space being consumed. This situation is detected by
the client when it receives an AS Request Creation Hints response. the client when it receives an AS Request Creation Hints response.
Reposting the same access token will result in deriving a new OSCORE Reposting the same access token will result in deriving a new OSCORE
Security Context to be used with the RS, as different exchanged Security Context to be used with the RS, as different exchanged
nonces will be used. nonces will be used.
The client may also chose to re-POST the access token in order to The client may also choose to re-POST the access token in order to
renew its OSCORE Security Context. In that case, the client and the update its OSCORE Security Context. In that case, the client and the
RS will exchange newly generated nonces, re-negotiate identifiers, RS will exchange newly generated nonces, re-negotiate identifiers,
and derive new keying material. The client and RS might decide to and derive new keying material. The client and RS might decide to
keep the same identifiers or renew them during the re-negotiation. keep the same identifiers or renew them during the re-negotiation.
Figure 10 shows an example of the request sent from the client to the Figure 10 shows an example of the request sent from the client to the
RS, with payload in CBOR diagnostic notation without the tag and RS. The access token has been truncated for readability.
value abbreviations. The access token has been truncated for
readability.
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "rs.example.com" Uri-Host: "rs.example.com"
Uri-Path: "authz-info" Uri-Path: "authz-info"
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"access_token": h'8343a1010aa2044c53 ... "access_token": h'8343a1010aa2044c53 ...
(remainder of access token (CWT) omitted for brevity)', (remainder of access token (CWT) omitted for brevity)',
"nonce1": h'018a278f7faab55a', "nonce1": h'018a278f7faab55a',
skipping to change at page 17, line 32 skipping to change at page 18, line 25
} }
Figure 10: Example C-to-RS POST /authz-info request using CWT Figure 10: Example C-to-RS POST /authz-info request using CWT
If the client has already posted a valid token, has already If the client has already posted a valid token, has already
established a security association with the RS, and wants to update established a security association with the RS, and wants to update
its access rights, the client can do so by posting the new token its access rights, the client can do so by posting the new token
(retrieved from the AS and containing the update of access rights) to (retrieved from the AS and containing the update of access rights) to
the /authz-info endpoint. The client MUST protect the request using the /authz-info endpoint. The client MUST protect the request using
the OSCORE Security Context established during the first token the OSCORE Security Context established during the first token
exchange. The client MUST only send the 'access_token' field in the exchange. The client MUST only send the "access_token" field in the
CBOR map in the payload, no nonce or identifier are sent. After CBOR map in the payload, no nonce or identifier are sent. After
proper verification (see Section 4.2), the RS will replace the old proper verification (see Section 4.2), the RS will replace the old
token with the new one, maintaining the same Security Context. token with the new one, maintaining the same Security Context.
4.1.1. The Nonce 1 Parameter 4.1.1. The Nonce 1 Parameter
This parameter MUST be sent from the client to the RS, together with This parameter MUST be sent from the client to the RS, together with
the access token, if the ace profile used is coap_oscore, and the the access token, if the ace profile used is coap_oscore, and the
message is not an update of access rights, protected with an existing message is not an update of access rights, protected with an existing
OSCORE Security Context. The parameter is encoded as a byte string OSCORE Security Context. The parameter is encoded as a byte string
skipping to change at page 18, line 23 skipping to change at page 19, line 13
Section 9.2. Section 9.2.
4.2. RS-to-C: 2.01 (Created) 4.2. RS-to-C: 2.01 (Created)
The RS MUST follow the procedures defined in section 5.8.1 of The RS MUST follow the procedures defined in section 5.8.1 of
[I-D.ietf-ace-oauth-authz]: the RS must verify the validity of the [I-D.ietf-ace-oauth-authz]: the RS must verify the validity of the
token. If the token is valid, the RS must respond to the POST token. If the token is valid, the RS must respond to the POST
request with 2.01 (Created). If the token is valid but is associated request with 2.01 (Created). If the token is valid but is associated
to claims that the RS cannot process (e.g., an unknown scope), or if to claims that the RS cannot process (e.g., an unknown scope), or if
any of the expected parameters is missing (e.g., any of the mandatory any of the expected parameters is missing (e.g., any of the mandatory
parameters from the AS or the identifier 'id1'), or if any parameters parameters from the AS or the identifier "id1"), or if any parameters
received in the 'osc' field is unrecognized, the RS must respond with received in the "osc" field is unrecognized, the RS must respond with
an error response code equivalent to the CoAP code 4.00 (Bad an error response code equivalent to the CoAP code 4.00 (Bad
Request). In the latter two cases, the RS may provide additional Request). In the latter two cases, the RS may provide additional
information in the error response, in order to clarify what went information in the error response, in order to clarify what went
wrong. The RS may make an introspection request (see Section 5.9.1 wrong. The RS may make an introspection request (see Section 5.9.1
of [I-D.ietf-ace-oauth-authz]) to validate the token before of [I-D.ietf-ace-oauth-authz]) to validate the token before
responding to the POST request to the authz-info endpoint. responding to the POST request to the authz-info endpoint.
Additionally, the RS MUST generate a nonce N2 very unlikely to have Additionally, the RS MUST generate a nonce N2 very unlikely to have
been previously used with the same input keying material, and its own been previously used with the same input keying material, and its own
Recipient ID, ID2. The RS makes sure that ID2 does not collide with Recipient ID, ID2. The RS makes sure that ID2 does not collide with
any of its Recipient IDs. The RS MUST ensure that ID2 is different any of its Recipient IDs. The RS MUST ensure that ID2 is different
from the value received in the ace_client_recipientid parameter. The from the value received in the ace_client_recipientid parameter. The
RS sends N2 and ID2 within the 2.01 (Created) response. The payload RS sends N2 and ID2 within the 2.01 (Created) response. The payload
of the 2.01 (Created) response MUST be a CBOR map containing the of the 2.01 (Created) response MUST be a CBOR map containing the
'nonce2' parameter defined in Section 4.2.1, set to N2, and the "nonce2" parameter defined in Section 4.2.1, set to N2, and the
'ace_server_recipientid' parameter defined in Section 4.2.2, set to "ace_server_recipientid" parameter defined in Section 4.2.2, set to
ID2. This profile RECOMMENDS to use a 64-bit long random number as ID2. This profile RECOMMENDS using a 64-bit long random number as
nonce's value. The RS MUST use the Content-Format "application/ the nonce's value. The RS MUST use the Content-Format "application/
ace+cbor" defined in section 8.14 of [I-D.ietf-ace-oauth-authz]. ace+cbor" defined in section 8.14 of [I-D.ietf-ace-oauth-authz].
Figure 11 shows an example of the response sent from the RS to the Figure 11 shows an example of the response sent from the RS to the
client, with payload in CBOR diagnostic notation without the tag and client.
value abbreviations.
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"nonce2": h'25a8991cd700ac01', "nonce2": h'25a8991cd700ac01',
"ace_server_recipientid" : h'0000' "ace_server_recipientid" : h'0000'
} }
Figure 11: Example RS-to-C 2.01 (Created) response Figure 11: Example RS-to-C 2.01 (Created) response
As specified in section 5.8.3 of [I-D.ietf-ace-oauth-authz], the RS As specified in section 5.8.3 of [I-D.ietf-ace-oauth-authz], the RS
must notify the client with an error response with code 4.01 must notify the client with an error response with code 4.01
(Unauthorized) for any long running request before terminating the (Unauthorized) for any long running request before terminating the
session, when the access token expires. session, when the access token expires.
If the RS receives the token in a OSCORE protected message, it means If the RS receives the token in a OSCORE protected message, it means
that the client is requesting an update of access rights. The RS that the client is requesting an update of access rights. The RS
MUST ignore any nonce and identifiers in the request, if any was MUST ignore any nonce and identifiers in the request, if any was
sent. The RS MUST check that the "kid" of the 'cnf' claim of the new sent. The RS MUST check that the "kid" of the "cnf" claim of the new
access token matches the identifier of the OSCORE Input Material of access token matches the identifier of the OSCORE Input Material of
the context used to protect the message. If that is the case, the RS the context used to protect the message. If that is the case, the RS
MUST overwrite the old token and associate the new token to the MUST overwrite the old token and associate the new token to the
Security Context identified by the "kid" value in the 'cnf' claim. Security Context identified by the "kid" value in the "cnf" claim.
The RS MUST respond with a 2.01 (Created) response protected with the The RS MUST respond with a 2.01 (Created) response protected with the
same Security Context, with no payload. If any verification fails, same Security Context, with no payload. If any verification fails,
the RS MUST respond with a 4.01 (Unauthorized) error response. the RS MUST respond with a 4.01 (Unauthorized) error response.
As specified in section 5.8.1 of [I-D.ietf-ace-oauth-authz], when As specified in section 5.8.1 of [I-D.ietf-ace-oauth-authz], when
receiving an updated access token with updated authorization receiving an updated access token with updated authorization
information from the client (see Section 3.1), it is recommended that information from the client (see Section 3.1), it is recommended that
the RS overwrites the previous token, that is only the latest the RS overwrites the previous token, that is only the latest
authorization information in the token received by the RS is valid. authorization information in the token received by the RS is valid.
This simplifies the process needed by the RS to keep track of This simplifies the process needed by the RS to keep track of
skipping to change at page 20, line 16 skipping to change at page 20, line 45
This parameter MUST be sent from the RS to the client if the ace This parameter MUST be sent from the RS to the client if the ace
profile used is coap_oscore, and the message is not a response to an profile used is coap_oscore, and the message is not a response to an
update of access rights, protected with an existing OSCORE Security update of access rights, protected with an existing OSCORE Security
Context. The parameter is encoded as a byte string for CBOR-based Context. The parameter is encoded as a byte string for CBOR-based
interactions, and as a string (Base64 encoded binary) for JSON-based interactions, and as a string (Base64 encoded binary) for JSON-based
interactions. This parameter is registered in Section 9.2 interactions. This parameter is registered in Section 9.2
4.3. OSCORE Setup 4.3. OSCORE Setup
Once receiving the 2.01 (Created) response from the RS, following the Once the 2.01 (Created) response is received from the RS, following
POST request to authz-info endpoint, the client MUST extract the bstr the POST request to authz-info endpoint, the client MUST extract the
nonce N2 from the 'nonce2' parameter in the CBOR map in the payload bstr nonce N2 from the "nonce2" parameter in the CBOR map in the
of the response. Then, the client MUST set the Master Salt of the payload of the response. Then, the client MUST set the Master Salt
Security Context created to communicate with the RS to the of the Security Context created to communicate with the RS to the
concatenation of salt, N1, and N2, in this order: Master Salt = concatenation of salt, N1, and N2, in this order: Master Salt =
salt | N1 | N2, where | denotes byte string concatenation, where salt salt | N1 | N2, where | denotes byte string concatenation, where salt
is the CBOR byte string received from the AS in Section 3.2, and is the CBOR byte string received from the AS in Section 3.2, and
where N1 and N2 are the two nonces encoded as CBOR byte strings. An where N1 and N2 are the two nonces encoded as CBOR byte strings. An
example of Master Salt construction using CBOR encoding is given in example of Master Salt construction using CBOR encoding is given in
Figure 12. Figure 12.
N1, N2 and input salt expressed in CBOR diagnostic notation: N1, N2 and input salt expressed in CBOR diagnostic notation:
nonce1 = h'018a278f7faab55a' nonce1 = h'018a278f7faab55a'
nonce2 = h'25a8991cd700ac01' nonce2 = h'25a8991cd700ac01'
input salt = h'f9af838368e353e78888e1426bd94e6f' input salt = h'f9af838368e353e78888e1426bd94e6f'
N1, N2 and input salt as CBOR encoded byte strings: N1, N2 and input salt as CBOR encoded byte strings:
nonce1 = 0x48018a278f7faab55a nonce1 = 0x48018a278f7faab55a
nonce2 = 0x4825a8991cd700ac01 nonce2 = 0x4825a8991cd700ac01
input salt = 0x50f9af838368e353e78888e1426bd94e6f input salt = 0x50f9af838368e353e78888e1426bd94e6f
Master Salt = 0x50 f9af838368e353e78888e1426bd94e6f Master Salt = 0x50 f9af838368e353e78888e1426bd94e6f
48 018a278f7faab55a 48 25a8991cd700ac01 48 018a278f7faab55a 48 25a8991cd700ac01
Figure 12: Example of Master Salt construction using CBOR encoding Figure 12: Example of Master Salt construction using CBOR encoding
If JSON is used instead of CBOR, the Master Salt of the Security If JSON is used instead of CBOR, the Master Salt of the Security
Context is the Base64 encoding of the concatenation of the same Context is the Base64 encoding of the concatenation of the same
parameters, each of them prefixed by their size, encoded in 1 byte. parameters, each of them prefixed by their size, encoded in 1 byte.
When using JSON, the nonces and input salt have a maximum size of 255 When using JSON, the nonces and input salt have a maximum size of 255
bytes. An example of Master Salt construction using Base64 encoding bytes. An example of Master Salt construction using Base64 encoding
is given in Figure 13. is given in Figure 13.
N1, N2 and input salt values: N1, N2 and input salt values:
nonce1 = 0x018a278f7faab55a (8 bytes) nonce1 = 0x018a278f7faab55a (8 bytes)
nonce2 = 0x25a8991cd700ac01 (8 bytes) nonce2 = 0x25a8991cd700ac01 (8 bytes)
input salt = 0xf9af838368e353e78888e1426bd94e6f (16 bytes) input salt = 0xf9af838368e353e78888e1426bd94e6f (16 bytes)
Input to Base64 encoding: 0x10 f9af838368e353e78888e1426bd94e6f Input to Base64 encoding: 0x10 f9af838368e353e78888e1426bd94e6f
08 018a278f7faab55a 08 25a8991cd700ac01 08 018a278f7faab55a 08 25a8991cd700ac01
Master Salt = b64'EPmvg4No41PniIjhQmvZTm8IAYonj3+qtVoIJaiZHNcArAE=' Master Salt = b64'EPmvg4No41PniIjhQmvZTm8IAYonj3+qtVoIJaiZHNcArAE='
Figure 13: Example of Master Salt construction using Base64 encoding Figure 13: Example of Master Salt construction using Base64 encoding
The client MUST set the Sender ID to the ace_server_recipientid The client MUST set the Sender ID to the ace_server_recipientid
received in Section 4.2, and the Recipient ID to the received in Section 4.2, and the Recipient ID to the
ace_client_recipientid sent in Section 4.1. The client MUST set the ace_client_recipientid sent in Section 4.1. The client MUST set the
Master Secret from the parameter received from the AS in Section 3.2. Master Secret from the parameter received from the AS in Section 3.2.
The client MUST set the AEAD Algorithm, ID Context, HKDF, and OSCORE The client MUST set the AEAD Algorithm, ID Context, HKDF, and OSCORE
Version from the parameters received from the AS in Section 3.2, if Version from the parameters received from the AS in Section 3.2, if
present. In case an optional parameter is omitted, the default value present. In case an optional parameter is omitted, the default value
SHALL be used as described in sections 3.2 and 5.4 of [RFC8613]. SHALL be used as described in sections 3.2 and 5.4 of [RFC8613].
After that, the client MUST derive the complete Security Context After that, the client MUST derive the complete Security Context
following section 3.2.1 of [RFC8613]. From this point on, the client following section 3.2.1 of [RFC8613]. From this point on, the client
MUST use this Security Context to communicate with the RS when MUST use this Security Context to communicate with the RS when
accessing the resources as specified by the authorization accessing the resources as specified by the authorization
information. information.
If any of the expected parameters is missing (e.g., any of the If any of the expected parameters is missing (e.g., any of the
mandatory parameters from the AS or the RS), or if mandatory parameters from the AS or the RS), or if
ace_client_recipientid equals ace_server_recipientid (and as a ace_client_recipientid equals ace_server_recipientid (and as a
consequence the Sender and Recipient Keys derived would be equal, see consequence the Sender and Recipient Keys derived would be equal, see
skipping to change at page 23, line 29 skipping to change at page 24, line 6
introspection endpoint as specified in section 5.9 of introspection endpoint as specified in section 5.9 of
[I-D.ietf-ace-oauth-authz] and through the token endpoint as [I-D.ietf-ace-oauth-authz] and through the token endpoint as
specified in section 5.8 of [I-D.ietf-ace-oauth-authz]. specified in section 5.8 of [I-D.ietf-ace-oauth-authz].
6. Discarding the Security Context 6. Discarding the Security Context
There are a number of scenarios where a client or RS needs to discard There are a number of scenarios where a client or RS needs to discard
the OSCORE security context, and acquire a new one. the OSCORE security context, and acquire a new one.
The client MUST discard the current Security Context associated with The client MUST discard the current Security Context associated with
an RS when: an RS when any of the following occurs:
o the Sequence Number space ends. * the Sequence Number space ends.
o the access token associated with the context becomes invalid, due * the access token associated with the context becomes invalid due
to e.g. expiration. to, for example, expiration.
o the client receives a number of 4.01 Unauthorized responses to * the client receives a number of 4.01 Unauthorized responses to
OSCORE requests using the same Security Context. The exact number OSCORE requests using the same Security Context. The exact number
needs to be specified by the application. needs to be specified by the application.
o the client receives a new nonce in the 2.01 (Created) response * the client receives a new nonce in the 2.01 (Created) response
(see Section 4.2) to a POST request to the authz-info endpoint, (see Section 4.2) to a POST request to the authz-info endpoint,
when re-posting a (non-expired) token associated to the existing when re-posting a (non-expired) token associated to the existing
context. context.
The RS MUST discard the current Security Context associated with a The RS MUST discard the current Security Context associated with a
client when: client when any of the following occurs:
o the Sequence Number space ends. * the Sequence Number space ends.
o the access token associated with the context expires. * the access token associated with the context expires.
o the client has successfully replaced the current security context * the client has successfully replaced the current security context
with a newer one by posting an access token to the unprotected with a newer one by posting an access token to the unprotected
/authz-info endpoint at the RS, e.g., by re-posting the same /authz-info endpoint at the RS, e.g., by re-posting the same
token, as specified in Section 4.1. token, as specified in Section 4.1.
Whenever one more access token is successfully posted to the RS, and Whenever one more access token is successfully posted to the RS, and
a new Security Context is derived between the client and RS, messages a new Security Context is derived between the client and RS, messages
in transit that were protected with the previous Security Context in transit that were protected with the previous Security Context
might not pass verification, as the old context is discarded. That might not pass verification, as the old context is discarded. That
means that messages sent shortly before the client posts one more means that messages sent shortly before the client posts one more
access token to the RS might not successfully reach the destination. access token to the RS might not successfully reach the destination.
Analogously, implementations may want to cancel CoAP observations at Analogously, implementations may want to cancel CoAP observations at
the RS registered before the Security Context is replaced, or the RS registered before the Security Context is replaced, or
conversely they will need to implement a mechanism to ensure that conversely they will need to implement a mechanism to ensure that
those observation are to be protected with the newly derived Security those observations are to be protected with the newly derived
Context. Security Context.
7. Security Considerations 7. Security Considerations
This document specifies a profile for the Authentication and This document specifies a profile for the Authentication and
Authorization for Constrained Environments (ACE) framework Authorization for Constrained Environments (ACE) framework
[I-D.ietf-ace-oauth-authz]. Thus the general security considerations [I-D.ietf-ace-oauth-authz]. Thus the general security considerations
from the framework also apply to this profile. from the framework also apply to this profile.
Furthermore the general security considerations of OSCORE [RFC8613] Furthermore the general security considerations of OSCORE [RFC8613]
also apply to this specific use of the OSCORE protocol. also apply to this specific use of the OSCORE protocol.
As previously stated, the proof-of-possession in this profile is As previously stated, the proof-of-possession in this profile is
performed by both parties verifying that they have established the performed by both parties verifying that they have established the
same Security Context, as specified in Section 4.3, which means that same Security Context, as specified in Section 4.3, which means that
both the OSCORE request and OSCORE response pass verification. RS both the OSCORE request and the OSCORE response passes verification.
authentication requires both that the client trusts the AS and that RS authentication requires both that the client trusts the AS and
the OSCORE response from the RS pass verification. that the OSCORE response from the RS passes verification.
OSCORE is designed to secure point-to-point communication, providing OSCORE is designed to secure point-to-point communication, providing
a secure binding between the request and the response(s). Thus the a secure binding between the request and the response(s). Thus the
basic OSCORE protocol is not intended for use in point-to-multipoint basic OSCORE protocol is not intended for use in point-to-multipoint
communication (e.g., multicast, publish-subscribe). Implementers of communication (e.g., multicast, publish-subscribe). Implementers of
this profile should make sure that their use case corresponds to the this profile should make sure that their use case corresponds to the
expected use of OSCORE, to prevent weakening the security assurances expected use of OSCORE, to prevent weakening the security assurances
provided by OSCORE. provided by OSCORE.
Since the use of nonces N1 and N2 during the exchange guarantees Since the use of nonces N1 and N2 during the exchange guarantees
uniqueness of AEAD keys and nonces, it is REQUIRED that the exchanged uniqueness of AEAD keys and nonces, it is REQUIRED that the exchanged
nonces are not reused with the same input keying material even in nonces are not reused with the same input keying material even in
case of re-boots. This document RECOMMENDS the exchange of 64 bit case of re-boots. This document RECOMMENDS the exchange of 64 bit
random nonces. Considering the birthday paradox, the average random nonces. Considering the birthday paradox, the average
collision for each nonce will happen after 2^32 messages, which is collision for each nonce will happen after 2^32 messages, which is
considerably more token provisionings than expected for intended considerably more token provisioned than would be expected for
applications. If applications use something else, such as a counter, intended applications. If applications use something else, such as a
they need to guarantee that reboot and loss of state on either node counter, they need to guarantee that reboot and loss of state on
does not provoke reuse. If that is not guaranteed, nodes are either node does not provoke reuse. If that is not guaranteed, nodes
susceptible to reuse of AEAD (nonce, key) pairs, especially since an are susceptible to reuse of AEAD (nonce, key) pairs, especially since
on-path attacker can cause the use of a previously exchanged client an on-path attacker can cause the use of a previously exchanged
nonce N1 for Security Context establishment by replaying the client nonce N1 for Security Context establishment by replaying the
corresponding client-to-server message. corresponding client-to-server message.
This profile recommends that the RS maintains a single access token This profile RECOMMENDS that the RS maintains a single access token
for each client. The use of multiple access tokens for a single for each client. The use of multiple access tokens for a single
client increases the strain on the resource server as it must client increases the strain on the resource server as it must
consider every access token and calculate the actual permissions of consider every access token and calculate the actual permissions of
the client. Also, tokens indicating different or disjoint the client. Also, tokens indicating different or disjoint
permissions from each other may lead the server to enforce wrong permissions from each other may lead the server to enforce wrong
permissions. If one of the access tokens expires earlier than permissions. If one of the access tokens expires earlier than
others, the resulting permissions may offer insufficient protection. others, the resulting permissions may offer insufficient protection.
Developers should avoid using multiple access tokens for a same Developers SHOULD avoid using multiple access tokens for a same
client. client.
If a single OSCORE Input Material is used with multiple RSs, the RSs If a single OSCORE Input Material is used with multiple RSs, the RSs
can impersonate the client to one of the other RS, and impersonate can impersonate the client to one of the other RS, and impersonate
another RS to the client. If a master secret is used with several another RS to the client. If a master secret is used with several
clients, the clients can impersonate RS to one of the other clients. clients, the clients can impersonate RS to one of the other clients.
Similarly if symmetric keys are used to integrity protect the token Similarly if symmetric keys are used to integrity protect the token
between AS and RS and the token can be used with multiple RSs, the between AS and RS and the token can be used with multiple RSs, the
RSs can impersonate AS to one of the other RS. If the token key is RSs can impersonate AS to one of the other RS. If the token key is
used for any other communication between the RSs and AS, the RSs can used for any other communication between the RSs and AS, the RSs can
impersonate each other to the AS. impersonate each other to the AS.
8. Privacy Considerations 8. Privacy Considerations
This document specifies a profile for the Authentication and This document specifies a profile for the Authentication and
Authorization for Constrained Environments (ACE) framework Authorization for Constrained Environments (ACE) framework
skipping to change at page 26, line 27 skipping to change at page 26, line 50
information about the client, or may be used for correlating requests information about the client, or may be used for correlating requests
from one client. from one client.
Note that some information might still leak after OSCORE is Note that some information might still leak after OSCORE is
established, due to observable message sizes, the source, and the established, due to observable message sizes, the source, and the
destination addresses. destination addresses.
9. IANA Considerations 9. IANA Considerations
Note to RFC Editor: Please replace all occurrences of "[[this Note to RFC Editor: Please replace all occurrences of "[[this
specification]]" with the RFC number of this specification and delete document]]" with the RFC number of this document. Please add a
this paragraph. reference to the IANA ACE Profile registry in the nextt subsection
once it has been created by IANA, and then delete this paragraph.
9.1. ACE Profile Registry 9.1. ACE Profile Registry
The following registration is done for the ACE Profile Registry The following registration is done for the ACE Profile Registry
following the procedure specified in section 8.8 of following the procedure specified in section 8.8 of
[I-D.ietf-ace-oauth-authz]: [I-D.ietf-ace-oauth-authz]:
o Name: coap_oscore * Name: coap_oscore
o Description: Profile for using OSCORE to secure communication * Description: Profile for using OSCORE to secure communication
between constrained nodes using the Authentication and between constrained nodes using the Authentication and
Authorization for Constrained Environments framework. Authorization for Constrained Environments framework.
o CBOR Value: TBD (value between 1 and 255) * CBOR Value: TBD (value between 1 and 255)
o Reference: [[this specification]] * Reference: [[this document]]
9.2. OAuth Parameters Registry 9.2. OAuth Parameters Registry
The following registrations are done for the OAuth Parameters The following registrations are done for the OAuth Parameters
Registry following the procedure specified in section 11.2 of Registry [IANA.OAuthParameters] following the procedure specified in
[RFC6749]: section 11.2 of [RFC6749]:
o Parameter name: nonce1 * Parameter name: nonce1
o Parameter usage location: client-rs request * Parameter usage location: client-rs request
o Change Controller: IESG * Change Controller: IESG
o Specification Document(s): [[this specification]] * Specification Document(s): [[this document]]
o Parameter name: nonce2
o Parameter usage location: rs-client response
o Change Controller: IESG
o Specification Document(s): [[this specification]]
o Parameter name: ace_client_recipientid * Parameter name: nonce2
o Parameter usage location: client-rs request * Parameter usage location: rs-client response
o Change Controller: IESG * Change Controller: IESG
o Specification Document(s): [[this specification]] * Specification Document(s): [[this document]]
o Parameter name: ace_server_recipientid * Parameter name: ace_client_recipientid
o Parameter usage location: rs-client response * Parameter usage location: client-rs request
o Change Controller: IESG * Change Controller: IESG
o Specification Document(s): [[this specification]] * Specification Document(s): [[this document]]
* Parameter name: ace_server_recipientid
* Parameter usage location: rs-client response
* Change Controller: IESG
* Specification Document(s): [[this document]]
9.3. OAuth Parameters CBOR Mappings Registry 9.3. OAuth Parameters CBOR Mappings Registry
The following registrations are done for the OAuth Parameters CBOR The following registrations are done for the OAuth Parameters CBOR
Mappings Registry following the procedure specified in section 8.10 Mappings Registry following the procedure specified in section 8.10
of [I-D.ietf-ace-oauth-authz]: of [I-D.ietf-ace-oauth-authz]:
o Name: nonce1 * Name: nonce1
o CBOR Key: TBD1 * CBOR Key: TBD1
o Value Type: bstr * Value Type: bstr
o Reference: [[this specification]] * Reference: [[this document]]
o Name: nonce2 * Name: nonce2
o CBOR Key: TBD2 * CBOR Key: TBD2
o Value Type: bstr * Value Type: bstr
o Reference: [[this specification]] * Reference: [[this document]]
o Name: ace_client_recipientid * Name: ace_client_recipientid
o CBOR Key: TBD3 * CBOR Key: TBD3
o Value Type: bstr * Value Type: bstr
o Reference: [[this specification]] * Reference: [[this document]]
o Name: ace_server_recipientid * Name: ace_server_recipientid
o CBOR Key: TBD4 * CBOR Key: TBD4
o Value Type: bstr * Value Type: bstr
o Reference: [[this specification]] * Reference: [[this document]]
9.4. OSCORE Security Context Parameters Registry 9.4. OSCORE Security Context Parameters Registry
It is requested that IANA create a new registry entitled "OSCORE It is requested that IANA create a new registry entitled "OSCORE
Security Context Parameters" registry. The registry is to be created Security Context Parameters" registry. The registry is to be created
as Expert Review Required. Guidelines for the experts is provided as Expert Review Required. Guidelines for the experts is provided
Section 9.7. It should be noted that in addition to the expert Section 9.7. It should be noted that in addition to the expert
review, some portions of the registry require a specification, review, some portions of the registry require a specification,
potentially on standards track, be supplied as well. potentially on standards track, be supplied as well.
The columns of the registry are: The columns of the registry are:
name The JSON name requested (e.g., "ms"). Because a core goal of name The JSON name requested (e.g., "ms"). Because a core goal of
this specification is for the resulting representations to be this document is for the resulting representations to be compact,
compact, it is RECOMMENDED that the name be short. This name is it is RECOMMENDED that the name be short. This name is case
case sensitive. Names may not match other registered names in a sensitive. Names may not match other registered names in a case-
case-insensitive manner unless the Designated Experts determine insensitive manner unless the Designated Experts determine that
that there is a compelling reason to allow an exception. The name there is a compelling reason to allow an exception. The name is
is not used in the CBOR encoding. not used in the CBOR encoding.
CBOR label The value to be used to identify this algorithm. Map key CBOR label The value to be used to identify this algorithm. Map key
labels MUST be unique. The label can be a positive integer, a labels MUST be unique. The label can be a positive integer, a
negative integer or a string. Integer values between -256 and 255 negative integer or a string. Integer values between -256 and 255
and strings of length 1 are designated as Standards Track Document and strings of length 1 are designated as Standards Track Document
required. Integer values from -65536 to -257 and from 256 to required. Integer values from -65536 to -257 and from 256 to
65535 and strings of length 2 are designated as Specification 65535 and strings of length 2 are designated as Specification
Required. Integer values greater than 65535 and strings of length Required. Integer values greater than 65535 and strings of length
greater than 2 are designated as expert review. Integer values greater than 2 are designated as expert review. Integer values
less than -65536 are marked as private use. less than -65536 are marked as private use.
CBOR Type This field contains the CBOR type for the field. CBOR Type This field contains the CBOR type for the field.
skipping to change at page 28, line 39 skipping to change at page 29, line 15
specification This contains a pointer to the public specification specification This contains a pointer to the public specification
for the field if one exists for the field if one exists
This registry will be initially populated by the values in Table 1. This registry will be initially populated by the values in Table 1.
The specification column for all of these entries will be this The specification column for all of these entries will be this
document and [RFC8613]. document and [RFC8613].
9.5. CWT Confirmation Methods Registry 9.5. CWT Confirmation Methods Registry
The following registration is done for the CWT Confirmation Methods The following registration is done for the CWT Confirmation Methods
Registry following the procedure specified in section 7.2.1 of Registry [IANA.CWTConfirmationMethods] following the procedure
[RFC8747]: specified in section 7.2.1 of [RFC8747]:
o Confirmation Method Name: "osc" * Confirmation Method Name: "osc"
o Confirmation Method Description: OSCORE_Input_Material carrying * Confirmation Method Description: OSCORE_Input_Material carrying
the parameters for using OSCORE per-message security with implicit the parameters for using OSCORE per-message security with implicit
key confirmation key confirmation
o Confirmation Key: TBD (value between 4 and 255) * Confirmation Key: TBD (value between 4 and 255)
o Confirmation Value Type(s): map * Confirmation Value Type(s): map
o Change Controller: IESG * Change Controller: IESG
o Specification Document(s): Section 3.2.1 of [[this specification]] * Specification Document(s): Section 3.2.1 of [[this document]]
9.6. JWT Confirmation Methods Registry 9.6. JWT Confirmation Methods Registry
The following registration is done for the JWT Confirmation Methods The following registration is done for the JWT Confirmation Methods
Registry following the procedure specified in section 6.2.1 of Registry [IANA.JWTConfirmationMethods] following the procedure
[RFC7800]: specified in section 6.2.1 of [RFC7800]:
o Confirmation Method Value: "osc" * Confirmation Method Value: "osc"
o Confirmation Method Description: OSCORE_Input_Material carrying * Confirmation Method Description: OSCORE_Input_Material carrying
the parameters for using OSCORE per-message security with implicit the parameters for using OSCORE per-message security with implicit
key confirmation key confirmation
o Change Controller: IESG * Change Controller: IESG
o Specification Document(s): Section 3.2.1 of [[this specification]] * Specification Document(s): Section 3.2.1 of [[this document]]
9.7. Expert Review Instructions 9.7. Expert Review Instructions
The IANA registry established in this document is defined to use the The IANA registry established in this document is defined to use the
Expert Review registration policy. This section gives some general Expert Review registration policy. This section gives some general
guidelines for what the experts should be looking for, but they are guidelines for what the experts should be looking for, but they are
being designated as experts for a reason so they should be given being designated as experts for a reason so they should be given
substantial latitude. substantial latitude.
Expert reviewers should take into consideration the following points: Expert reviewers should take into consideration the following points:
o Point squatting should be discouraged. Reviewers are encouraged * Point squatting should be discouraged. Reviewers are encouraged
to get sufficient information for registration requests to ensure to get sufficient information for registration requests to ensure
that the usage is not going to duplicate one that is already that the usage is not going to duplicate one that is already
registered and that the point is likely to be used in deployments. registered and that the point is likely to be used in deployments.
The zones tagged as private use are intended for testing purposes The zones tagged as private use are intended for testing purposes
and closed environments. Code points in other ranges should not and closed environments. Code points in other ranges should not
be assigned for testing. be assigned for testing.
o Specifications are required for the standards track range of point * Specifications are required for the standards track range of point
assignment. Specifications should exist for specification assignment. Specifications should exist for specification
required ranges, but early assignment before a specification is required ranges, but early assignment before a specification is
available is considered to be permissible. Specifications are available is considered to be permissible. Specifications are
needed for the first-come, first-serve range if they are expected needed for the first-come, first-serve range if they are expected
to be used outside of closed environments in an interoperable way. to be used outside of closed environments in an interoperable way.
When specifications are not provided, the description provided When specifications are not provided, the description provided
needs to have sufficient information to identify what the point is needs to have sufficient information to identify what the point is
being used for. being used for.
o Experts should take into account the expected usage of fields when * Experts should take into account the expected usage of fields when
approving point assignment. The fact that there is a range for approving point assignment. The fact that there is a range for
standards track documents does not mean that a standards track standards track documents does not mean that a standards track
document cannot have points assigned outside of that range. The document cannot have points assigned outside of that range. The
length of the encoded value should be weighed against how many length of the encoded value should be weighed against how many
code points of that length are left, the size of device it will be code points of that length are left, the size of device it will be
used on, and the number of code points left that encode to that used on, and the number of code points left that encode to that
size. size.
10. References 10. References
skipping to change at page 30, line 18 skipping to change at page 30, line 39
[COSE.Algorithms] [COSE.Algorithms]
IANA, "COSE Algorithms", IANA, "COSE Algorithms",
<https://www.iana.org/assignments/cose/ <https://www.iana.org/assignments/cose/
cose.xhtml#algorithms>. cose.xhtml#algorithms>.
[I-D.ietf-ace-oauth-authz] [I-D.ietf-ace-oauth-authz]
Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and
H. Tschofenig, "Authentication and Authorization for H. Tschofenig, "Authentication and Authorization for
Constrained Environments (ACE) using the OAuth 2.0 Constrained Environments (ACE) using the OAuth 2.0
Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-36 Framework (ACE-OAuth)", Work in Progress, Internet-Draft,
(work in progress), November 2020. draft-ietf-ace-oauth-authz-36, 16 November 2020,
<http://www.ietf.org/internet-drafts/draft-ietf-ace-oauth-
authz-36.txt>.
[I-D.ietf-ace-oauth-params] [I-D.ietf-ace-oauth-params]
Seitz, L., "Additional OAuth Parameters for Authorization Seitz, L., "Additional OAuth Parameters for Authorization
in Constrained Environments (ACE)", draft-ietf-ace-oauth- in Constrained Environments (ACE)", Work in Progress,
params-13 (work in progress), April 2020. Internet-Draft, draft-ietf-ace-oauth-params-13, 28 April
2020, <http://www.ietf.org/internet-drafts/draft-ietf-ace-
oauth-params-13.txt>.
[I-D.ietf-cose-rfc8152bis-algs]
Schaad, J., "CBOR Object Signing and Encryption (COSE):
Initial Algorithms", Work in Progress, Internet-Draft,
draft-ietf-cose-rfc8152bis-algs-12, 24 September 2020,
<http://www.ietf.org/internet-drafts/draft-ietf-cose-
rfc8152bis-algs-12.txt>.
[I-D.ietf-cose-rfc8152bis-struct]
Schaad, J., "CBOR Object Signing and Encryption (COSE):
Structures and Process", Work in Progress, Internet-Draft,
draft-ietf-cose-rfc8152bis-struct-14, 24 September 2020,
<http://www.ietf.org/internet-drafts/draft-ietf-cose-
rfc8152bis-struct-14.txt>.
[IANA.CWTConfirmationMethods]
IANA, "CWT Confirmation Methods",
<https://www.iana.org/assignments/cwt/
cwt.xhtml#confirmation-methods>.
[IANA.JWTConfirmationMethods]
IANA, "JWT Confirmation Methods",
<https://www.iana.org/assignments/jwt/
jwt.xhtml#confirmation-methods>.
[IANA.OAuthParameters]
IANA, "OAuth Parameters",
<https://www.iana.org/assignments/oauth-parameters/oauth-
parameters.xhtml#parameters>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand
Key Derivation Function (HKDF)", RFC 5869,
DOI 10.17487/RFC5869, May 2010,
<https://www.rfc-editor.org/info/rfc5869>.
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>. <https://www.rfc-editor.org/info/rfc7252>.
[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 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig,
"CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392,
May 2018, <https://www.rfc-editor.org/info/rfc8392>. May 2018, <https://www.rfc-editor.org/info/rfc8392>.
[RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data
Definition Language (CDDL): A Notational Convention to Definition Language (CDDL): A Notational Convention to
skipping to change at page 31, line 17 skipping to change at page 32, line 27
(OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019,
<https://www.rfc-editor.org/info/rfc8613>. <https://www.rfc-editor.org/info/rfc8613>.
[RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", STD 94, RFC 8949, Representation (CBOR)", STD 94, RFC 8949,
DOI 10.17487/RFC8949, December 2020, DOI 10.17487/RFC8949, December 2020,
<https://www.rfc-editor.org/info/rfc8949>. <https://www.rfc-editor.org/info/rfc8949>.
10.2. Informative References 10.2. Informative References
[I-D.ietf-tls-dtls13]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The
Datagram Transport Layer Security (DTLS) Protocol Version
1.3", Work in Progress, Internet-Draft, draft-ietf-tls-
dtls13-40, 20 January 2021, <http://www.ietf.org/internet-
drafts/draft-ietf-tls-dtls13-40.txt>.
[RFC4949] Shirey, R., "Internet Security Glossary, Version 2", [RFC4949] Shirey, R., "Internet Security Glossary, Version 2",
FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007,
<https://www.rfc-editor.org/info/rfc4949>. <https://www.rfc-editor.org/info/rfc4949>.
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012, RFC 6749, DOI 10.17487/RFC6749, October 2012,
<https://www.rfc-editor.org/info/rfc6749>. <https://www.rfc-editor.org/info/rfc6749>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231, Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014, DOI 10.17487/RFC7231, June 2014,
<https://www.rfc-editor.org/info/rfc7231>. <https://www.rfc-editor.org/info/rfc7231>.
[RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of-
Possession Key Semantics for JSON Web Tokens (JWTs)", Possession Key Semantics for JSON Web Tokens (JWTs)",
RFC 7800, DOI 10.17487/RFC7800, April 2016, RFC 7800, DOI 10.17487/RFC7800, April 2016,
<https://www.rfc-editor.org/info/rfc7800>. <https://www.rfc-editor.org/info/rfc7800>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
[RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. [RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
Tschofenig, "Proof-of-Possession Key Semantics for CBOR Tschofenig, "Proof-of-Possession Key Semantics for CBOR
Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March
2020, <https://www.rfc-editor.org/info/rfc8747>. 2020, <https://www.rfc-editor.org/info/rfc8747>.
Appendix A. Profile Requirements Appendix A. Profile Requirements
This section lists the specifications on this profile based on the This section lists the specifications on this profile based on the
requirements on the framework, as requested in Appendix C of requirements on the framework, as requested in Appendix C of
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
o Optionally define new methods for the client to discover the * Optionally define new methods for the client to discover the
necessary permissions and AS for accessing a resource, different necessary permissions and AS for accessing a resource, different
from the one proposed in: Not specified from the one proposed in: Not specified
o Optionally specify new grant types: Not specified * Optionally specify new grant types: Not specified
o Optionally define the use of client certificates as client * Optionally define the use of client certificates as client
credential type: Not specified credential type: Not specified
* Specify the communication protocol the client and RS the must use:
o Specify the communication protocol the client and RS the must use:
CoAP CoAP
o Specify the security protocol the client and RS must use to * Specify the security protocol the client and RS must use to
protect their communication: OSCORE protect their communication: OSCORE
o Specify how the client and the RS mutually authenticate: * Specify how the client and the RS mutually authenticate:
Implicitly by possession of a common OSCORE security context. Implicitly by possession of a common OSCORE security context.
Note that the mutual authentication is not completed before the Note that the mutual authentication is not completed before the
client has verified an OSCORE response using this security client has verified an OSCORE response using this security
context. context.
o Specify the proof-of-possession protocol(s) and how to select one, * Specify the proof-of-possession protocol(s) and how to select one,
if several are available. Also specify which key types (e.g., if several are available. Also specify which key types (e.g.,
symmetric/asymmetric) are supported by a specific proof-of- symmetric/asymmetric) are supported by a specific proof-of-
possession protocol: OSCORE algorithms; pre-established symmetric possession protocol: OSCORE algorithms; pre-established symmetric
keys keys
o Specify a unique ace_profile identifier: coap_oscore * Specify a unique ace_profile identifier: coap_oscore
o If introspection is supported: Specify the communication and * If introspection is supported: Specify the communication and
security protocol for introspection: HTTP/CoAP (+ TLS/DTLS/OSCORE) security protocol for introspection: HTTP/CoAP (+ TLS/DTLS/OSCORE)
o Specify the communication and security protocol for interactions * Specify the communication and security protocol for interactions
between client and AS: HTTP/CoAP (+ TLS/DTLS/OSCORE) between client and AS: HTTP/CoAP (+ TLS/DTLS/OSCORE)
o Specify how/if the authz-info endpoint is protected, including how * Specify how/if the authz-info endpoint is protected, including how
error responses are protected: Not protected. error responses are protected: Not protected.
o Optionally define other methods of token transport than the authz- * Optionally define other methods of token transport than the authz-
info endpoint: Not defined info endpoint: Not defined
Acknowledgments Acknowledgments
The authors wish to thank Jim Schaad and Marco Tiloca for the input The authors wish to thank Jim Schaad and Marco Tiloca for the
on this memo. Special thanks to the responsible area director substantial input to this document, as well as Elwyn Davies, Linda
Benjamin Kaduk for his extensive review and contributed text. Ludwig Dunbar, Roman Danyliw, Martin Duke, Lars Eggert, Murray Kucherawy,
Seitz worked on this document as part of the CelticNext projects and Zaheduzzaman Sarker for their reviews and feedback. Special
CyberWI, and CRITISEC with funding from Vinnova. The work on this thanks to the responsible area director Benjamin Kaduk for his
document has been partly supported also by the H2020 project SIFIS- extensive review and contributed text. Ludwig Seitz worked on this
Home (Grant agreement 952652). document as part of the CelticNext projects CyberWI, and CRITISEC
with funding from Vinnova. The work on this document has been partly
supported also by the H2020 project SIFIS-Home (Grant agreement
952652).
Authors' Addresses Authors' Addresses
Francesca Palombini Francesca Palombini
Ericsson AB Ericsson AB
Email: francesca.palombini@ericsson.com Email: francesca.palombini@ericsson.com
Ludwig Seitz Ludwig Seitz
Combitech Combitech
Djaeknegatan 31 Djaeknegatan 31
Malmoe 211 35 SE-211 35 Malmoe
Sweden Sweden
Email: ludwig.seitz@combitech.se Email: ludwig.seitz@combitech.se
Goeran Selander Gรถran Selander
Ericsson AB Ericsson AB
Email: goran.selander@ericsson.com Email: goran.selander@ericsson.com
Martin Gunnarsson Martin Gunnarsson
RISE RISE
Scheelevagen 17 Scheelevagen 17
Lund 22370 SE-22370 Lund
Sweden Sweden
Email: martin.gunnarsson@ri.se Email: martin.gunnarsson@ri.se
 End of changes. 132 change blocks. 
312 lines changed or deleted 358 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/