draft-ietf-ace-pubsub-profile-00.txt | draft-ietf-ace-pubsub-profile-01.txt | |||
---|---|---|---|---|
ACE Working Group F. Palombini | ACE Working Group F. Palombini | |||
Internet-Draft Ericsson | Internet-Draft Ericsson | |||
Intended status: Standards Track January 04, 2020 | Intended status: Standards Track July 03, 2020 | |||
Expires: July 7, 2020 | Expires: January 4, 2021 | |||
Pub-Sub Profile for Authentication and Authorization for Constrained | Pub-Sub Profile for Authentication and Authorization for Constrained | |||
Environments (ACE) | Environments (ACE) | |||
draft-ietf-ace-pubsub-profile-00 | draft-ietf-ace-pubsub-profile-01 | |||
Abstract | Abstract | |||
This specification defines an application profile for authentication | This specification defines an application profile for authentication | |||
and authorization for publishers and subscribers in a pub-sub setting | and 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 July 7, 2020. | This Internet-Draft will expire on January 4, 2021. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2020 IETF Trust and the persons identified as the | Copyright (c) 2020 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 . . . . . . . . . . . . . . . . . . . . . . . 2 | 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Application Profile Overview . . . . . . . . . . . . . . . . 3 | 2. Application Profile Overview . . . . . . . . . . . . . . . . 3 | |||
3. coap_pubsub_app Application Profile . . . . . . . . . . . . . 5 | 3. PubSub Application Profiles . . . . . . . . . . . . . . . . . 5 | |||
3.1. Retrieval of COSE Key for protection of content . . . . . 5 | 3.1. Retrieval of COSE Key for protection of content . . . . . 6 | |||
4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.2. coap_pubsub_app Application Profile . . . . . . . . . . . 9 | |||
5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 3.3. mqtt_pubsub_app Application Profile . . . . . . . . . . . 9 | |||
6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 12 | 4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
6.1. Using COSE Objects To Protect The Resource Representation 13 | 4.1. CoAP Publisher . . . . . . . . . . . . . . . . . . . . . 11 | |||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 14 | 4.2. MQTT Publisher . . . . . . . . . . . . . . . . . . . . . 12 | |||
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 | 5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 15 | 5.1. CoAP Subscriber . . . . . . . . . . . . . . . . . . . . . 13 | |||
8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 16 | 5.2. MQTT Subscriber . . . . . . . . . . . . . . . . . . . . . 13 | |||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 | 6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 13 | |||
9.1. Normative References . . . . . . . . . . . . . . . . . . 16 | 6.1. Using COSE Objects To Protect The Resource Representation 14 | |||
9.2. Informative References . . . . . . . . . . . . . . . . . 17 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
Appendix A. Requirements on Application Profiles . . . . . . . . 17 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | |||
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 19 | 8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 17 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 19 | 8.1.1. CoAP Profile Registration . . . . . . . . . . . . . . 17 | |||
8.1.2. CoAP Profile Registration . . . . . . . . . . . . . . 17 | ||||
8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 18 | ||||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | ||||
9.1. Normative References . . . . . . . . . . . . . . . . . . 18 | ||||
9.2. Informative References . . . . . . . . . . . . . . . . . 19 | ||||
Appendix A. Requirements on Application Profiles . . . . . . . . 19 | ||||
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 | ||||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21 | ||||
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], while the one using MQTT is specified in | |||
authorize nodes in a CoAP pub-sub type of setting, using the ACE | REF MQTT. This document defines a way to authorize nodes in a CoAP | |||
framework [I-D.ietf-ace-oauth-authz], and to provide the keys for | pub-sub type of setting, using the ACE framework | |||
protecting the communication between these nodes. | [I-D.ietf-ace-oauth-authz], and to provide the keys for protecting | |||
the communication between these nodes. This document gives detailed | ||||
specifications for MQTT and CoAP pub-sub, but can easily be adapted | ||||
for other transport protocol as well. | ||||
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], | |||
and [I-D.ietf-core-coap-pubsub]. In particular, analogously to | [I-D.ietf-ace-key-groupcomm]. 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]. | |||
Readers are expected to be familiar with terms and concepts of pub- | ||||
sub group communication, as described in [I-D.ietf-core-coap-pubsub], | ||||
or MQTT (REF MQTT pubsub). | ||||
2. Application Profile Overview | 2. Application Profile Overview | |||
The objective of this document is to specify how to authorize nodes, | The objective of this document is to specify how to authorize nodes, | |||
provide keys, and protect a CoAP pub-sub communication, as described | provide keys, and protect a pub-sub communication, using | |||
in [I-D.ietf-core-coap-pubsub], using [I-D.ietf-ace-key-groupcomm], | [I-D.ietf-ace-key-groupcomm], which itself expands the Ace framework | |||
which itself expands the Ace framework ([I-D.ietf-ace-oauth-authz]), | ([I-D.ietf-ace-oauth-authz]), and transport profiles | |||
and transport profiles ([I-D.ietf-ace-dtls-authorize], | ([I-D.ietf-ace-dtls-authorize], [I-D.ietf-ace-oscore-profile], REF | |||
[I-D.ietf-ace-oscore-profile]). | MQTT profile). The pub-sub communication protocol can be based on | |||
CoAP, as described in [I-D.ietf-core-coap-pubsub], MQTT (see REF MQTT | ||||
comm), or other transport. | ||||
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 | | |||
| | | | | | | | | | |||
+----------------+ +----------------+ | +----------------+ +----------------+ | |||
^ ^ ^ | ^ ^ ^ | |||
| | | | | | | | |||
+---------(A)----+ | +-----(D)------+ | +---------(A)----+ | +-----(D)------+ | |||
| +--------------------(B)--------+ | | | +--------------------(B)--------+ | | |||
v v v | v v v | |||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
| CoAP | ----(C)---> | CoAP | | CoAP | | | | | | | | | |||
| Client - | ----(E)---> | Server - | | Client - | | | Publisher | ----(E)---> | Broker | | Subscriber | | |||
| | | | <----(F)---- | | | | | | | <----(F)---- | | | |||
| Publisher | | Broker | -----(G)---> | Subscriber | | | | | | -----(G)---> | | | |||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
Figure 1: Architecture CoAP pubsub with Authorization Servers | Figure 1: Architecture CoAP pubsub with Authorization Servers | |||
The RS is the broker, which contains the topic. This node | The RS is the broker, which contains the topic. This node | |||
corresponds to the Dispatcher, in [I-D.ietf-ace-key-groupcomm]. The | corresponds to the Dispatcher, in [I-D.ietf-ace-key-groupcomm]. The | |||
AS1 hosts the policies about the Broker: what endpoints are allowed | AS1 hosts the policies about the Broker: what endpoints are allowed | |||
to Publish on the Broker. The Clients access this node to get write | to Publish on the Broker. The Clients access this node to get write | |||
access to the Broker. The AS2 hosts the policies about the topic: | access to the Broker. The AS2 hosts the policies about the topic: | |||
what endpoints are allowed to access what topic. This node | what endpoints are allowed to access what topic. This node | |||
skipping to change at page 4, line 34 ¶ | skipping to change at page 5, line 16 ¶ | |||
Note that, analogously to the Publisher, the Subscriber can also set | Note that, analogously to the Publisher, the Subscriber can also set | |||
up an additional security association with the Broker, using an AS, | up an additional security association with the Broker, using an AS, | |||
in the same way the Publisher does with AS1. In this case, only | in the same way the Publisher does with AS1. In this case, only | |||
authorized Subscribers would be able to get notifications from the | authorized Subscribers would be able to get notifications from the | |||
Broker. The overhead would be that each Subscriber should access the | Broker. The overhead would be that each Subscriber should access the | |||
AS and get all the information to start a secure exchange with the | AS and get all the information to start a secure exchange with the | |||
Broker. | Broker. | |||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
| CoAP | | CoAP | | CoAP | | ||||
| Client - | | Server - | | Client - | | ||||
| | | | | | | | | | | | | | |||
| Publisher | | Broker | | Subscriber | | | Publisher | | Broker | | Subscriber | | |||
| | | | | | | ||||
| | | | | | | ||||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
: : : : | : : : : | |||
: '------ Security -------' : | : '------ Security -------' : | |||
: 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 specification. | is out of scope for this specification. | |||
3. coap_pubsub_app Application Profile | 3. PubSub Application Profiles | |||
This profile uses [I-D.ietf-ace-key-groupcomm], which expands the ACE | Each profile defined in this document uses | |||
framework. This document specifies which exact parameters from | [I-D.ietf-ace-key-groupcomm], which expands the ACE framework. This | |||
section defines 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. Since [I-D.ietf-ace-oauth-authz] recommends the use of | |||
CoAP anc CBOR, this document describes the exchanges assuming CoAP | ||||
and CBOR are used. However, using HTTP instead of CoAP is possible, | ||||
using the corresponding parameters and methods. Analogously, JSON | ||||
[RFC8259] can be used instead of CBOR, using the conversion method | ||||
specified in Sections 4.1 and 4.2 of [RFC7049]. In case JSON is | ||||
used, the Content Format or Media Type of the message has to be | ||||
changed accordingly. | ||||
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_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 ---->] | | | |||
| | | | | | | | |||
skipping to change at page 5, line 48 ¶ | skipping to change at page 6, line 36 ¶ | |||
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 | |||
of the topic back to the Client in the 'AS' parameter in the AS | of the topic back to the Client in the 'AS' parameter in the AS | |||
Information, as a response to an Unauthorized Resource Request | Information, as a response to an Unauthorized Resource Request | |||
(Section 5.1.2). The uri of AS2 is concatenated to the uri of AS1, | (Section 5.1.2). The uri of AS2 is concatenated to the uri of AS1, | |||
and separated by a comma. An example using CBOR diagnostic notation | and separated by a comma. An example using CBOR diagnostic notation | |||
is given below: | and CoAP is given 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 MAY send a request to | After retrieving the AS2 address, the Client MAY send a request to | |||
the AS, in order to retrieve necessary information concerning the | the AS, in order to retrieve necessary information concerning the | |||
skipping to change at page 7, line 23 ¶ | skipping to change at page 8, line 8 ¶ | |||
rsnonce concatenated with cnonce, if 'client_cred' is present, | rsnonce concatenated with cnonce, if 'client_cred' is present, | |||
* OPTIONALLY, if needed, the 'pub_keys_repos' parameter | * OPTIONALLY, if needed, the 'pub_keys_repos' parameter | |||
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]): | |||
* OPTIONALLY, if needed, additional parameters such as | * OPTIONALLY, if needed, additional parameters such as | |||
'client_id' | 'client_id' | |||
TODO: 'cnonce' might change name. TODO: register media type ace+json | ||||
for HTTP? | ||||
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], and that it | signing algorithm, as defined in section 8 of [RFC8152], and that it | |||
is the same algorithm used to compute the signature sent in | is the same algorithm used to compute the signature sent in | |||
'client_cred_verify'. | 'client_cred_verify'. | |||
Examples of the payload of a Authorization + Joining Request are | Examples of the payload of a Authorization + Joining Request are | |||
specified in Figure 5 and Figure 8. | 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 + Joining Response, with | The AS2 response is an Authorization + Joining Response, with | |||
Content-Format = "application/ace+cbor". The payload (formatted as a | Content-Format = "application/ace+cbor". The payload (formatted as a | |||
CBOR map) MUST contain: | CBOR map) MUST contain: | |||
o the following fields from the Joining Response (Section 4.1 of | o the following fields from the Joining Response (Section 4.2 of | |||
[I-D.ietf-ace-key-groupcomm]): | [I-D.ietf-ace-key-groupcomm]): | |||
* 'kty' 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', 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) | |||
skipping to change at page 8, line 21 ¶ | skipping to change at page 9, line 8 ¶ | |||
* OPTIONALLY, 'exp' with the expiration time of the key | * OPTIONALLY, 'exp' with the expiration time of the key | |||
* 'pub_keys', containing the public keys of all authorized | * 'pub_keys', containing the public keys of all authorized | |||
signing members formatted as COSE_Keys, if the 'get_pub_keys' | signing members formatted as COSE_Keys, if the 'get_pub_keys' | |||
parameter was present and set to the empty array in the | parameter was present and set to the empty array in the | |||
Authorization + Key Distribution Request | Authorization + Key Distribution Request | |||
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_app", as specified in Section 8.1 | * 'profile' set to the corresponding value, see Section 3.2 or | |||
Section 3.3 | ||||
* OPTIONALLY 'scope', set to a CBOR array containing: | * OPTIONALLY 'scope', set to a CBOR array containing: | |||
+ the broker's topic as first element, and | + the broker's topic as first element, and | |||
+ the string "publisher" if the client is an authorized | + the string "publisher" if the client is an authorized | |||
publisher, "subscriber" if the client is an authorized | publisher, "subscriber" if the client is an authorized | |||
subscriber, or a CBOR array containing both, if the client | subscriber, or a CBOR array containing both, if the client | |||
is authorized to be both. | is authorized to be both. | |||
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. | |||
3.2. coap_pubsub_app Application Profile | ||||
In case CoAP PubSub is used as communication protocol: | ||||
o 'profile' set to "coap_pubsub_app", as specified in Section 8.1.1. | ||||
3.3. mqtt_pubsub_app Application Profile | ||||
In case mQTT PubSub is used as communication protocol: | ||||
o 'profile' set to "mqtt_pubsub_app", as specified in Section 8.1.2. | ||||
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. | |||
+----------------+ +----------------+ | +----------------+ +----------------+ | |||
| | | | | | | | | | |||
| Authorization | | Authorization | | | Authorization | | Authorization | | |||
| Server 1 | | Server 2 | | | Server 1 | | Server 2 | | |||
| | | | | | | | | | |||
+----------------+ +----------------+ | +----------------+ +----------------+ | |||
^ ^ | ^ ^ | |||
| | | | | | |||
+---------(A)----+ | | +---------(A)----+ | | |||
| +--------------------(B)--------+ | | +--------------------(B)--------+ | |||
v v | v v | |||
+------------+ +------------+ | +------------+ +------------+ | |||
| CoAP | ----(C)---> | CoAP | | | | ----(C)---> | | | |||
| Client - | | Server - | | ||||
| | | | | ||||
| Publisher | | Broker | | | Publisher | | Broker | | |||
| | | | | ||||
| | | | | ||||
+------------+ +------------+ | +------------+ +------------+ | |||
Figure 4: Phase 1: Publisher side | Figure 4: Phase 1: Publisher side | |||
This is a combination of two independent phases: | This is a combination of two independent phases: | |||
o one is the establishment of a secure connection between Publisher | o one is the establishment of a secure connection between Publisher | |||
and Broker, using an ACE transport profile such as DTLS | and Broker, using an ACE transport profile such as DTLS | |||
[I-D.ietf-ace-dtls-authorize] or OSCORE | [I-D.ietf-ace-dtls-authorize], OSCORE | |||
[I-D.ietf-ace-oscore-profile]. (A)(C) | [I-D.ietf-ace-oscore-profile] or REF MQTT Profile. (A)(C) | |||
o the other is the Publisher's retrieval of keying material to | o the other is the Publisher's retrieval of keying material to | |||
protect the publication. (B) | protect the publication. (B) | |||
In detail: | In detail: | |||
(A) corresponds to the Access Token Request and Response between | (A) corresponds to the Access Token Request and Response between | |||
Publisher and Authorization Server to retrieve the Access Token and | Publisher and Authorization Server to retrieve the Access Token and | |||
RS (Broker) Information. As specified, the Publisher has the role of | RS (Broker) Information. As specified, the Publisher has the role of | |||
a CoAP client, the Broker has the role of the CoAP server. | a CoAP client, the Broker has the role of the CoAP server. | |||
(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. Note | |||
that, in line with what defined in the ACE transport profile used, | ||||
the access token includes the scope (i.e. pubsub topics on the | ||||
Broker) the Publisher is allowed to publish to. For implementation | ||||
semplicity, it is RECOMMENDED that the ACE transport profile used and | ||||
this specification use the same format of "scope". | ||||
(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 end-to-end with the subscribers (see Section 6.1), | the publication end-to-end with the subscribers (see Section 6.1), | |||
and uses [I-D.ietf-ace-key-groupcomm]. The details are defined in | and uses [I-D.ietf-ace-key-groupcomm]. The details are defined in | |||
Section 3.1. | Section 3.1. | |||
4.1. CoAP Publisher | ||||
An example of the payload of an Authorization + Joining Request and | An example of the payload of an Authorization + Joining Request and | |||
corresponding Response for a Publisher is specified in Figure 5 and | corresponding Response for a CoAP Publisher using CoAP and CBOR is | |||
Figure 6, where SIG is a signature computed using the private key | specified in Figure 5 and Figure 6, where SIG is a signature computed | |||
associated to the public key and the algorithm in "client_cred". | using the private key associated to the public key and the algorithm | |||
in "client_cred". | ||||
{ | { | |||
"scope" : ["Broker1/Temp", "publisher"], | "scope" : ["Broker1/Temp", "publisher"], | |||
"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 / | |||
skipping to change at page 10, line 41 ¶ | skipping to change at page 12, line 5 ¶ | |||
{ | { | |||
"profile" : "coap_pubsub_app", | "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 + Joining Response payload for a Publisher | Figure 6: Authorization + Joining Response payload for a Publisher | |||
4.2. MQTT Publisher | ||||
TODO | ||||
5. Subscriber | 5. Subscriber | |||
In this section, it is specified how the Subscriber retrieves the | In this section, it is specified how the Subscriber retrieves the | |||
keying material to protect the publication. | keying material to protect the publication. | |||
+----------------+ | +----------------+ | |||
| | | | | | |||
| Authorization | | | Authorization | | |||
| Server 2 | | | Server 2 | | |||
| | | | | | |||
+----------------+ | +----------------+ | |||
^ | ^ | |||
| | | | |||
+-----(D)------+ | +-----(D)------+ | |||
| | | | |||
v | v | |||
+------------+ | +------------+ | |||
| CoAP | | ||||
| 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 end-to-end with the | the keying material to verify the publication end-to-end with the | |||
publishers (see Section 6.1). The details are 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: | |||
skipping to change at page 11, line 43 ¶ | skipping to change at page 13, line 5 ¶ | |||
o The Authorization + Joining Request MUST NOT contain the | o The Authorization + Joining 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 + Joining Request by using the parameter | Authorization + Joining 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. | |||
5.1. CoAP Subscriber | ||||
An example of the payload of an Authorization + Joining Request and | An example of the payload of an Authorization + Joining Request and | |||
corresponding Response for a Subscriber is specified in Figure 8 and | corresponding Response for a CoAP Subscriber using CoAP and CBOR is | |||
Figure 9. | specified in Figure 8 and Figure 9. | |||
{ | { | |||
"scope" : ["Broker1/Temp", "subscriber"], | "scope" : ["Broker1/Temp", "subscriber"], | |||
"get_pub_keys" : [ ] | "get_pub_keys" : [ ] | |||
} | } | |||
Figure 8: Authorization + Joining Request payload for a Subscriber | Figure 8: Authorization + Joining Request payload for a Subscriber | |||
{ | { | |||
"profile" : "coap_pubsub_app", | "profile" : "coap_pubsub_app", | |||
skipping to change at page 12, line 27 ¶ | skipping to change at page 13, line 40 ¶ | |||
-2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de108de43 | -2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de108de43 | |||
9c08551d', / x / | 9c08551d', / x / | |||
-3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e9eecd | -3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e9eecd | |||
0084d19c' / y / | 0084d19c' / y / | |||
} | } | |||
] | ] | |||
} | } | |||
Figure 9: Authorization + Joining Response payload for a Subscriber | Figure 9: Authorization + Joining Response payload for a Subscriber | |||
5.2. MQTT Subscriber | ||||
TODO | ||||
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. The | Subscriber-Broker, after the previous phases have taken place. The | |||
operations of publishing and subscribing are defined in | operations of publishing and subscribing are defined in | |||
[I-D.ietf-core-coap-pubsub]. | [I-D.ietf-core-coap-pubsub]. | |||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
| CoAP | | CoAP | | CoAP | | | | | | | | | |||
| Client - | | Server - | | Client - | | | Publisher | ----(E)---> | Broker | | Subscriber | | |||
| | ----(E)---> | | | | | | | | | <----(F)---- | | | |||
| 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, unless a profile of ACE | Subscriber, which is unprotected, unless a profile of ACE | |||
skipping to change at page 13, line 21 ¶ | skipping to change at page 14, line 39 ¶ | |||
| | | | | | | | |||
| | ---- 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] and REF MQTT). | |||
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. | |||
The Subscriber uses the kid in the countersignature field in the COSE | The Subscriber uses the kid in the countersignature field in the COSE | |||
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 | |||
skipping to change at page 15, line 40 ¶ | skipping to change at page 17, line 29 ¶ | |||
8.1. ACE Groupcomm Profile Registry | 8.1. ACE Groupcomm Profile Registry | |||
The following registrations are done for the "ACE Groupcomm 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-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. | |||
8.1.1. CoAP Profile Registration | ||||
Name: coap_pubsub_app | 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 CoAP pub-sub | |||
scenario in a constrained environment. | setting scenario in a constrained environment. | |||
CBOR Key: TBD | ||||
Reference: [[This document]] | ||||
8.1.2. CoAP Profile Registration | ||||
Name: mqtt_pubsub_app | ||||
Description: Profile for delegating client authentication and | ||||
authorization for publishers and subscribers in a MQTT pub-sub | ||||
setting 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 | |||
The following registrations are done for the ACE Groupcomm Key | The following registrations are done for the ACE Groupcomm Key | |||
Registry following the procedure specified in | Registry following the procedure specified in | |||
[I-D.ietf-ace-key-groupcomm]. | [I-D.ietf-ace-key-groupcomm]. | |||
skipping to change at page 16, line 31 ¶ | skipping to change at page 18, line 31 ¶ | |||
Description: COSE_Key object | Description: COSE_Key object | |||
References: [RFC8152], [[This document]] | 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-03 | Communication using ACE", draft-ietf-ace-key-groupcomm-07 | |||
(work in progress), November 2019. | (work in progress), June 2020. | |||
[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-29 | Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-35 | |||
(work in progress), December 2019. | (work in progress), June 2020. | |||
[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- | |||
Subscribe Broker for the Constrained Application Protocol | Subscribe Broker for the Constrained Application Protocol | |||
(CoAP)", draft-ietf-core-coap-pubsub-09 (work in | (CoAP)", draft-ietf-core-coap-pubsub-09 (work in | |||
progress), September 2019. | progress), September 2019. | |||
[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>. | |||
[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 | ||||
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, | ||||
October 2013, <https://www.rfc-editor.org/info/rfc7049>. | ||||
[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>. | |||
9.2. Informative References | 9.2. Informative References | |||
[I-D.ietf-ace-actors] | [I-D.ietf-ace-actors] | |||
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-09 (work in progress), December 2019. | authorize-11 (work in progress), June 2020. | |||
[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-08 (work in progress), July 2019. | oscore-profile-11 (work in progress), June 2020. | |||
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | ||||
Interchange Format", STD 90, RFC 8259, | ||||
DOI 10.17487/RFC8259, December 2017, | ||||
<https://www.rfc-editor.org/info/rfc8259>. | ||||
Appendix A. Requirements on Application Profiles | Appendix A. Requirements on Application Profiles | |||
This section lists the specifications on this profile based on the | This section lists the specifications on this profile based on the | |||
requirements defined in Appendix A of [I-D.ietf-ace-key-groupcomm] | requirements defined in Appendix A of [I-D.ietf-ace-key-groupcomm] | |||
o REQ1: Specify the encoding and value of the identifier of group or | o REQ1: Specify the encoding and value of the identifier of group or | |||
topic of 'scope': see Section 3.1). | topic of 'scope': see Section 3.1). | |||
o REQ2: Specify the encoding and value of roles of 'scope': see | o REQ2: Specify the encoding and value of roles of 'scope': see | |||
skipping to change at page 19, line 16 ¶ | skipping to change at page 21, line 26 ¶ | |||
'mgt_key_material': not defined | 'mgt_key_material': not defined | |||
o OPT4: Optionally, specify policies that instruct clients to retain | o OPT4: Optionally, specify policies that instruct clients to retain | |||
unsuccessfully decrypted messages and for how long, so that they | unsuccessfully decrypted messages and for how long, so that they | |||
can be decrypted after getting updated keying material: not | can be decrypted after getting updated keying material: not | |||
defined | 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, Cigdem Sengul, Jim Schaad and Marco Tiloca for the | |||
discussion and reviews that helped shape this document. | useful discussion and reviews that helped shape this document. | |||
Author's Address | Author's Address | |||
Francesca Palombini | Francesca Palombini | |||
Ericsson | Ericsson | |||
Email: francesca.palombini@ericsson.com | Email: francesca.palombini@ericsson.com | |||
End of changes. 44 change blocks. | ||||
74 lines changed or deleted | 153 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/ |