draft-ietf-ace-oscore-profile-02.txt   draft-ietf-ace-oscore-profile-03.txt 
ACE Working Group L. Seitz ACE Working Group L. Seitz
Internet-Draft RISE SICS AB Internet-Draft RISE SICS AB
Intended status: Standards Track F. Palombini Intended status: Standards Track F. Palombini
Expires: December 30, 2018 Ericsson AB Expires: April 4, 2019 Ericsson AB
M. Gunnarsson M. Gunnarsson
RISE SICS AB RISE SICS AB
G. Selander G. Selander
Ericsson AB Ericsson AB
June 28, 2018 October 1, 2018
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-02 draft-ietf-ace-oscore-profile-03
Abstract Abstract
This memo specifies a profile for the Authentication and This memo 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, server authentication, (OSCORE) to provide communication security, server authentication,
and proof-of-possession for a key owned by the client and bound to an and proof-of-possession for a key owned by the client and bound to an
OAuth 2.0 access token. OAuth 2.0 access token.
skipping to change at page 1, line 41 skipping to change at page 1, line 41
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 December 30, 2018. This Internet-Draft will expire on April 4, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Client to Resource Server . . . . . . . . . . . . . . . . . . 3 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Signaling the use of OSCORE . . . . . . . . . . . . . . . 3 3. Client-AS Communication . . . . . . . . . . . . . . . . . . . 5
2.2. Key establishment for OSCORE . . . . . . . . . . . . . . 4 3.1. C-to-AS: POST /token . . . . . . . . . . . . . . . . . . 5
3. Client to Authorization Server . . . . . . . . . . . . . . . 8 3.2. AS-to-C: Access Token . . . . . . . . . . . . . . . . . . 6
4. Resource Server to Authorization Server . . . . . . . . . . . 8 4. Client-RS Communication . . . . . . . . . . . . . . . . . . . 11
5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 4.1. C-to-RS: POST /authz-info . . . . . . . . . . . . . . . . 11
6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 9 4.2. RS-to-C: 2.01 (Created) . . . . . . . . . . . . . . . . . 11
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 4.3. OSCORE Setup . . . . . . . . . . . . . . . . . . . . . . 12
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.4. Access rights verification . . . . . . . . . . . . . . . 13
8.1. Normative References . . . . . . . . . . . . . . . . . . 10 5. Secure Communication with AS . . . . . . . . . . . . . . . . 14
8.2. Informative References . . . . . . . . . . . . . . . . . 11 6. Security Considerations . . . . . . . . . . . . . . . . . . . 14
Appendix A. Profile Requirements . . . . . . . . . . . . . . . . 11 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 15
Appendix B. Using the pop-key with EDHOC (EDHOC+OSCORE) . . . . 12 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
B.1. Using Asymmetric Keys . . . . . . . . . . . . . . . . . . 13 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 16
B.2. Using Symmetric Keys . . . . . . . . . . . . . . . . . . 14 9.1. Normative References . . . . . . . . . . . . . . . . . . 16
B.3. Processing . . . . . . . . . . . . . . . . . . . . . . . 16 9.2. Informative References . . . . . . . . . . . . . . . . . 17
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 17 Appendix A. Profile Requirements . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 Appendix B. Using the pop-key with EDHOC (EDHOC+OSCORE) . . . . 18
B.1. Using Asymmetric Keys . . . . . . . . . . . . . . . . . . 18
B.2. Using Symmetric Keys . . . . . . . . . . . . . . . . . . 20
B.3. Processing . . . . . . . . . . . . . . . . . . . . . . . 22
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 23
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
This memo specifies a profile of the ACE framework This memo specifies a profile of the ACE framework
[I-D.ietf-ace-oauth-authz]. In this profile, a client and a resource [I-D.ietf-ace-oauth-authz]. In this profile, a client and a resource
server use CoAP [RFC7252] to communicate. The client uses an access server use CoAP [RFC7252] to communicate. The client uses an access
token, bound to a key (the proof-of-possession key) to authorize its token, bound to a key (the proof-of-possession key) to authorize its
access to the resource server. In order to provide communication access to the resource server. In order to provide communication
security, proof of possession, and server authentication they use security, proof of possession, and server authentication they use
Object Security for Constrained RESTful Environments (OSCORE) Object Security for Constrained RESTful Environments (OSCORE)
[I-D.ietf-core-object-security]. Optionally the client and the [I-D.ietf-core-object-security].
resource server may also use CoAP and OSCORE to communicate with the
authorization server.
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. In order to provide replay and [RFC8152] to secure CoAP messages. Note that OSCORE can be used to
reordering protection OSCORE also introduces sequence numbers that secure CoAP messages, as well as HTTP and combinations of HTTP and
are used together with COSE. CoAP; a profile of ACE similar to the one described in this document,
with the difference of using HTTP instead of CoAP as communication
Note that OSCORE can be used to secure CoAP messages, as well as HTTP protocol, could be specified analogously to this one.
and combinations of HTTP and CoAP; a 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.
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", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. These document are to be interpreted as described in [RFC2119]. These
words may also appear in this document in lowercase, absent their words may also appear in this document in lowercase, absent their
normative meanings. normative meanings.
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", and "verify" are taken from [RFC4949].
Since we describe exchanges as RESTful protocol interactions HTTP RESTful terminology follows HTTP [RFC7231].
[RFC7231] offers useful terminology.
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] and [I-D.ietf-ace-actors], such as client (C), resource [RFC6749], such as client (C), resource server (RS), and
server (RS), and authorization server (AS). It is assumed in this authorization server (AS). It is assumed in this document that a
document that a given resource on a specific RS is associated to a given resource on a specific RS is associated to a unique AS.
unique AS.
2. Client to Resource Server 2. Protocol Overview
The use of OSCORE for arbitrary CoAP messages is specified in This section gives an overview on how to use the ACE Framework
[I-D.ietf-core-object-security]. This section defines the specific [I-D.ietf-ace-oauth-authz] to secure the communication between a
uses and their purpose for securing the communication between a client and a resource server using OSCORE
client and a resource server, and the parameters needed to negotiate [I-D.ietf-core-object-security]. The parameters needed to negotiate
the use of this profile with the token resource at the authorization the use of this profile with the token resource at the authorization
server as specified in section 5.6 of [I-D.ietf-ace-oauth-authz]. server as specified in section 5.6 of [I-D.ietf-ace-oauth-authz] are
described in detail in the following sections.
2.1. Signaling the use of OSCORE This profile requires a client to retrieve an access token from the
AS for the resource it wants to access on a RS, using the token
endpoint, as specified in section 5.6.1 of
[I-D.ietf-ace-oauth-authz]. To determine the AS in charge of a
resource hosted at the RS, the client C MAY send an initial
Unauthorized Resource Request message to the RS. The RS then denies
the request and sends the address of its AS back to the client C as
specified in section 5.1 of [I-D.ietf-ace-oauth-authz]. The access
token request and response MUST be confidentiality-protected and
ensure authenticity. This profile RECOMMENDS the use of OSCORE
between client and AS, but TLS or DTLS MAY be used additionally or
instead.
A client requests a token at an AS via the /token resource. This Once the client has retrieved the access token, it forwards it to the
follows the message formats specified in section 5.6.1 of RS using the authz-info endpoint and mechanisms specified in section
5.8.1. of [I-D.ietf-ace-oauth-authz]. If the access token is valid,
the RS replies to this request with a 2.01 (Created) response, which
contains a nonce N1.
After receiving the nonce N1, the client generates a nonce N2,
concatenates it with N1 and sets the ID Context in its Security
Context (see section 3 of [I-D.ietf-core-object-security]) to N1
concatenated with N2. The client then derives the complete Security
Context from the ID Context plus the parameters received from the AS.
Finally, the client sends a request protected with OSCORE to the RS.
This message contains the ID Context value. When receiving this
request after the 2.01 (Created) response, the server extract the ID
Context from it, verifies that the first part is equal to the nonce
N1 it previously sent, and if so, sets its own ID Context and derives
the complete Security Context from it plus the parameters received in
the AS, following section 3.2 of [I-D.ietf-core-object-security]. If
the request verifies, then this Security Context is stored in the
server, and used in the response, and in further communications with
the client, until token expiration. The client will not include the
ID Context value in further requests.
An overview of the profile flow for the OSCORE profile is given in
Figure 1.
C RS AS
| [-- Resource Request --->] | |
| | |
| [<----- AS Information --] | |
| | |
| ----- POST /token ----------------------------> |
| | |
| <---------------------------- Access Token ----- |
| + RS Information |
| ---- POST /authz-info ---> | |
| | |
| <--- 2.01 Created (N1) --- | |
| | |
/Sec Context Derivation/ | |
| | |
| ---- OSCORE Request -----> | |
| (N1, N2) | |
| | |
| /Sec Context Derivation/ |
| | |
| <--- OSCORE Response ----- | |
| | |
| ---- OSCORE Request -----> | |
| | |
| <--- OSCORE Response ----- | |
| ... | |
Figure 1: Protocol Overview
3. Client-AS Communication
The following subsections describe the details of the POST /token
request and response between client and AS. Section 3.2 of
[I-D.ietf-core-object-security] defines how to derive a security
context based on a shared master secret and a set of other
parameters, established between client and server, which the client
receives from the AS in this exchange. The proof-of-possession key
(pop-key) provisioned from the AS MUST be used as master secret in
OSCORE.
3.1. C-to-AS: POST /token
The client-to-AS request is specified in Section 5.6.1 of
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
The AS responding to a successful access token request as defined in If the client wants to update its access rights using the same OSCORE
section 5.6.2 of [I-D.ietf-ace-oauth-authz] can signal that the use Security Context, it MUST include in its POST /token request a cnf
of OSCORE is REQUIRED for a specific access token by including the object carrying the Sender ID in the kid field. This identifier can
"profile" parameter with the value "coap_oscore" in the access token be used by the AS to determine the shared secret to construct the
response. This means that the client MUST use OSCORE towards all proof-of-possession token and therefore MUST specify a symmetric key
resource servers for which this access token is valid, and follow that was previously generated by the AS as a shared secret for the
Section 2.2 to derive the security context to run OSCORE. communication between the client and the RS.
The error response procedures defined in section 5.6.3 of the ACE The client MUST send this POST /token request over a secure channel
framework are unchanged by this profile. that guarantees authentication, message integrity and confidentiality
(see Section 5).
Note the the client and the authorization server MAY OPTIONALLY use An example of such a request, in CBOR diagnostic notation without the
OSCORE to protect the interaction via the /token resource. See tag and value abbreviations is reported in Figure 2
Section 3 for details.
2.2. Key establishment for OSCORE Header: POST (Code=0.02)
Uri-Host: "as.example.com"
Uri-Path: "token"
Content-Format: "application/ace+cbor"
Payload:
{
"grant_type" : "client_credentials",
"client_id" : "myclient",
"aud" : "tempSensor4711"
}
Section 3.2 of [I-D.ietf-core-object-security] defines how to derive Figure 2: Example C-to-AS POST /token request for an access token
a security context based on a shared master secret and a set of other bound to a symmetric key.
parameters, established between client and server. The proof-of-
possession key (pop-key) provisioned from the AS MAY, in case of pre-
shared keys, be used directly as master secret in OSCORE.
If OSCORE is used directly with the symmetric pop-key as master 3.2. AS-to-C: Access Token
secret, then the AS MUST provision the following data, in response to
the access token request:
o a master secret After verifying the POST /token request and that the client is
authorized to obtain an access token corresponding to its access
token request, the AS responds as defined in section 5.6.2 of
[I-D.ietf-ace-oauth-authz]. It signals that the use of OSCORE is
REQUIRED for a specific access token by including the "profile"
parameter with the value "coap_oscore" in the access token response.
This means that the client MUST use OSCORE towards all resource
servers for which this access token is valid, and follow Section 4.3
to derive the security context to run OSCORE.
o the sender identifier The error response procedures defined in section 5.6.3 of the ACE
framework are unchanged by this profile.
o the recipient identifier Moreover, the AS MUST provision the following data:
o a master secret
o a client identifier
o a server identifier
Additionally, the AS MAY provision the following data, in the same Additionally, the AS MAY provision the following data, in the same
response. In case these parameters are omitted, the default values response.
are used as described in section 3.2 of
[I-D.ietf-core-object-security].
o an AEAD algorithm o an AEAD algorithm
o a KDF algorithm o an HKDF algorithm
o a salt o a salt
o a replay window type and size o a replay window type and size
The master secret MUST be communicated as COSE_Key in the 'cnf' The master secret MUST be communicated as COSE_Key in the 'cnf'
parameter of the access token response as defined in Section 5.6.4.5 parameter of the access token response as defined in Section 5.6.4.5
of [I-D.ietf-ace-oauth-authz]. The AEAD algorithm MAY be included as of [I-D.ietf-ace-oauth-authz]. The AEAD algorithm MAY be included as
the 'alg' parameter in the COSE_Key; the KDF algorithm MAY be the 'alg' parameter in the COSE_Key; the HKDF algorithm MAY be
included as the 'kdf' parameter of the COSE_Key and the salt MAY be included as the 'hkdf' parameter of the COSE_Key and the salt MAY be
included as the 'slt' parameter of the COSE_Key as defined in table included as the 'slt' parameter of the COSE_Key as defined in
1. Figure 3.
The same parameters MUST be included as metadata of the access token; The same parameters MUST be included as metadata of the access token.
if the token is a CWT [RFC8392], the same COSE_Key structure MUST be This profile RECOMMENDS the use of CBOR web token (CWT) as specified
placed in the 'cnf' claim of this token. If a CWT is used it MUST be in [RFC8392]. If the token is a CWT, the same COSE_Key structure
encrypted, since the token is transferred from the client to the RS defined above MUST be placed in the 'cnf' claim of this token.
over an unprotected channel.
The AS MUST also assign identifiers to both client and RS, which are The AS MUST also assign identifiers to both client and RS, which are
then used as Sender ID and Recipient ID in the OSCORE context as then used as Sender ID and Recipient ID in the OSCORE context as
described in section 3.1 of [I-D.ietf-core-object-security]. These described in section 3.1 of [I-D.ietf-core-object-security]. These
identifiers MUST be unique in the set of all clients and RS identifiers MUST be unique in the set of all clients and RS
identifiers for a certain AS. Moreover, these MUST be included in identifiers for a certain AS. Moreover, these MUST be included in
the COSE_Key as header parameters, as defined in table 1. the COSE_Key as header parameters, as defined in Figure 3.
We assume in this document that a resource is associated to one We assume in this document that a resource is associated to one
single AS, which makes it possible to assume unique identifiers for single AS, which makes it possible to assume unique identifiers for
each client requesting a particular resource to a RS. If this is not each client requesting a particular resource to a RS. If this is not
the case, collisions of identifiers may appear in the RS, in which the case, collisions of identifiers may appear in the RS, in which
case the RS needs to have a mechanism in place to disambiguate case the RS needs to have a mechanism in place to disambiguate
identifiers or mitigate their effect. identifiers or mitigate their effect.
Note that C should set the Sender ID of its security context to the Note that C should set the Sender ID of its Security Context to the
clientId value received and the Recipient ID to the serverId value, clientId value received and the Recipient ID to the serverId value,
and RS should do the opposite. and RS should do the opposite.
+----------+-------+--------------+------------+-------------------+ +----------+-------+--------------+------------+-------------------+
| name | label | CBOR type | registry | description | | name | label | CBOR type | registry | description |
+----------+-------+--------------+------------+-------------------+ +----------+-------+--------------+------------+-------------------+
| clientId | TBD1 | bstr | | Identifies the | | clientId | TBD1 | bstr | | Identifies the |
| | | | | client in an | | | | | | client in an |
| | | | | OSCORE context | | | | | | OSCORE context |
| | | | | using this key | | | | | | using this key |
| | | | | | | | | | | |
| serverId | TBD2 | bstr | | Identifies the | | serverId | TBD2 | bstr | | Identifies the |
| | | | | server in an | | | | | | server in an |
| | | | | OSCORE context | | | | | | OSCORE context |
| | | | | using this key | | | | | | using this key |
| | | | | | | | | | | |
| kdf | TBD3 | bstr | | Identifies the | | hkdf | TBD3 | bstr | | Identifies the |
| | | | | KDF algorithm in | | | | | | KDF algorithm in |
| | | | | an OSCORE context | | | | | | an OSCORE context |
| | | | | using this key | | | | | | using this key |
| | | | | | | | | | | |
| slt | TBD4 | bstr | | Identifies the | | slt | TBD4 | bstr | | Identifies the |
| | | | | master salt in | | | | | | master salt in |
| | | | | an OSCORE context | | | | | | an OSCORE context |
| | | | | using this key | | | | | | using this key |
+----------+-------+--------------+------------+-------------------+ +----------+-------+--------------+------------+-------------------+
Table 1: Additional COSE_Key Common Parameters
Figure 1 shows an example of such an AS response, in CBOR diagnostic Figure 3: Additional COSE_Key Common Parameters
Figure 4 shows an example of such an AS response, in CBOR diagnostic
notation without the tag and value abbreviations. notation without the tag and value abbreviations.
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Type: "application/cose+cbor" Content-Type: "application/cose+cbor"
Payload: Payload:
{ {
"access_token" : b64'SlAV32hkKG ... "access_token" : b64'SlAV32hkKG ...
(remainder of access token omitted for brevity)', (remainder of access token omitted for brevity)',
"profile" : "coap_oscore", "profile" : "coap_oscore",
"expires_in" : "3600", "expires_in" : "3600",
skipping to change at page 7, line 24 skipping to change at page 9, line 24
"COSE_Key" : { "COSE_Key" : {
"kty" : "Symmetric", "kty" : "Symmetric",
"alg" : "AES-CCM-16-64-128", "alg" : "AES-CCM-16-64-128",
"clientId" : b64'qA', "clientId" : b64'qA',
"serverId" : b64'Qg', "serverId" : b64'Qg',
"k" : b64'+a+Dg2jjU+eIiOFCa9lObw' "k" : b64'+a+Dg2jjU+eIiOFCa9lObw'
} }
} }
} }
Figure 1: Example AS response with OSCORE parameters. Figure 4: Example AS-to-C Access Token response with OSCORE profile.
Figure 2 shows an example CWT, containing the necessary OSCORE Figure 5 shows an example CWT, containing the necessary OSCORE
parameters in the 'cnf' claim, in CBOR diagnostic notation without parameters in the 'cnf' claim, in CBOR diagnostic notation without
tag and value abbreviations. 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" : {
"COSE_Key" : { "COSE_Key" : {
"kty" : "Symmetric", "kty" : "Symmetric",
"alg" : "AES-CCM-16-64-128", "alg" : "AES-CCM-16-64-128",
"clientId" : b64'Qg', "clientId" : b64'Qg',
"serverId" : b64'qA', "serverId" : b64'qA',
"k" : b64'+a+Dg2jjU+eIiOFCa9lObw' "k" : b64'+a+Dg2jjU+eIiOFCa9lObw'
} }
} }
Figure 2: Example CWT with OSCORE parameters. Figure 5: Example CWT with OSCORE parameters.
If the client has requested an update to its access rights using the
same OSCORE Security Context, and the token associated with it is not
expired, the AS MAY omit the master secret and server identifier both
in the COSE_Key in the 'cnf' parameter and in the token. The client
identifier needs to be provisioned, in order for the RS to identify
the previously generated Security Context.
Figure 6 shows an example of such an AS response, in CBOR diagnostic
notation without the tag and value abbreviations.
Header: Created (Code=2.01)
Content-Type: "application/cose+cbor"
Payload:
{
"access_token" : b64'SlAV32hkKG ...
(remainder of access token omitted for brevity)',
"profile" : "coap_oscore",
"expires_in" : "3600",
"cnf" : {
"COSE_Key" : {
"clientId" : b64'qA'
}
}
}
Figure 6: Example AS-to-C Access Token response with OSCORE profile,
for update of access rights.
Figure 7 shows an example CWT, containing the necessary OSCORE
parameters in the 'cnf' claim for update of access rights, in CBOR
diagnostic notation without tag and value abbreviations.
{
"aud" : "tempSensorInLivingRoom",
"iat" : "1360189224",
"exp" : "1360289224",
"scope" : "temperature_h",
"cnf" : {
"COSE_Key" : {
"clientId" : b64'Qg'
}
}
Figure 7: Example CWT with OSCORE parameters for update of access
rights.
4. Client-RS Communication
The following subsections describe the details of the POST /authz-
info request and response between client and RS. The client posts
the token that includes the materials provisioned by the AS to the
RS, which can then use Section 3.2 of [I-D.ietf-core-object-security]
to derive a security context based on a shared master secret and a
set of other parameters, established between client and server.
Note that the proof-of-possession required to bind the access token Note that the proof-of-possession required to bind the access token
to the client is implicitly performed by generating the shared OSCORE to the client is implicitly performed by generating the shared OSCORE
context using the pop-key as master secret, both on the client and RS Security Context using the pop-key as master secret, for both client
side. An attacker using a stolen token will not be able to generate and RS. An attacker using a stolen token will not be able to
a valid OSCORE context and thus not be able to prove possession of generate a valid OSCORE context and thus not be able to prove
the pop-key. possession of the pop-key.
3. Client to Authorization Server 4.1. C-to-RS: POST /authz-info
As specified in the ACE framework (section 5.6 of The client MUST use CoAP and the Authorization Information endpoint
[I-D.ietf-ace-oauth-authz]), the Client and AS can also use CoAP as described in section 5.8.1 of [I-D.ietf-ace-oauth-authz] to
instead of HTTP to communicate via the token resource. This section transport the token to the RS.
specifies how to use OSCORE between Client and AS together with CoAP.
The use of OSCORE for this communication is OPTIONAL in this profile,
other security protocols (such as DTLS) MAY be used instead.
The client and the AS are expected to have pre-established security The authz-info endpoint is not protected, nor are the responses from
contexts in place. How these security contexts are established is this endpoint.
out of scope for this profile. Furthermore the client and the AS
communicate using OSCORE ([I-D.ietf-core-object-security]) through
the introspection resource as specified in section 5.7 of
[I-D.ietf-ace-oauth-authz].
4. Resource Server to Authorization Server The access token MUST be encrypted, since it is transferred from the
client to the RS over an unprotected channel.
Figure 8 shows an example of the request sent from the client to the
RS.
Header: POST (Code=0.02)
Uri-Host: "rs.example.com"
Uri-Path: "authz-info"
Content-Format: "application/cwt"
Payload:
b64'SlAV32hkKG ...
(remainder of access token omitted for brevity)',
Figure 8: Example C-to-RS POST /authz-info request using CWT
4.2. RS-to-C: 2.01 (Created)
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
token. If the token is valid, the RS MUST respond to the POST
request with 2.01 (Created). This response MAY contain an identifier
of the token (e.g., the cti for a CWT) as a payload, in order to
allow the client to refer to the token. If the token is valid but is
associated to claims that the RS cannot process (e.g., an unknown
scope) the RS MUST respond with a response code equivalent to the
CoAP code 4.00 (Bad Request). In the latter case the RS MAY provide
additional information in the error response, in order to clarify
what went wrong. The RS MAY make an introspection request to
validate the token before responding to the POST request to the
authz-info endpoint.
Additionally, the RS MUST generate a nonce (N1) with a good amount of
randomness, and include it in the payload of the 2.01 (Created)
response as a CBOR byte string. This profile RECOMMENDS to use a
nonce of 64 bits. The RS MUST store this nonce as long as the access
token related to it is still valid.
Figure 9 shows an example of the response sent from the RS to the
client.
Header: Created (Code=2.01)
Content-Format: "application/cbor"
Payload:
h'018a278f7faab55a',
Figure 9: Example RS-to-C 2.01 (Created) response
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
(Unauthorized) for any long running request before terminating the
session, when the access token expires.
4.3. OSCORE Setup
Once receiving the 2.01 (Created) response from the RS, following the
POST /authz-info request, the client MUST extract the nonce N1 from
the CBOR byte string in the payload of the response. The client MUST
generate itself a nonce (N2) with a good amount of randomness. This
profile RECOMMENDS to use a nonce of 64 bits. Then, the client MUST
set the ID Context of the Security Context created to communicate
with the RS to the concatenation of N1 and N2, in this order: ID
Context = N1 | N2, where | denotes byte string concatenation. The
client MUST set the Master Secret, Sender ID and Recipient ID from
the parameters received from the AS in Section 3.2. The client MUST
set the AEAD Algorithm, Master Salt, HKDF and Replay Window from the
parameters received from the AS in Section 3.2, if present. In case
these parameters are omitted, the default values are used as
described in section 3.2 of [I-D.ietf-core-object-security]. After
that, the client MUST derive the complete Security Context following
section 3.2.1 of [I-D.ietf-core-object-security]. From this point
on, the client MUST use this Security Context to communicate with the
RS when accessing the resources as specified by the authorization
information.
The client then uses this Security Context to send requests to RS
using OSCORE. In the first request sent to the RS, the client MUST
include the kid context, with value ID Context, i.e. N1 concatenated
with N2. The client needs to make sure the RS receives the kid
context, possibly adding the kid context to later requests, until it
receives a valid OSCORE response from the RS using the same Security
Context.
When the RS receives this first OSCORE-protected request, it MUST
extract the kid context from the message first. Then, it needs to
verify that the first part of the kid context corresponds to the
nonce N1 it previously sent, and that it is followed by a non-zero-
length byte string. If that is verified, the RS MUST set the ID
Context to the kid context value. Then, the RS MUST set the Master
Secret, Sender ID and Recipient ID from the parameters received from
the client in the access token in Section 4.1. The RS MUST set the
AEAD Algorithm, Master Salt, HKDF and Replay Window from the
parameters received from the client in the access token in
Section 4.1, if present. In case these parameters are omitted, the
default values are used as described in section 3.2 of
[I-D.ietf-core-object-security]. After that, the RS MUST derive the
complete Security Context following section 3.2.1 of
[I-D.ietf-core-object-security], and MUST associate this Security
Context with the authorization information from the access token.
Then, the RS MUST delete the nonce N1 from memory.
The RS then uses this Security Context to verify the request and send
responses to RS using OSCORE. If OSCORE verification fails, error
responses are used, as specified in section 8 of
[I-D.ietf-core-object-security]. Additionally, if OSCORE
verification succeeds, the verification of access rights is performed
as described in section Section 4.4. The RS MUST NOT use the
Security Context after the related token has expired, and MUST
respond with a unprotected 4.01 (Unauthorized) error message.
4.4. Access rights verification
The RS MUST follow the procedures defined in section 5.8.2 of
[I-D.ietf-ace-oauth-authz]: if an RS receives a OSCORE-protected
request from a client, then it processes according to
[I-D.ietf-core-object-security]. If OSCORE verification succeeds,
and the target resource requires authorization, the RS retrieves the
authorization information from the access token associated to the
Security Context. The RS then MUST verify that the authorization
information covers the resource and the action requested.
The response code MUST be 4.01 (Unauthorized) in case the client has
not used the Security Context associated with the access token, or if
RS has no valid access token for the client. If RS has an access
token for the client but not for the resource that was requested, RS
MUST reject the request with a 4.03 (Forbidden). If RS has an access
token for the client but it does not cover the action that was
requested on the resource, RS MUST reject the request with a 4.05
(Method Not Allowed).
5. Secure Communication with AS
As specified in the ACE framework (section 5.7 of As specified in the ACE framework (section 5.7 of
[I-D.ietf-ace-oauth-authz]), the RS and AS can also use CoAP instead [I-D.ietf-ace-oauth-authz]), the requesting entity (RS and/or client)
of HTTP to communicate via the introspection resource. This section and the AS communicates via the introspection or token endpoint. The
specifies how to use OSCORE between RS and AS. The use of OSCORE for use of CoAP and OSCORE for this communication is RECOMMENDED in this
this communication is OPTIONAL in this profile, other security profile, other protocols (such as HTTP and DTLS or TLS) MAY be used
protocols (such as DTLS) MAY be used instead. instead.
The RS and the AS are expected to have pre-established security If OSCORE is used, the requesting entity and the AS are expected to
contexts in place. How these security contexts are established is have pre-established security contexts in place. How these security
out of scope for this profile. Furthermore the RS and the AS contexts are established is out of scope for this profile.
communicate using OSCORE ([I-D.ietf-core-object-security]) through Furthermore the requesting entity and the AS communicate using OSCORE
the introspection resource as specified in section 5.7 of ([I-D.ietf-core-object-security]) through the introspection endpoint
as specified in section 5.7 of [I-D.ietf-ace-oauth-authz] and through
the token endpoint as specified in section 5.6 of
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
5. Security Considerations 6. 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 Furthermore the general security considerations of OSCORE
[I-D.ietf-core-object-security] also apply to this specific use of [I-D.ietf-core-object-security] also apply to this specific use of
the OSCORE protocol. the OSCORE protocol.
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 usecase corresponds to the this profile should make sure that their usecase 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.
6. Privacy Considerations TODO: explain the rationale for the nonces construction, and the
security implications for Man-in-the-Middle attacks.
7. Privacy Considerations
TBD. TBD.
7. IANA Considerations 8. 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 specification]]" with the RFC number of this specification and delete
this paragraph. this paragraph.
The following registration is done for the ACE OAuth Profile Registry The following registration is done for the ACE OAuth Profile Registry
following the procedure specified in section 8.6 of following the procedure specified in section 8.6 of
[I-D.ietf-ace-oauth-authz]: [I-D.ietf-ace-oauth-authz]:
o Profile name: coap_oscore o Profile name: coap_oscore
skipping to change at page 9, line 46 skipping to change at page 15, line 49
o Description: Identifies the client in an OSCORE context o Description: Identifies the client in an OSCORE context
o Reference: [[this specification]] o Reference: [[this specification]]
o Name: serverId o Name: serverId
o Label: TBD2 (value between 1 and 255) o Label: TBD2 (value between 1 and 255)
o Value Type: bstr o Value Type: bstr
o Value Registry: N/A o Value Registry: N/A
o Description: Identifies the server in an OSCORE context o Description: Identifies the server in an OSCORE context
o Reference: [[this specification]] o Reference: [[this specification]]
o Name: kdf o Name: hkdf
o Label: TBD3 (value between 1 and 255) o Label: TBD3 (value between 1 and 255)
o Value Type: bstr o Value Type: bstr
o Value Registry: COSE Algorithms registry o Value Registry: COSE Algorithms registry
o Description: Identifies the KDF algorithm to be used in an OSCORE o Description: Identifies the KDF algorithm to be used in an OSCORE
context context
o Reference: [[this specification]] o Reference: [[this specification]]
o Name: slt o Name: slt
o Label: TBD4 (value between 1 and 255) o Label: TBD4 (value between 1 and 255)
o Value Type: bstr o Value Type: bstr
o Value Registry: N/A o Value Registry: N/A
o Description: Identifies the master salt of to be used in an OSCORE o Description: Identifies the master salt of to be used in an OSCORE
context context
o Reference: [[this specification]] o Reference: [[this specification]]
skipping to change at page 10, line 15 skipping to change at page 16, line 17
o Reference: [[this specification]] o Reference: [[this specification]]
o Name: slt o Name: slt
o Label: TBD4 (value between 1 and 255) o Label: TBD4 (value between 1 and 255)
o Value Type: bstr o Value Type: bstr
o Value Registry: N/A o Value Registry: N/A
o Description: Identifies the master salt of to be used in an OSCORE o Description: Identifies the master salt of to be used in an OSCORE
context context
o Reference: [[this specification]] o Reference: [[this specification]]
8. References 9. References
8.1. Normative References 9.1. Normative References
[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-12 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-15
(work in progress), May 2018. (work in progress), September 2018.
[I-D.ietf-core-object-security] [I-D.ietf-core-object-security]
Selander, G., Mattsson, J., Palombini, F., and L. Seitz, Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
"Object Security for Constrained RESTful Environments "Object Security for Constrained RESTful Environments
(OSCORE)", draft-ietf-core-object-security-13 (work in (OSCORE)", draft-ietf-core-object-security-15 (work in
progress), June 2018. progress), August 2018.
[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>.
[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)", [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
RFC 8152, DOI 10.17487/RFC8152, July 2017, RFC 8152, DOI 10.17487/RFC8152, July 2017,
<https://www.rfc-editor.org/info/rfc8152>. <https://www.rfc-editor.org/info/rfc8152>.
[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>.
8.2. Informative References 9.2. Informative References
[I-D.gerdes-ace-dcaf-authorize] [I-D.gerdes-ace-dcaf-authorize]
Gerdes, S., Bergmann, O., and C. Bormann, "Delegated CoAP Gerdes, S., Bergmann, O., and C. Bormann, "Delegated CoAP
Authentication and Authorization Framework (DCAF)", draft- Authentication and Authorization Framework (DCAF)", draft-
gerdes-ace-dcaf-authorize-04 (work in progress), October gerdes-ace-dcaf-authorize-04 (work in progress), October
2015. 2015.
[I-D.ietf-ace-actors]
Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An
architecture for authorization in constrained
environments", draft-ietf-ace-actors-06 (work in
progress), November 2017.
[I-D.selander-ace-cose-ecdhe] [I-D.selander-ace-cose-ecdhe]
Selander, G., Mattsson, J., and F. Palombini, "Ephemeral Selander, G., Mattsson, J., and F. Palombini, "Ephemeral
Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace- Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace-
cose-ecdhe-08 (work in progress), March 2018. cose-ecdhe-10 (work in progress), September 2018.
[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>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
skipping to change at page 17, line 47 skipping to change at page 23, line 47
| | | |
|<---------+ CoAP response + |<---------+ CoAP response +
| OSCORE | Object-Security option | OSCORE | Object-Security option
| response | | response |
| | | |
Figure 7: Access token and key establishment with EDHOC Figure 7: Access token and key establishment with EDHOC
Acknowledgments Acknowledgments
The authors wish to thank Jim Schaad, Goeran Selander and Marco The authors wish to thank Jim Schaad and Marco Tiloca for the input
Tiloca for the input on this memo. The error responses specified in on this memo. The error responses specified in Appendix B.3 were
Appendix B.3 were originally specified by Gerdes et al. in originally specified by Gerdes et al. in
[I-D.gerdes-ace-dcaf-authorize]. [I-D.gerdes-ace-dcaf-authorize].
Authors' Addresses Authors' Addresses
Ludwig Seitz Ludwig Seitz
RISE SICS AB RISE SICS AB
Scheelevagen 17 Scheelevagen 17
Lund 22370 Lund 22370
Sweden Sweden
 End of changes. 55 change blocks. 
144 lines changed or deleted 413 lines changed or added

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