draft-ietf-ace-pubsub-profile-01.txt | draft-ietf-ace-pubsub-profile-02.txt | |||
---|---|---|---|---|
ACE Working Group F. Palombini | ACE Working Group F. Palombini | |||
Internet-Draft Ericsson | Internet-Draft Ericsson | |||
Intended status: Standards Track July 03, 2020 | Intended status: Standards Track C. Sengul | |||
Expires: January 4, 2021 | Expires: 7 July 2021 Brunel University | |||
3 January 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-01 | draft-ietf-ace-pubsub-profile-02 | |||
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. | |||
Note to Readers | ||||
Source for this draft and an issue tracker can be found at | ||||
https://github.com/ace-wg/pubsub-profile (https://github.com/ace-wg/ | ||||
pubsub-profile). | ||||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on January 4, 2021. | This Internet-Draft will expire on 7 July 2021. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2020 IETF Trust and the persons identified as the | Copyright (c) 2021 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
(https://trustee.ietf.org/license-info) in effect on the date of | license-info) in effect on the date of publication of this document. | |||
publication of this document. Please review these documents | Please review these documents carefully, as they describe your rights | |||
carefully, as they describe your rights and restrictions with respect | and restrictions with respect to this document. Code Components | |||
to this document. Code Components extracted from this document must | extracted from this document must include Simplified BSD License text | |||
include Simplified BSD License text as described in Section 4.e of | as described in Section 4.e of the Trust Legal Provisions and are | |||
the Trust Legal Provisions and are provided without warranty as | 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. Application Profile Overview . . . . . . . . . . . . . . . . 3 | 2. Application Profile Overview . . . . . . . . . . . . . . . . 3 | |||
3. PubSub Application Profiles . . . . . . . . . . . . . . . . . 5 | 3. PubSub Application Profiles . . . . . . . . . . . . . . . . . 5 | |||
3.1. Retrieval of COSE Key for protection of content . . . . . 6 | 3.1. Retrieval of COSE Key for protection of content . . . . . 6 | |||
3.2. coap_pubsub_app Application Profile . . . . . . . . . . . 9 | 3.2. coap_pubsub_app Application Profile . . . . . . . . . . . 9 | |||
3.3. mqtt_pubsub_app Application Profile . . . . . . . . . . . 9 | 3.3. mqtt_pubsub_app Application Profile . . . . . . . . . . . 9 | |||
4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
4.1. CoAP Publisher . . . . . . . . . . . . . . . . . . . . . 11 | 4.1. CoAP Publisher . . . . . . . . . . . . . . . . . . . . . 11 | |||
4.2. MQTT Publisher . . . . . . . . . . . . . . . . . . . . . 12 | 4.2. MQTT Publisher . . . . . . . . . . . . . . . . . . . . . 11 | |||
5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
5.1. CoAP Subscriber . . . . . . . . . . . . . . . . . . . . . 13 | 5.1. CoAP Subscriber . . . . . . . . . . . . . . . . . . . . . 12 | |||
5.2. MQTT Subscriber . . . . . . . . . . . . . . . . . . . . . 13 | 5.2. MQTT Subscriber . . . . . . . . . . . . . . . . . . . . . 13 | |||
6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 13 | 6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 13 | |||
6.1. Using COSE Objects To Protect The Resource Representation 14 | 6.1. Using COSE Objects To Protect The Resource | |||
Representation . . . . . . . . . . . . . . . . . . . . . 14 | ||||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 | |||
8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 17 | 8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 16 | |||
8.1.1. CoAP Profile Registration . . . . . . . . . . . . . . 17 | 8.1.1. CoAP Profile Registration . . . . . . . . . . . . . . 17 | |||
8.1.2. CoAP Profile Registration . . . . . . . . . . . . . . 17 | 8.1.2. CoAP Profile Registration . . . . . . . . . . . . . . 17 | |||
8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 18 | 8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 17 | |||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
9.1. Normative References . . . . . . . . . . . . . . . . . . 18 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 17 | |||
9.2. Informative References . . . . . . . . . . . . . . . . . 19 | 9.2. Informative References . . . . . . . . . . . . . . . . . 18 | |||
Appendix A. Requirements on Application Profiles . . . . . . . . 19 | Appendix A. Requirements on Application Profiles . . . . . . . . 19 | |||
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 | Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 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], while the one using MQTT is specified in | [I-D.ietf-core-coap-pubsub], while the one using MQTT is specified in | |||
REF MQTT. This document defines a way to authorize nodes in a CoAP | REF MQTT. This document defines a way to authorize nodes in a CoAP | |||
pub-sub type of setting, using the ACE framework | pub-sub type of setting, using the ACE framework | |||
skipping to change at page 6, line 27 ¶ | skipping to change at page 6, line 33 ¶ | |||
| | | | | | |||
| [------ Pub Key Format Negociation Request --->] | | | [------ Pub Key Format Negociation Request --->] | | |||
| | | | | | |||
| [<---- Pub Key Format Negociation Response ----] | | | [<---- 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 | |||
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 | |||
and CoAP 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 | |||
public keys in the group, as well as concerning the algorithm and | public keys in the group, as well as concerning the algorithm and | |||
related parameters for computing signatures in the group. This | related parameters for computing signatures in the group. This | |||
request is a subset of the Token POST request defined in Section 3.3 | request is a subset of the Token POST request defined in Section 3.3 | |||
of [I-D.ietf-ace-key-groupcomm], specifically a CoAP POST request to | of [I-D.ietf-ace-key-groupcomm], specifically a CoAP POST request to | |||
a specific resource at the AS, including only the parameters | a specific resource at the AS, including only the parameters | |||
'sign_info' and 'pub_key_enc' in the CBOR map in the payload. The | 'sign_info' and 'pub_key_enc' in the CBOR map in the payload. The | |||
default url-path for this resource is /ace-group/gid/cs-info, where | default url-path for this resource is /ace-group/gid/cs-info, where | |||
skipping to change at page 7, line 23 ¶ | skipping to change at page 7, line 32 ¶ | |||
which is an Authorization Request merged with a Joining Request, as | which is an Authorization Request merged with a Joining Request, as | |||
described in [I-D.ietf-ace-key-groupcomm], Sections 3.1 and 4.2. The | described in [I-D.ietf-ace-key-groupcomm], Sections 3.1 and 4.2. The | |||
reason for merging these two messages is that the AS2 is both the AS | 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 | and the KDC, in this setting, so the Authorization Response and the | |||
Post Token message are not necessary. | Post Token message are not necessary. | |||
More specifically, the Client sends a POST request to the /ace-group/ | More specifically, the Client sends a POST request to the /ace-group/ | |||
gid endpoint on AS2, with Content-Format = "application/ace+cbor" | gid endpoint on AS2, with Content-Format = "application/ace+cbor" | |||
that MUST contain in the payload (formatted as a CBOR map): | that MUST contain in the payload (formatted as a CBOR map): | |||
o the following fields from the Joining Request (Section 4.2 of | * the following fields from the Joining Request (Section 4.2 of | |||
[I-D.ietf-ace-key-groupcomm]): | [I-D.ietf-ace-key-groupcomm]): | |||
* 'scope' parameter set to a CBOR array containing: | - 'scope' parameter set to a CBOR array containing: | |||
+ the broker's topic as first element, and | o the broker's topic as first element, and | |||
+ the text string "publisher" if the client request to be a | o the text string "publisher" if the client request to be a | |||
publisher, "subscriber" 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 | subscriber, or a CBOR array containing both, if the client | |||
request to be both. | request to be both. | |||
* 'get_pub_keys' parameter set to the empty array if the Client | - '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, | |||
* 'client_cred' parameter containing the Client's public key | - 'client_cred' parameter containing the Client's public key | |||
formatted as a COSE_Key, if the Client needs to directly send | formatted as a COSE_Key, if the Client needs to directly send | |||
that to the AS2, | that to the AS2, | |||
* 'cnonce', set to a 8 bytes long pseudo-random nonce, if | - 'cnonce', set to a 8 bytes long pseudo-random nonce, if | |||
'client_cred' is present, | 'client_cred' is present, | |||
* 'client_cred_verify', set to a singature computed over the | - 'client_cred_verify', set to a singature computed over the | |||
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 | * 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 | TODO: 'cnonce' might change name. TODO: register media type ace+json | |||
for HTTP? | 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'. | |||
skipping to change at page 8, line 27 ¶ | skipping to change at page 8, line 35 ¶ | |||
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.2 of | * 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) | o 'kty' with value 4 (symmetric) | |||
+ 'alg' with value defined by the AS2 (Content Encryption | o 'alg' with value defined by the AS2 (Content Encryption | |||
Algorithm) | Algorithm) | |||
+ 'Base IV' with value defined by the AS2 | o 'Base IV' with value defined by the AS2 | |||
+ 'k' with value the symmetric key value | ||||
+ OPTIONALLY, 'kid' with an identifier for the key value | o 'k' with value the symmetric key value | |||
o OPTIONALLY, 'kid' with an identifier for the key value | ||||
* 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 | * 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 the corresponding value, see Section 3.2 or | - 'profile' set to the corresponding value, see Section 3.2 or | |||
Section 3.3 | 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 | o the broker's topic as first element, and | |||
+ the string "publisher" if the client is an authorized | o 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 | 3.2. coap_pubsub_app Application Profile | |||
In case CoAP PubSub is used as communication protocol: | In case CoAP PubSub is used as communication protocol: | |||
o 'profile' set to "coap_pubsub_app", as specified in Section 8.1.1. | * 'profile' set to "coap_pubsub_app", as specified in Section 8.1.1. | |||
3.3. mqtt_pubsub_app Application Profile | 3.3. mqtt_pubsub_app Application Profile | |||
In case mQTT PubSub is used as communication protocol: | In case mQTT PubSub is used as communication protocol: | |||
o 'profile' set to "mqtt_pubsub_app", as specified in Section 8.1.2. | * '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 | | |||
skipping to change at page 10, line 27 ¶ | skipping to change at page 10, line 27 ¶ | |||
| | ----(C)---> | | | | | ----(C)---> | | | |||
| 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 | * 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], OSCORE | [I-D.ietf-ace-dtls-authorize], OSCORE | |||
[I-D.ietf-ace-oscore-profile] or REF MQTT 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 | * 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 | |||
skipping to change at page 11, line 47 ¶ | skipping to change at page 11, line 47 ¶ | |||
Figure 5: Authorization + Joining Request payload for a Publisher | Figure 5: Authorization + Joining Request payload for a Publisher | |||
{ | { | |||
"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 | 4.2. MQTT Publisher | |||
TODO | 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. | |||
skipping to change at page 12, line 32 ¶ | skipping to change at page 12, line 28 ¶ | |||
+-----(D)------+ | +-----(D)------+ | |||
| | | | |||
v | v | |||
+------------+ | +------------+ | |||
| | | | | | |||
| 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: | |||
o The Authorization + Joining Request MUST NOT contain the | * 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 | * The Authorization + Key Distribution Response MUST contain the | |||
'pub_keys' parameter. | 'pub_keys' parameter. | |||
5.1. CoAP Subscriber | 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 CoAP Subscriber using CoAP and CBOR is | corresponding Response for a CoAP Subscriber using CoAP and CBOR is | |||
specified in Figure 8 and 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", | |||
"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 / | |||
skipping to change at page 14, line 11 ¶ | skipping to change at page 14, line 4 ¶ | |||
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]. | |||
+------------+ +------------+ +------------+ | +------------+ +------------+ +------------+ | |||
| | | | | | | | | | | | | | |||
| Publisher | ----(E)---> | Broker | | Subscriber | | | Publisher | ----(E)---> | Broker | | Subscriber | | |||
| | | | <----(F)---- | | | | | | | <----(F)---- | | | |||
| | | | -----(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 | |||
[I-D.ietf-ace-oauth-authz] is used between Subscriber and Broker. | [I-D.ietf-ace-oauth-authz] is used between Subscriber and Broker. | |||
The (G) message is the response from the Broker, where the | The (G) message is the response from the Broker, where the | |||
publication is protected with COSE. | 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] and REF MQTT). | 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 | |||
skipping to change at page 15, line 7 ¶ | skipping to change at page 14, line 47 ¶ | |||
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 | |||
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 | * 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, with value a | * The unprotected Headers MUST contain the Partial IV, with value a | |||
sequence number that is incremented for every message sent, and | sequence number that is incremented for every message sent, and | |||
the counter signature that includes: | 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 | - the signature computed as specified in Section 4.5 of | |||
[RFC8152]. | [RFC8152]. | |||
o The ciphertext, computed over the plaintext that MUST contain the | * 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 16, line 26 ¶ | skipping to change at page 15, line 47 ¶ | |||
/ unprotected / { | / unprotected / { | |||
/ kid / 4:h'11' | / kid / 4:h'11' | |||
}, | }, | |||
/ signature / SIG / 64 bytes signature / | / signature / SIG / 64 bytes signature / | |||
] | ] | |||
}, | }, | |||
/ ciphertext / h'8df0a3b62fccff37aa313c8020e971f8aC8d' | / ciphertext / h'8df0a3b62fccff37aa313c8020e971f8aC8d' | |||
] | ] | |||
) | ) | |||
Figure 12: Example of COSE Object sent in the payload of a PUBLISH | Figure 12: Example of COSE Object sent in the payload of a | |||
operation | PUBLISH operation | |||
The encryption and decryption operations are described in sections | The encryption and decryption operations are described in sections | |||
5.3 and 5.4 of [RFC8152]. | 5.3 and 5.4 of [RFC8152]. | |||
7. Security Considerations | 7. Security Considerations | |||
In the profile described above, the Publisher and Subscriber use | In the profile described above, the Publisher and Subscriber use | |||
asymmetric crypto, which would make the message exchange quite heavy | asymmetric crypto, which would make the message exchange quite heavy | |||
for small constrained devices. Moreover, all Subscribers must be | for small constrained devices. Moreover, all Subscribers must be | |||
able to access the public keys of all the Publishers to a specific | able to access the public keys of all the Publishers to a specific | |||
skipping to change at page 18, line 31 ¶ | skipping to change at page 18, line 7 ¶ | |||
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-07 | Communication using ACE", Work in Progress, Internet- | |||
(work in progress), June 2020. | Draft, draft-ietf-ace-key-groupcomm-10, 2 November 2020, | |||
<http://www.ietf.org/internet-drafts/draft-ietf-ace-key- | ||||
groupcomm-10.txt>. | ||||
[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-35 | Framework (ACE-OAuth)", Work in Progress, Internet-Draft, | |||
(work in progress), June 2020. | draft-ietf-ace-oauth-authz-36, 16 November 2020, | |||
<http://www.ietf.org/internet-drafts/draft-ietf-ace-oauth- | ||||
authz-36.txt>. | ||||
[I-D.ietf-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)", Work in Progress, Internet-Draft, draft-ietf- | |||
progress), September 2019. | core-coap-pubsub-09, 30 September 2019, | |||
<http://www.ietf.org/internet-drafts/draft-ietf-core-coap- | ||||
pubsub-09.txt>. | ||||
[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>. | |||
skipping to change at page 19, line 22 ¶ | skipping to change at page 19, line 8 ¶ | |||
[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", Work in Progress, Internet-Draft, draft- | |||
progress), October 2018. | ietf-ace-actors-07, 22 October 2018, <http://www.ietf.org/ | |||
internet-drafts/draft-ietf-ace-actors-07.txt>. | ||||
[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)", Work in Progress, | |||
authorize-11 (work in progress), June 2020. | Internet-Draft, draft-ietf-ace-dtls-authorize-14, 29 | |||
October 2020, <http://www.ietf.org/internet-drafts/draft- | ||||
ietf-ace-dtls-authorize-14.txt>. | ||||
[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", Work in Progress, | |||
oscore-profile-11 (work in progress), June 2020. | Internet-Draft, draft-ietf-ace-oscore-profile-14, 14 | |||
December 2020, <http://www.ietf.org/internet-drafts/draft- | ||||
ietf-ace-oscore-profile-14.txt>. | ||||
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | |||
Interchange Format", STD 90, RFC 8259, | Interchange Format", STD 90, RFC 8259, | |||
DOI 10.17487/RFC8259, December 2017, | DOI 10.17487/RFC8259, December 2017, | |||
<https://www.rfc-editor.org/info/rfc8259>. | <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 | * 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 | * REQ2: Specify the encoding and value of roles of 'scope': see | |||
Section 3.1). | Section 3.1). | |||
o REQ3: Optionally, specify the acceptable values for 'sign_alg': | * REQ3: Optionally, specify the acceptable values for 'sign_alg': | |||
TODO | TODO | |||
o REQ4: Optionally, specify the acceptable values for | * REQ4: Optionally, specify the acceptable values for | |||
'sign_parameters': TODO | 'sign_parameters': TODO | |||
o REQ5: Optionally, specify the acceptable values for | * REQ5: Optionally, specify the acceptable values for | |||
'sign_key_parameters': TODO | 'sign_key_parameters': TODO | |||
o REQ6: Optionally, specify the acceptable values for 'pub_key_enc': | * REQ6: Optionally, specify the acceptable values for 'pub_key_enc': | |||
TODO | TODO | |||
o REQ7: Specify the exact format of the 'key' value: COSE_Key, see | * REQ7: Specify the exact format of the 'key' value: COSE_Key, see | |||
Section 3.1. | Section 3.1. | |||
o REQ8: Specify the acceptable values of 'kty' : "COSE_Key", see | * REQ8: Specify the acceptable values of 'kty' : "COSE_Key", see | |||
Section 3.1. | Section 3.1. | |||
o REQ9: Specity the format of the identifiers of group members: TODO | * REQ9: Specity the format of the identifiers of group members: TODO | |||
o REQ10: Optionally, specify the format and content of | * REQ10: Optionally, specify the format and content of | |||
'group_policies' entries: not defined | 'group_policies' entries: not defined | |||
o REQ11: Specify the communication protocol the members of the group | * REQ11: Specify the communication protocol the members of the group | |||
must use: CoAP pub/sub. | must use: CoAP pub/sub. | |||
o REQ12: Specify the security protocol the group members must use to | * REQ12: Specify the security protocol the group members must use to | |||
protect their communication. This must provide encryption, | protect their communication. This must provide encryption, | |||
integrity and replay protection: Object Security of Content using | integrity and replay protection: Object Security of Content using | |||
COSE, see Section 6.1. | COSE, see Section 6.1. | |||
o REQ13: Specify and register the application profile identifier : | * REQ13: Specify and register the application profile identifier : | |||
"coap_pubsub_app", see Section 8.1. | "coap_pubsub_app", see Section 8.1. | |||
o REQ14: Optionally, specify the encoding of public keys, of | * REQ14: Optionally, specify the encoding of public keys, of | |||
'client_cred', and of 'pub_keys' if COSE_Keys are not used: NA. | 'client_cred', and of 'pub_keys' if COSE_Keys are not used: NA. | |||
o REQ15: Specify policies at the KDC to handle id that are not | * REQ15: Specify policies at the KDC to handle id that are not | |||
included in get_pub_keys: TODO | included in get_pub_keys: TODO | |||
o REQ16: Specify the format and content of 'group_policies': TODO | * REQ16: Specify the format and content of 'group_policies': TODO | |||
o REQ17: Specify the format of newly-generated individual keying | * REQ17: Specify the format of newly-generated individual keying | |||
material for group members, or of the information to derive it, | material for group members, or of the information to derive it, | |||
and corresponding CBOR label : not defined | and corresponding CBOR label : not defined | |||
o REQ18: Specify how the communication is secured between Client and | * REQ18: Specify how the communication is secured between Client and | |||
KDC. Optionally, specify tranport profile of ACE | KDC. Optionally, specify tranport profile of ACE | |||
[I-D.ietf-ace-oauth-authz] to use between Client and KDC: pre-set, | [I-D.ietf-ace-oauth-authz] to use between Client and KDC: pre-set, | |||
as KDC is AS. | as KDC is AS. | |||
o OPT1: Optionally, specify the encoding of public keys, of | * OPT1: Optionally, specify the encoding of public keys, of | |||
'client_cred', and of 'pub_keys' if COSE_Keys are not used: NA | 'client_cred', and of 'pub_keys' if COSE_Keys are not used: NA | |||
o OPT2: Optionally, specify the negotiation of parameter values for | * OPT2: Optionally, specify the negotiation of parameter values for | |||
signature algorithm and signature keys, if 'sign_info' and | signature algorithm and signature keys, if 'sign_info' and | |||
'pub_key_enc' are not used: NA | 'pub_key_enc' are not used: NA | |||
o OPT3: Optionally, specify the format and content of | * OPT3: Optionally, specify the format and content of | |||
'mgt_key_material': not defined | 'mgt_key_material': not defined | |||
o OPT4: Optionally, specify policies that instruct clients to retain | * 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, Cigdem Sengul, Jim Schaad and Marco Tiloca for the | Goeran Selander, Cigdem Sengul, Jim Schaad and Marco Tiloca for the | |||
useful discussion and reviews that helped shape this document. | useful discussion and reviews that helped shape this document. | |||
Author's Address | Authors' Addresses | |||
Francesca Palombini | Francesca Palombini | |||
Ericsson | Ericsson | |||
Email: francesca.palombini@ericsson.com | Email: francesca.palombini@ericsson.com | |||
Cigdem Sengul | ||||
Brunel University | ||||
Email: csengul@acm.org | ||||
End of changes. 89 change blocks. | ||||
110 lines changed or deleted | 126 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |