< draft-palombini-ace-coap-pubsub-profile-04.txt   draft-palombini-ace-coap-pubsub-profile-05.txt >
ACE Working Group F. Palombini ACE Working Group F. Palombini
Internet-Draft Ericsson Internet-Draft Ericsson
Intended status: Standards Track April 03, 2019 Intended status: Standards Track July 08, 2019
Expires: October 5, 2019 Expires: January 9, 2020
CoAP Pub-Sub Profile for Authentication and Authorization for CoAP Pub-Sub Profile for Authentication and Authorization for
Constrained Environments (ACE) Constrained Environments (ACE)
draft-palombini-ace-coap-pubsub-profile-04 draft-palombini-ace-coap-pubsub-profile-05
Abstract Abstract
This specification defines a profile for authentication and This specification defines a profile for authentication and
authorization for publishers and subscribers in a pub-sub setting authorization for publishers and subscribers in a pub-sub setting
scenario in a constrained environment, using the ACE framework. This scenario in a constrained environment, using the ACE framework. This
profile relies on transport layer or application layer security to profile relies on transport layer or application layer security to
authorize the publisher to the broker. Moreover, it relies on authorize the publisher to the broker. Moreover, it relies on
application layer security for publisher-broker and subscriber-broker application layer security for publisher-broker and subscriber-broker
communication. communication.
skipping to change at page 1, line 37 skipping to change at page 1, line 37
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 October 5, 2019. This Internet-Draft will expire on January 9, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 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
skipping to change at page 2, line 13 skipping to change at page 2, line 13
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 . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2
2. Profile Overview . . . . . . . . . . . . . . . . . . . . . . 3 2. Profile Overview . . . . . . . . . . . . . . . . . . . . . . 3
3. coap_pubsub Profile . . . . . . . . . . . . . . . . . . . . . 4 3. coap_pubsub_app Profile . . . . . . . . . . . . . . . . . . . 5
3.1. Retrieval of COSE Key for protection of content . . . . . 5 3.1. Retrieval of COSE Key for protection of content . . . . . 5
4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 9 5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 10
6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 11 6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 12
6.1. Using COSE Objects to protect the resource representation 12 6.1. Using COSE Objects To Protect The Resource Representation 13
7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16
8.1. ACE OAuth Profile Registry . . . . . . . . . . . . . . . 14 8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 16
8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 15 8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 16
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
9.1. Normative References . . . . . . . . . . . . . . . . . . 15 9.1. Normative References . . . . . . . . . . . . . . . . . . 17
9.2. Informative References . . . . . . . . . . . . . . . . . 16 9.2. Informative References . . . . . . . . . . . . . . . . . 17
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 16 Appendix A. Requirements on Application Profiles . . . . . . . . 18
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 19
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction 1. Introduction
The publisher-subscriber setting allows for devices with limited The publisher-subscriber setting allows for devices with limited
reachability to communicate via a broker that enables store-and- reachability to communicate via a broker that enables store-and-
forward messaging between the devices. The pub-sub scenario using forward messaging between the devices. The pub-sub scenario using
the Constrained Application Protocol (CoAP) is specified in the Constrained Application Protocol (CoAP) is specified in
[I-D.ietf-core-coap-pubsub]. This document defines a way to [I-D.ietf-core-coap-pubsub]. This document defines a way to
authorize nodes in a CoAP pub-sub type of setting, using the ACE authorize nodes in a CoAP pub-sub type of setting, using the ACE
framework [I-D.ietf-ace-oauth-authz]. framework [I-D.ietf-ace-oauth-authz], and to provide the keys for
protecting the communication between these nodes.
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 RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Readers are expected to be familiar with the terms and concepts Readers are expected to be familiar with the terms and concepts
described in [I-D.ietf-ace-oauth-authz], [I-D.ietf-ace-key-groupcomm] described in [I-D.ietf-ace-oauth-authz], [I-D.ietf-ace-key-groupcomm]
and [I-D.ietf-core-coap-pubsub]. In particular, analogously to and [I-D.ietf-core-coap-pubsub]. In particular, analogously to
[I-D.ietf-ace-oauth-authz], terminology for entities in the [I-D.ietf-ace-oauth-authz], terminology for entities in the
architecture such as Client (C), Resource Server (RS), and architecture such as Client (C), Resource Server (RS), and
Authorization Server (AS) is defined in OAuth 2.0 [RFC6749] and Authorization Server (AS) is defined in OAuth 2.0 [RFC6749] and
[I-D.ietf-ace-actors], and terminology for entities such as the Key [I-D.ietf-ace-actors], and terminology for entities such as the Key
Distribution Center (KDC) and Dispatcher in Distribution Center (KDC) and Dispatcher in
[I-D.ietf-ace-key-groupcomm]. [I-D.ietf-ace-key-groupcomm].
2. Profile Overview 2. Profile Overview
The objective of this document is to specify how to protect a CoAP The objective of this document is to specify how to authorize nodes,
pub-sub communication, as described in [I-D.ietf-core-coap-pubsub], provide keys, and protect a CoAP pub-sub communication, as described
using [I-D.ietf-ace-key-groupcomm], which itself expands the Ace in [I-D.ietf-core-coap-pubsub], using [I-D.ietf-ace-key-groupcomm],
framework ([I-D.ietf-ace-oauth-authz]), and profiles which itself expands the Ace framework ([I-D.ietf-ace-oauth-authz]),
([I-D.ietf-ace-dtls-authorize], [I-D.ietf-ace-oscore-profile]). and profiles ([I-D.ietf-ace-dtls-authorize],
[I-D.ietf-ace-oscore-profile]).
The architecture of the scenario is shown in Figure 1. The architecture of the scenario is shown in Figure 1.
+----------------+ +----------------+ +----------------+ +----------------+
| | | | | | | |
| Authorization | | Authorization | | Authorization | | Authorization |
| Server 1 | | Server 2 | | Server 1 | | Server 2 |
| | | | | | | |
+----------------+ +----------------+ +----------------+ +----------------+
^ ^ ^ ^ ^ ^
skipping to change at page 4, line 45 skipping to change at page 5, line 5
: Association 1 : : Association 1 :
'------------------------------- Security --------------' '------------------------------- Security --------------'
Association 2 Association 2
Note that AS1 and AS2 might either be co-resident or be 2 separate Note that AS1 and AS2 might either be co-resident or be 2 separate
physical entities, in which case access control policies must be physical entities, in which case access control policies must be
exchanged between AS1 and AS2, so that they agree on rights for exchanged between AS1 and AS2, so that they agree on rights for
joining nodes about specific topics. How the policies are exchanged joining nodes about specific topics. How the policies are exchanged
is out of scope for this profile. is out of scope for this profile.
3. coap_pubsub Profile 3. coap_pubsub_app Profile
This profile uses [I-D.ietf-ace-key-groupcomm], which expands the ACE This profile uses [I-D.ietf-ace-key-groupcomm], which expands the ACE
framework. This document specifies which exact parameters from framework. This document specifies which exact parameters from
[I-D.ietf-ace-key-groupcomm] have to be used, and the values for each [I-D.ietf-ace-key-groupcomm] have to be used, and the values for each
parameter. parameter.
The Publisher and the Subscriber map to the Client in The Publisher and the Subscriber map to the Client in
[I-D.ietf-ace-key-groupcomm], the AS2 maps to the AS and to the KDC, [I-D.ietf-ace-key-groupcomm], the AS2 maps to the AS and to the KDC,
the Broker maps to the Dispatcher. the Broker maps to the Dispatcher.
Note that both publishers and subscribers use the same profile, Note that both publishers and subscribers use the same profile,
called "coap_pubsub". called "coap_pubsub_app".
3.1. Retrieval of COSE Key for protection of content 3.1. Retrieval of COSE Key for protection of content
This phase is common to both Publisher and Subscriber. To maintain This phase is common to both Publisher and Subscriber. To maintain
the generality, the Publisher or Subscriber is referred as Client in the generality, the Publisher or Subscriber is referred as Client in
this section. this section.
Client Broker AS2 Client Broker AS2
| [----- Resource Request ---->] | | | [----- Resource Request ---->] | |
| | | | | |
| [<-- AS1, AS2 Information ---] | | | [<-- AS1, AS2 Information ---] | |
| | | |
| [------ Pub Key Format Negociation Request --->] |
| |
| [<---- Pub Key Format Negociation Response ----] |
| |
| -- Authorization + Key Distribution Request ---> | | -- Authorization + Key Distribution Request ---> |
| | | |
| <-- Authorization + Key Distribution Response -- | | <-- Authorization + Key Distribution Response -- |
| | | |
Figure 2: B: Access request - response Figure 2: B: Access request - response
Complementary to what is defined in [I-D.ietf-ace-oauth-authz] Complementary to what is defined in [I-D.ietf-ace-oauth-authz]
(Section 5.1.1), to determine the AS2 in charge of a topic hosted at (Section 5.1.1), to determine the AS2 in charge of a topic hosted at
the Broker, the Broker MAY send the address of both the AS in charge the Broker, the Broker MAY send the address of both the AS in charge
skipping to change at page 5, line 45 skipping to change at page 6, line 12
(Section 5.1.2). An example using CBOR diagnostic notation is given (Section 5.1.2). An example using CBOR diagnostic notation is given
below: below:
4.01 Unauthorized 4.01 Unauthorized
Content-Format: application/ace+cbor Content-Format: application/ace+cbor
{"AS": "coaps://as1.example.com/token, {"AS": "coaps://as1.example.com/token,
coaps://as2.example.com/pubsubkey"} coaps://as2.example.com/pubsubkey"}
Figure 3: AS1, AS2 Information example Figure 3: AS1, AS2 Information example
After retrieving the AS2 address, the Client sends an Authorization + After retrieving the AS2 address, the Client MAY send a Pub Key
Key Distribution Request, which is an Authorization Request merged Format Negociation Request to the AS, in order to request necessary
with a Key Distribution Request, as described in information concerning the public keys in the group, as well as
[I-D.ietf-ace-key-groupcomm], Sections 3.1 and 4.1. The reason for concerning the algorithm and related parameters for computing
merging these two messages is that the AS2 is both the AS and the signatures in the group. This request is a subset of the Token Post
KDC, in this setting, so the Authorization Response and the Post request defined in Section 3.3 of [I-D.ietf-ace-key-groupcomm],
Token message are not necessary. specifically including the parameters 'sign_info' and 'pub_key_enc'.
The AS MUST respond with the response defined in Section 3.3 of
[I-D.ietf-ace-key-groupcomm], specifically including the same
parameters 'sign_info' and 'pub_key_enc'.
After that, the Client sends an Authorization + Key Distribution
Request, which is an Authorization Request merged with a Key
Distribution Request, as described in [I-D.ietf-ace-key-groupcomm],
Sections 3.1 and 4.1. The reason for merging these two messages is
that the AS2 is both the AS and the KDC, in this setting, so the
Authorization Response and the Post Token message are not necessary.
More specifically, the Client sends a POST request to the /token More specifically, the Client sends a POST request to the /token
endpoint on AS2, that MUST contain in the payload (formatted as a endpoint on AS2, with Content-Format = "application/ace+cbor" that
CBOR map): MUST contain in the payload (formatted as a CBOR map):
o the following fields from the Authorization Request (Section 3.1 o the following fields from the Authorization Request (Section 3.1
of [I-D.ietf-ace-key-groupcomm]): of [I-D.ietf-ace-key-groupcomm]):
* the grant type set to "client_credentials", * 'grant_type' set to "client_credentials",
* OPTIONALLY, if needed, other additional parameters such as * OPTIONALLY, if needed, other additional parameters such as
"client_id" 'client_id'
o the following fields from the Key Distribution Request o the following fields from the Key Distribution Request
(Section 4.1 of [I-D.ietf-ace-key-groupcomm]): (Section 4.1 of [I-D.ietf-ace-key-groupcomm]):
* the client_cred parameter containing the Client's public key, * 'type' set to 1 ("key distribution")
if the Client needs to directly send that to the AS2,
* the scope parameter set to a CBOR array containing the broker's * 'client_cred' parameter containing the Client's public key
topic as first element and the string "publisher" for formatted as a COSE_Key, if the Client needs to directly send
publishers and "subscriber" for subscribers as second element that to the AS2,
* the get_pub_keys parameter set to the empty array if the Client * 'scope' parameter set to a CBOR array containing:
+ the broker's topic as first element, and
+ the string "publisher" if the client request to be a
publisher, "subscriber" if the client request to be a
subscriber, or a CBOR array containing both, if the client
request to be both.
* 'get_pub_keys' parameter set to the empty array if the Client
needs to retrieve the public keys of the other pubsub members needs to retrieve the public keys of the other pubsub members
* OPTIONALLY, if needed, the pub_keys_repos parameter * OPTIONALLY, if needed, the 'pub_keys_repos' parameter
Note that the alg parameter in the client_cred COSE_Key MUST be a Note that the alg parameter in the 'client_cred' COSE_Key MUST be a
signing algorithm, as defined in section 8 of [RFC8152]. signing algorithm, as defined in section 8 of [RFC8152].
Examples of the payload of a Authorization + Key Distribution Request Examples of the payload of a Authorization + Key Distribution Request
are specified in Figure 5 and Figure 8. are specified in Figure 5 and Figure 8.
The AS2 verifies that the Client is authorized to access the topic The AS2 verifies that the Client is authorized to access the topic
and, if the 'client_cred' parameter is present, stores the public key and, if the 'client_cred' parameter is present, stores the public key
of the Client. of the Client.
The AS2 response is an Authorization + Key Distribution Response, see The AS2 response is an Authorization + Key Distribution Response, see
Section 4.2 of [I-D.ietf-ace-key-groupcomm]. The payload (formatted Section 4.2 of [I-D.ietf-ace-key-groupcomm], with Content-Format =
as a CBOR map) MUST contain: "application/ace+cbor". The payload (formatted as a CBOR map) MUST
contain:
o the following fields from the Authorization Response (Section 3.2 o the following fields from the Authorization Response (Section 3.2
of [I-D.ietf-ace-key-groupcomm]): of [I-D.ietf-ace-key-groupcomm]):
* profile set to "coap_pubsub" * 'profile' set to "coap_pubsub_app", as specified in Section 8.1
* scope parameter (optionally), set to a CBOR array containing * OPTIONALLY 'scope', set to a CBOR array containing:
the broker's topic as first element and the string "publisher"
for publishers and "subscriber" for subscribers as second + the broker's topic as first element, and
element
+ the string "publisher" if the client is an authorized
publisher, "subscriber" if the client is an authorized
subscriber, or a CBOR array containing both, if the client
is authorized to be both.
o the following fields from the Key Distribution Response o the following fields from the Key Distribution Response
(Section 4.2 of [I-D.ietf-ace-key-groupcomm]): (Section 4.2 of [I-D.ietf-ace-key-groupcomm]):
* kty parameter identifies a key type "COSE_Key", as defined in * 'kty' identifies a key type "COSE_Key", as defined in
Section 8.2. Section 8.2.
* key parameter, which contains a "COSE_Key" object (defined in * 'key', which contains a "COSE_Key" object (defined in
[RFC8152], containing: [RFC8152], containing:
+ kty with value 4 (symmetric) + 'kty' with value 4 (symmetric)
+ alg with value defined by the AS2 (Content Encryption + 'alg' with value defined by the AS2 (Content Encryption
Algorithm) Algorithm)
+ Base IV with value defined by the AS2 + 'Base IV' with value defined by the AS2
+ k with value the symmetric key value + 'k' with value the symmetric key value
+ OPTIONALLY, kid with an identifier for the key value + OPTIONALLY, 'kid' with an identifier for the key value
* "pub_keys", containing the public keys of all authorized * OPTIONALLY, exp with the expiration time of the key
signing members, if the "get_pub_keys" parameter was present
and set to the empty array in the Authorization + Key * 'pub_keys', containing the public keys of all authorized
Distribution Request signing members formatted as COSE_Keys, if the 'get_pub_keys'
parameter was present and set to the empty array in the
Authorization + Key Distribution Request
Examples for the response payload are detailed in Figure 6 and Examples for the response payload are detailed in Figure 6 and
Figure 9. Figure 9.
4. Publisher 4. Publisher
In this section, it is specified how the Publisher requests, obtains In this section, it is specified how the Publisher requests, obtains
and communicates to the Broker the access token, as well as the and communicates to the Broker the access token, as well as the
retrieval of the keying material to protect the publication. retrieval of the keying material to protect the publication.
skipping to change at page 9, line 6 skipping to change at page 9, line 52
(C) corresponds to the exchange between Publisher and Broker, where (C) corresponds to the exchange between Publisher and Broker, where
the Publisher sends its access token to the Broker and establishes a the Publisher sends its access token to the Broker and establishes a
secure connection with the Broker. Depending on the Information secure connection with the Broker. Depending on the Information
received in (A), this can be for example DTLS handshake, or other received in (A), this can be for example DTLS handshake, or other
protocols. Depending on the application, there may not be the need protocols. Depending on the application, there may not be the need
for this set up phase: for example, if OSCORE is used directly. for this set up phase: for example, if OSCORE is used directly.
(A) and (C) details are specified in the profile used. (A) and (C) details are specified in the profile used.
(B) corresponds to the retrieval of the keying material to protect (B) corresponds to the retrieval of the keying material to protect
the publication, and uses [I-D.ietf-ace-key-groupcomm]. The details the publication end-to-end with the subscribers (see Section 6.1),
are defined in Section 3.1. and uses [I-D.ietf-ace-key-groupcomm]. The details are defined in
Section 3.1.
An example of the payload of an Authorization + Key Distribution An example of the payload of an Authorization + Key Distribution
Request and corresponding Response for a Publisher is specified in Request and corresponding Response for a Publisher is specified in
Figure 5 and Figure 6. Figure 5 and Figure 6.
{ {
"grant_type" : "client_credentials", "grant_type" : "client_credentials",
"scope" : ["Broker1/Temp", "publisher"], "scope" : ["Broker1/Temp", "publisher"],
"type" = 1,
"client_id" : "publisher1", "client_id" : "publisher1",
"client_cred" : "client_cred" :
{ / COSE_Key / { / COSE_Key /
/ type / 1 : 2, / EC2 / / type / 1 : 2, / EC2 /
/ kid / 2 : h'11', / kid / 2 : h'11',
/ alg / 3 : -7, / ECDSA with SHA-256 / / alg / 3 : -7, / ECDSA with SHA-256 /
/ crv / -1 : 1 , / P-256 / / crv / -1 : 1 , / P-256 /
/ x / -2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de1 / x / -2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de1
08de439c08551d', 08de439c08551d',
/ y /-3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e / y /-3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e
9eecd0084d19c' 9eecd0084d19c'
} }
} }
Figure 5: Authorization + Key Distribution Request payload for a Figure 5: Authorization + Key Distribution Request payload for a
Publisher Publisher
{ {
"profile" : "coap_pubsub", "profile" : "coap_pubsub_app",
"kty" : "COSE_Key", "kty" : "COSE_Key",
"key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7', "key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7',
-1: h'02e2cc3a9b92855220f255fff1c615bc'} -1: h'02e2cc3a9b92855220f255fff1c615bc'}
} }
Figure 6: Authorization + Key Distribution Response payload for a Figure 6: Authorization + Key Distribution Response payload for a
Publisher Publisher
5. Subscriber 5. Subscriber
skipping to change at page 10, line 27 skipping to change at page 11, line 27
| CoAP | | CoAP |
| Client - | | Client - |
| | | |
| Subscriber | | Subscriber |
| | | |
+------------+ +------------+
Figure 7: Phase 2: Subscriber side Figure 7: Phase 2: Subscriber side
Step (D) between Subscriber and AS2 corresponds to the retrieval of Step (D) between Subscriber and AS2 corresponds to the retrieval of
the keying material to verify the publication. The details are the keying material to verify the publication end-to-end with the
defined in Section 3.1 publishers (see Section 6.1). The details are defined in Section 3.1
This step is the same as (B) between Publisher and AS2 (Section 3.1), This step is the same as (B) between Publisher and AS2 (Section 3.1),
with the following differences: with the following differences:
o The Authorization + Key Distribution Request MUST NOT contain the o The Authorization + Key Distribution Request MUST NOT contain the
client_cred parameter, the role element in the 'scope' parameter 'client_cred parameter', the role element in the 'scope' parameter
MUST be set to "subscriber". The Subscriber MUST have access to MUST be set to "subscriber". The Subscriber MUST have access to
the public keys of all the Publishers; this MAY be achieved in the the public keys of all the Publishers; this MAY be achieved in the
Authorization + Key Distribution Request by using the parameter Authorization + Key Distribution Request by using the parameter
get_pub_keys set to empty array. 'get_pub_keys' set to empty array.
o The Authorization + Key Distribution Response MUST contain the o The Authorization + Key Distribution Response MUST contain the
pub_keys parameter. 'pub_keys' parameter.
An example of the payload of an Authorization + Key Distribution An example of the payload of an Authorization + Key Distribution
Request and corresponding Response for a Subscriber is specified in Request and corresponding Response for a Subscriber is specified in
Figure 8 and Figure 9. Figure 8 and Figure 9.
{ {
"grant_type" : "client_credentials", "grant_type" : "client_credentials",
"type" = 1,
"scope" : ["Broker1/Temp", "subscriber"], "scope" : ["Broker1/Temp", "subscriber"],
"get_pub_keys" : [ ] "get_pub_keys" : [ ]
} }
Figure 8: Authorization + Key Distribution Request payload for a Figure 8: Authorization + Key Distribution Request payload for a
Subscriber Subscriber
{ {
"profile" : "coap_pubsub", "profile" : "coap_pubsub_app",
"scope" : ["Broker1/Temp", "subscriber"], "scope" : ["Broker1/Temp", "subscriber"],
"kty" : "COSE_Key" "kty" : "COSE_Key"
"key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7', "key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7',
-1: h'02e2cc3a9b92855220f255fff1c615bc'}, -1: h'02e2cc3a9b92855220f255fff1c615bc'},
"pub_keys" : [ "pub_keys" : [
{ {
1 : 2, / type EC2 / 1 : 2, / type EC2 /
2 : h'11', / kid / 2 : h'11', / kid /
3 : -7, / alg ECDSA with SHA-256 / 3 : -7, / alg ECDSA with SHA-256 /
-1 : 1 , / crv P-256 / -1 : 1 , / crv P-256 /
skipping to change at page 11, line 40 skipping to change at page 12, line 41
} }
] ]
} }
Figure 9: Authorization + Key Distribution Response payload for a Figure 9: Authorization + Key Distribution Response payload for a
Subscriber Subscriber
6. Pub-Sub Protected Communication 6. Pub-Sub Protected Communication
This section specifies the communication Publisher-Broker and This section specifies the communication Publisher-Broker and
Subscriber-Broker, after the previous phases have taken place. Subscriber-Broker, after the previous phases have taken place. The
operations of publishing and subscribing are defined in
[I-D.ietf-core-coap-pubsub].
+------------+ +------------+ +------------+ +------------+ +------------+ +------------+
| CoAP | | CoAP | | CoAP | | CoAP | | CoAP | | CoAP |
| Client - | | Server - | | Client - | | Client - | | Server - | | Client - |
| | ----(E)---> | | | | | | ----(E)---> | | | |
| Publisher | | Broker | <----(F)---- | Subscriber | | Publisher | | Broker | <----(F)---- | Subscriber |
| | | | -----(G)---> | | | | | | -----(G)---> | |
+------------+ +------------+ +------------+ +------------+ +------------+ +------------+
Figure 10: Phase 3: Secure communication between Publisher and Figure 10: Phase 3: Secure communication between Publisher and
Subscriber Subscriber
The (E) message corresponds to the publication of a topic on the The (E) message corresponds to the publication of a topic on the
Broker. The publication (the resource representation) is protected Broker. The publication (the resource representation) is protected
with COSE ([RFC8152]). The (F) message is the subscription of the with COSE ([RFC8152]). The (F) message is the subscription of the
Subscriber, which is unprotected. The (G) message is the response Subscriber, which is unprotected, unless a profile of ACE
from the Broker, where the publication is protected with COSE. [I-D.ietf-ace-oauth-authz] is used between Subscriber and Broker.
The (G) message is the response from the Broker, where the
publication is protected with COSE.
The flow graph is presented below. The flow graph is presented below.
Publisher Broker Subscriber Publisher Broker Subscriber
| --- PUT /topic ----> | | | --- PUT /topic ----> | |
| protected with COSE | | | protected with COSE | |
| | <--- GET /topic ----- | | | <--- GET /topic ----- |
| | | | | |
| | ---- response ------> | | | ---- response ------> |
| | protected with COSE | | | protected with COSE |
Figure 11: (E), (F), (G): Example of protected communication Figure 11: (E), (F), (G): Example of protected communication
6.1. Using COSE Objects to protect the resource representation 6.1. Using COSE Objects To Protect The Resource Representation
The Publisher uses the symmetric COSE Key received from AS2 in The Publisher uses the symmetric COSE Key received from AS2 in
exchange B (Section 3.1) to protect the payload of the PUBLISH exchange B (Section 3.1) to protect the payload of the PUBLISH
operation (Section 4.3 of [I-D.ietf-core-coap-pubsub]). operation (Section 4.3 of [I-D.ietf-core-coap-pubsub]).
Specifically, the COSE Key is used to create a COSE_Encrypt0 with Specifically, the COSE Key is used to create a COSE_Encrypt0 with
algorithm specified by AS2. The Publisher uses the private key algorithm specified by AS2. The Publisher uses the private key
corresponding to the public key sent to the AS2 in exchange B corresponding to the public key sent to the AS2 in exchange B
(Section 3.1) to countersign the COSE Object as specified in (Section 3.1) to countersign the COSE Object as specified in
Section 4.5 of [RFC8152]. The CoAP payload is replaced by the COSE Section 4.5 of [RFC8152]. The CoAP payload is replaced by the COSE
object before the publication is sent to the Broker. object before the publication is sent to the Broker.
skipping to change at page 12, line 46 skipping to change at page 14, line 10
object to retrieve the right public key to verify the object to retrieve the right public key to verify the
countersignature. It then uses the symmetric key received from AS2 countersignature. It then uses the symmetric key received from AS2
to verify and decrypt the publication received in the payload of the to verify and decrypt the publication received in the payload of the
CoAP Notification from the Broker. CoAP Notification from the Broker.
The COSE object is constructed in the following way: The COSE object is constructed in the following way:
o The protected Headers (as described in Section 3 of [RFC8152]) MAY o The protected Headers (as described in Section 3 of [RFC8152]) MAY
contain the kid parameter, with value the kid of the symmetric contain the kid parameter, with value the kid of the symmetric
COSE Key received in Section 3.1 and MUST contain the content COSE Key received in Section 3.1 and MUST contain the content
encryption algorithm encryption algorithm.
o The unprotected Headers MUST contain the Partial IV and the o The unprotected Headers MUST contain the Partial IV, with value a
counter signature that includes: sequence number that is incremented for every message sent, and
the counter signature that includes:
* the algorithm (same value as in the asymmetric COSE Key * the algorithm (same value as in the asymmetric COSE Key
received in (B)) in the protected header received in (B)) in the protected header;
* the kid (same value as the kid of the asymmetric COSE Key * the kid (same value as the kid of the asymmetric COSE Key
received in (B)) in the unprotected header received in (B)) in the unprotected header;
* the signature computed as specified in Section 4.5 of [RFC8152] * the signature computed as specified in Section 4.5 of
[RFC8152].
o The ciphertext, computed over the plaintext that MUST contain the o The ciphertext, computed over the plaintext that MUST contain the
CoAP payload. CoAP payload.
The external_aad is an empty string. The external_aad is an empty string.
An example is given in Figure 12 An example is given in Figure 12
16( 16(
[ [
/ protected / h'a2010c04421234' / { / protected / h'a2010c04421234' / {
\ alg \ 1:12, \ AES-CCM-64-64-128 \ \ alg \ 1:12, \ AES-CCM-64-64-128 \
\ kid \ 4: h'1234' \ kid \ 4: h'1234'
} / , } / ,
/ unprotected / { / unprotected / {
/ iv / 5:h'89f52f65a1c580', / iv / 5:h'89f52f65a1c580',
/ countersign / 7:[ / countersign / 7:[
/ protected / h'a10126' / { / protected / h'a10126' / {
skipping to change at page 14, line 32 skipping to change at page 16, line 19
The Broker is only trusted with verifying that the Publisher is The Broker is only trusted with verifying that the Publisher is
authorized to publish, but is not trusted with the publications authorized to publish, but is not trusted with the publications
itself, which it cannot read nor modify. In this setting, caching of itself, which it cannot read nor modify. In this setting, caching of
publications on the Broker is still allowed. publications on the Broker is still allowed.
TODO: expand on security and privacy considerations TODO: expand on security and privacy considerations
8. IANA Considerations 8. IANA Considerations
8.1. ACE OAuth Profile Registry 8.1. ACE Groupcomm Profile Registry
The following registrations are done for the ACE OAuth Profile The following registrations are done for the "ACE Groupcomm Profile"
Registry following the procedure specified in Registry following the procedure specified in
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-key-groupcomm].
Note to RFC Editor: Please replace all occurrences of "[[This Note to RFC Editor: Please replace all occurrences of "[[This
document]]" with the RFC number of this specification and delete this document]]" with the RFC number of this specification and delete this
paragraph. paragraph.
Name: coap_pubsub Name: coap_pubsub_app
Description: Profile for delegating client authentication and Description: Profile for delegating client authentication and
authorization for publishers and subscribers in a pub-sub setting authorization for publishers and subscribers in a pub-sub setting
scenario in a constrained environment. scenario in a constrained environment.
CBOR Key: TBD CBOR Key: TBD
Reference: [[This document]] Reference: [[This document]]
8.2. ACE Groupcomm Key Registry 8.2. ACE Groupcomm Key Registry
skipping to change at page 15, line 18 skipping to change at page 17, line 4
Registry following the procedure specified in Registry following the procedure specified in
[I-D.ietf-ace-key-groupcomm]. [I-D.ietf-ace-key-groupcomm].
Note to RFC Editor: Please replace all occurrences of "[[This Note to RFC Editor: Please replace all occurrences of "[[This
document]]" with the RFC number of this specification and delete this document]]" with the RFC number of this specification and delete this
paragraph. paragraph.
Name: COSE_Key Name: COSE_Key
Key Type Value: TBD Key Type Value: TBD
Profile: coap_pubsub_app
Profile:
Description: COSE_Key object Description: COSE_Key object
References: [RFC8152] References: [RFC8152], [[This document]]
9. References 9. References
9.1. Normative References 9.1. Normative References
[I-D.ietf-ace-key-groupcomm] [I-D.ietf-ace-key-groupcomm]
Palombini, F. and M. Tiloca, "Key Provisioning for Group Palombini, F. and M. Tiloca, "Key Provisioning for Group
Communication using ACE", draft-ietf-ace-key-groupcomm-01 Communication using ACE", draft-ietf-ace-key-groupcomm-02
(work in progress), March 2019. (work in progress), July 2019.
[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-24 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-24
(work in progress), March 2019. (work in progress), March 2019.
[I-D.ietf-core-coap-pubsub] [I-D.ietf-core-coap-pubsub]
Koster, M., Keranen, A., and J. Jimenez, "Publish- Koster, M., Keranen, A., and J. Jimenez, "Publish-
skipping to change at page 16, line 26 skipping to change at page 18, line 10
Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An
architecture for authorization in constrained architecture for authorization in constrained
environments", draft-ietf-ace-actors-07 (work in environments", draft-ietf-ace-actors-07 (work in
progress), October 2018. progress), October 2018.
[I-D.ietf-ace-dtls-authorize] [I-D.ietf-ace-dtls-authorize]
Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and
L. Seitz, "Datagram Transport Layer Security (DTLS) L. Seitz, "Datagram Transport Layer Security (DTLS)
Profile for Authentication and Authorization for Profile for Authentication and Authorization for
Constrained Environments (ACE)", draft-ietf-ace-dtls- Constrained Environments (ACE)", draft-ietf-ace-dtls-
authorize-07 (work in progress), March 2019. authorize-08 (work in progress), April 2019.
[I-D.ietf-ace-oscore-profile] [I-D.ietf-ace-oscore-profile]
Palombini, F., Seitz, L., Selander, G., and M. Gunnarsson, Palombini, F., Seitz, L., Selander, G., and M. Gunnarsson,
"OSCORE profile of the Authentication and Authorization "OSCORE profile of the Authentication and Authorization
for Constrained Environments Framework", draft-ietf-ace- for Constrained Environments Framework", draft-ietf-ace-
oscore-profile-07 (work in progress), February 2019. oscore-profile-07 (work in progress), February 2019.
Appendix A. Requirements on Application Profiles
This section lists the specifications on this profile based on the
requirements defined in Appendix A of [I-D.ietf-ace-key-groupcomm]
o Specify the communication protocol the members of the group must
use: CoAP pub/sub.
o Specify the security protocol the group members must use to
protect their communication: Object Security of Content using
COSE.
o Specify the encoding and value of the identifier of group or topic
and role of 'scope': see Section 3.1).
o Specify and register the application profile identifier:
"coap_pubsub_app", see Section 8.1.
o Specify the acceptable values of 'kty': "COSE_Key", see
Section 3.1.
o Specify the format and content of 'group_policies' entries
o Optionally, specify the format and content of 'mgt_key_material':
not defined
o Optionally, specify tranport profile of ACE
[I-D.ietf-ace-oauth-authz] to use between Client and KDC: up to
the application.
o Optionally, specify the encoding of public keys, of 'client_cred',
and of 'pub_keys' if COSE_Keys are not used: COSE_Keys are used.
o Optionally, specify the acceptable values for parameters related
to signature algorithm and signature keys: 'sign_alg',
'sign_parameters', 'sign_key_parameters', 'pub_key_enc': not
defined
o Optionally, specify the negotiation of parameter values for
signature algorithm and signature keys, if 'sign_info' and
'pub_key_enc' are not used: not defined.
Acknowledgments Acknowledgments
The author wishes to thank Ari Keraenen, John Mattsson, Ludwig Seitz, The author wishes to thank Ari Keraenen, John Mattsson, Ludwig Seitz,
Goeran Selander, Jim Schaad and Marco Tiloca for the useful Goeran Selander, Jim Schaad and Marco Tiloca for the useful
discussion and reviews that helped shape this document. discussion and reviews that helped shape this document.
Author's Address Author's Address
Francesca Palombini Francesca Palombini
Ericsson Ericsson
 End of changes. 57 change blocks. 
93 lines changed or deleted 174 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/