draft-ietf-ace-pubsub-profile-02.txt   draft-ietf-ace-pubsub-profile-03.txt 
ACE Working Group F. Palombini ACE Working Group F. Palombini
Internet-Draft Ericsson Internet-Draft Ericsson
Intended status: Standards Track C. Sengul Intended status: Standards Track C. Sengul
Expires: 7 July 2021 Brunel University Expires: 1 January 2022 Brunel University
3 January 2021 30 June 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-02 draft-ietf-ace-pubsub-profile-03
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 constrained
scenario in a constrained environment, using the ACE framework. This pub-sub scenario, using the ACE framework. This profile relies on
profile relies on transport layer or application layer security to transport layer or application layer security to authorize the pub-
authorize the publisher to the broker. Moreover, it relies on sub clients to the broker. Moreover, it describes application layer
application layer security for publisher-broker and subscriber-broker security for publisher-subscriber communication going through the
communication. broker.
Note to Readers Note to Readers
Source for this draft and an issue tracker can be found at Source for this draft and an issue tracker can be found at
https://github.com/ace-wg/pubsub-profile (https://github.com/ace-wg/ https://github.com/ace-wg/pubsub-profile (https://github.com/ace-wg/
pubsub-profile). 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
skipping to change at page 1, line 44 skipping to change at page 1, line 44
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 7 July 2021. This Internet-Draft will expire on 1 January 2022.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as 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 Authorisation . . . . . . . . . . . . . . . . . . . . 5
3.1. Retrieval of COSE Key for protection of content . . . . . 6 3.1. AS Discovery (Optional) . . . . . . . . . . . . . . . . . 6
3.2. coap_pubsub_app Application Profile . . . . . . . . . . . 9 3.2. Authorising to the Broker . . . . . . . . . . . . . . . . 6
3.3. mqtt_pubsub_app Application Profile . . . . . . . . . . . 9 4. Key Distribution for PubSub Content Protection . . . . . . . 7
4. Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1. Token POST . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. CoAP Publisher . . . . . . . . . . . . . . . . . . . . . 11 4.2. Join Request . . . . . . . . . . . . . . . . . . . . . . 8
4.2. MQTT Publisher . . . . . . . . . . . . . . . . . . . . . 11 5. PubSub Protected Communication . . . . . . . . . . . . . . . 11
5. Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1. Using COSE Objects To Protect The Resource
5.1. CoAP Subscriber . . . . . . . . . . . . . . . . . . . . . 12 Representation . . . . . . . . . . . . . . . . . . . . . 12
5.2. MQTT Subscriber . . . . . . . . . . . . . . . . . . . . . 13 6. Profile-specific Considerations . . . . . . . . . . . . . . . 13
6. Pub-Sub Protected Communication . . . . . . . . . . . . . . . 13 6.1. CoAP PubSub Application Profile . . . . . . . . . . . . . 13
6.1. Using COSE Objects To Protect The Resource 6.2. MQTT PubSub Application Profile . . . . . . . . . . . . . 14
Representation . . . . . . . . . . . . . . . . . . . . . 14 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15
7. Security Considerations . . . . . . . . . . . . . . . . . . . 16
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16
8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 16 8.1. ACE Groupcomm Profile Registry . . . . . . . . . . . . . 16
8.1.1. CoAP Profile Registration . . . . . . . . . . . . . . 17 8.1.1. CoAP Profile Registration . . . . . . . . . . . . . . 16
8.1.2. CoAP Profile Registration . . . . . . . . . . . . . . 17 8.1.2. MQTT Profile Registration . . . . . . . . . . . . . . 17
8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 17 8.2. ACE Groupcomm Key Registry . . . . . . . . . . . . . . . 17
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
9.1. Normative References . . . . . . . . . . . . . . . . . . 17 9.1. Normative References . . . . . . . . . . . . . . . . . . 17
9.2. Informative References . . . . . . . . . . . . . . . . . 18 9.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Requirements on Application Profiles . . . . . . . . 19 Appendix A. Requirements on Application Profiles . . . . . . . . 19
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
1. Introduction 1. Introduction
The publisher-subscriber setting allows for devices with limited In the publish-subscribe (pub-sub) scenario, devices with limited
reachability to communicate via a broker that enables store-and- reachability communicate via a broker, which enables store-and-
forward messaging between the devices. The pub-sub scenario using forward messaging between the devices. This document defines a way
the Constrained Application Protocol (CoAP) is specified in to authorize pub-sub clients using the ACE framework
[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
pub-sub type of setting, using the ACE framework
[I-D.ietf-ace-oauth-authz], and to provide the keys for protecting [I-D.ietf-ace-oauth-authz], and to provide the keys for protecting
the communication between these nodes. This document gives detailed the communication between them. The pub-sub communication using the
Constrained Application Protocol (CoAP) is specified in
[I-D.ietf-core-coap-pubsub], while the one using MQTT is specified in
[MQTT-OASIS-Standard-v5]. This document gives detailed
specifications for MQTT and CoAP pub-sub, but can easily be adapted specifications for MQTT and CoAP pub-sub, but can easily be adapted
for other transport protocol as well. for other transport protocols 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], described in [I-D.ietf-ace-oauth-authz],
[I-D.ietf-ace-key-groupcomm]. 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- Readers are expected to be familiar with terms and concepts of pub-
sub group communication, as described in [I-D.ietf-core-coap-pubsub], sub group communication, as described in [I-D.ietf-core-coap-pubsub],
or MQTT (REF MQTT pubsub). or MQTT [MQTT-OASIS-Standard-v5].
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 pub-sub communication, using provide keys, and protect a pub-sub communication, using
[I-D.ietf-ace-key-groupcomm], which itself expands the Ace framework [I-D.ietf-ace-key-groupcomm], which expands from the ACE framework
([I-D.ietf-ace-oauth-authz]), and transport profiles ([I-D.ietf-ace-oauth-authz]), and transport profiles
([I-D.ietf-ace-dtls-authorize], [I-D.ietf-ace-oscore-profile], REF ([I-D.ietf-ace-dtls-authorize], [I-D.ietf-ace-oscore-profile],
MQTT profile). The pub-sub communication protocol can be based on [I-D.ietf-ace-mqtt-tls-profile]). The pub-sub communication protocol
CoAP, as described in [I-D.ietf-core-coap-pubsub], MQTT (see REF MQTT can be based on CoAP, as described in [I-D.ietf-core-coap-pubsub],
comm), or other transport. MQTT [MQTT-OASIS-Standard-v5] , or other transport. Note that both
publishers and subscribers use the same profiles.
The architecture of the scenario is shown in Figure 1. The architecture of the scenario is shown in Figure 1.
+----------------+ +----------------+ +----------------+ +----------------+
| | | | | | | Key |
| Authorization | | Authorization | | Authorization | | Distribution |
| Server 1 | | Server 2 | | Server | | Center |
| | | | | (AS) | | (KDC) |
+----------------+ +----------------+ +----------------+ +----------------+
^ ^ ^ ^ ^
| | | | |
+---------(A)----+ | +-----(D)------+ +---------(A)----+ |
| +--------------------(B)--------+ | | +--------------------(B)--------+
v v v v v
+------------+ +------------+ +------------+ +------------+ +------------+
| | | | | | | | | |
| Publisher | ----(E)---> | Broker | | Subscriber | | Pub-Sub | <-- (C)---> | Broker |
| | | | <----(F)---- | | | Client | | |
| | | | -----(G)---> | | | | | |
+------------+ +------------+ +------------+ +------------+ +------------+
Figure 1: Architecture CoAP pubsub with Authorization Servers
The RS is the broker, which contains the topic. This node
corresponds to the Dispatcher, in [I-D.ietf-ace-key-groupcomm]. The
AS1 hosts the policies about the Broker: what endpoints are allowed
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:
what endpoints are allowed to access what topic. This node
represents both the AS and Key Distribution Center roles from
[I-D.ietf-ace-key-groupcomm].
There are four phases, the first three can be done in parallel.
1. The Publisher requests publishing access to the Broker at the Figure 1: Architecture for Pub-Sub with Authorization Servers
AS1, and communicates with the Broker to set up security.
2. The Publisher requests access to a specific topic at the AS2 Publisher or Subscriber Clients is referred to as Client in short.
This profile specifies:
3. The Subscriber requests access to a specific topic at the AS2. 1. The establishment of a secure connection between a Client and
Broker, using an ACE transport profile such as DTLS
[I-D.ietf-ace-dtls-authorize], OSCORE
[I-D.ietf-ace-oscore-profile], or MQTT-TLS
[I-D.ietf-ace-mqtt-tls-profile] (A and C).
4. The Publisher and the Subscriber securely post to and get 2. The Clients retrieval of keying material for the Publisher Client
publications from the Broker. to publish protected publications to the Broker, and for the
Subscriber Client to read protected publications (B).
This exchange aims at setting up 2 different security associations: These exchanges aim at setting up two different security
on the one hand, the Publisher has a security association with the associations. On the one hand, the Publisher and the Subscriber
Broker, to protect the communication and securely authorize the clients have a security association with the Broker (i.e. RS), so
Publisher to publish on a topic (Security Association 1). On the that RS can authorize the Clients (Security Association 1). On the
other hand, the Publisher has a security association with the other hand, the Publisher has a security association with the
Subscriber, to protect the publication content itself (Security Subscriber, to protect the publication content (Security Association
Association 2). The Security Association 1 is set up using AS1 and a 2) while sending it through the broker (i.e. here, the broker
transport profile of [I-D.ietf-ace-oauth-authz], the Security corresponds to the Dispatcher in [I-D.ietf-ace-key-groupcomm]). The
Association 2 is set up using AS2 and [I-D.ietf-ace-key-groupcomm]. Security Association 1 is set up using AS and a transport profile of
[I-D.ietf-ace-oauth-authz], the Security Association 2 is set up
Note that, analogously to the Publisher, the Subscriber can also set using AS, KDC and [I-D.ietf-ace-key-groupcomm]. Note that, given
up an additional security association with the Broker, using an AS, that the publication content is protected, the Broker MAY accept
in the same way the Publisher does with AS1. In this case, only unauthorised Subscribers. In this case, the Subscriber client can
authorized Subscribers would be able to get notifications from the skip setting up Security Association 1 with the Broker.
Broker. The overhead would be that each Subscriber should access the
AS and get all the information to start a secure exchange with the
Broker.
+------------+ +------------+ +------------+ +------------+ +------------+ +------------+
| | | | | | | | | | | |
| 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 Figure 2: Security Associations between Publisher, Broker,
physical entities, in which case access control policies must be Subscriber pairs.
exchanged between AS1 and AS2, so that they agree on rights for
joining nodes about specific topics. How the policies are exchanged
is out of scope for this specification.
3. PubSub Application Profiles
Each profile defined in this document uses
[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
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 3. PubSub Authorisation
[I-D.ietf-ace-key-groupcomm], the AS2 maps to the AS and to the KDC,
the Broker maps to the Dispatcher.
Note that both publishers and subscribers use the same profile. Since [I-D.ietf-ace-oauth-authz] recommends the use of CoAP and 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 6.1 and 6.2 of [RFC8949]. In case JSON is used, the Content
Format or Media Type of the message has to be changed accordingly.
Exact definition of these exchanges are considered out of scope for
this document.
3.1. Retrieval of COSE Key for protection of content Figure 3 shows the message flow for authorisation purposes.
This phase is common to both Publisher and Subscriber. To maintain Client Broker AS KDC
the generality, the Publisher or Subscriber is referred as Client in | [--Resource Request (CoAP/MQTT/other)-->] | | |
this section. | | | |
| [<----AS Information (CoAP/MQTT/other)--] | | |
| | |
| ----- Authorisation Request (CoAP/HTTP/other)---->| |
| | |
| <------Authorisation Response (CoAP/HTTP/other) --| |
| |
|----------------------Token Post (CoAP)------------------->|
| |
|------------------- Joining Request (CoAP) --------------->|
| |
|------------------ Joining Response (CoAP) --------------->|
Client Broker AS2 Figure 3: Authorisation Flow
| [----- Resource Request ---->] | |
| | |
| [<-- AS1, AS2 Information ---] | |
| |
| [------ Pub Key Format Negociation Request --->] |
| |
| [<---- Pub Key Format Negociation Response ----] |
| |
| -- Authorization + Key Distribution Request ---> |
| |
| <-- Authorization + Key Distribution Response -- |
| |
Figure 2: B: Access request - response 3.1. AS Discovery (Optional)
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) for AS discovery, the Broker MAY send the address of
the Broker, the Broker MAY send the address of both the AS in charge the AS to the Client in the 'AS' parameter in the AS Information as a
of the topic back to the Client in the 'AS' parameter in the AS response to an Unauthorized Resource Request (Section 5.2). An
Information, as a response to an Unauthorized Resource Request example using CBOR diagnostic notation and CoAP is given below:
(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 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://as.example.com/token"}
coaps://as2.example.com/pubsubkey"}
Figure 3: AS1, AS2 Information example
After retrieving the AS2 address, the Client MAY send a request to
the AS, in order to retrieve necessary information concerning the
public keys in the group, as well as concerning the algorithm and
related parameters for computing signatures in the group. This
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
a specific resource at the AS, including only the parameters
'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
"gid" is the topic identifier, but implementations are not required
to use this name, and can use their own instead. The AS MUST respond
with the response defined in Section 3.3 of
[I-D.ietf-ace-key-groupcomm], specifically including the parameters
'sign_info', 'pub_key_enc', and 'rsnonce' (8 bytes pseudo-random
nonce generated by the AS).
After that, the Client sends an Authorization + Joining Request,
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
reason for merging these two messages is that the AS2 is both the AS
and the KDC, in this setting, so the Authorization Response and the
Post Token message are not necessary.
More specifically, the Client sends a POST request to the /ace-group/
gid endpoint on AS2, with Content-Format = "application/ace+cbor"
that MUST contain in the payload (formatted as a CBOR map):
* the following fields from the Joining Request (Section 4.2 of
[I-D.ietf-ace-key-groupcomm]):
- 'scope' parameter set to a CBOR array containing:
o the broker's topic as first element, and
o the text string "publisher" if the client request to be a
publisher, "subscriber" if the client request to be a
subscriber, or a CBOR array containing both, if the client
request to be both.
- 'get_pub_keys' parameter set to the empty array if the Client
needs to retrieve the public keys of the other pubsub members,
- 'client_cred' parameter containing the Client's public key
formatted as a COSE_Key, if the Client needs to directly send
that to the AS2,
- 'cnonce', set to a 8 bytes long pseudo-random nonce, if Figure 4: AS Information example
'client_cred' is present,
- 'client_cred_verify', set to a singature computed over the Authorisation Server (AS) Discovery is also defined in
rsnonce concatenated with cnonce, if 'client_cred' is present, Section 2.2.6.1 of [I-D.ietf-ace-mqtt-tls-profile] for MQTT v5
clients (and not supported for MQTT v3 clients).
- OPTIONALLY, if needed, the 'pub_keys_repos' parameter 3.2. Authorising to the Broker
* the following fields from the Authorization Request (Section 3.1 After retrieving the AS address, the Client sends an Authorisation
of [I-D.ietf-ace-key-groupcomm]): Request to the AS for the KDC and the Broker. Note that the AS
authorises:
- OPTIONALLY, if needed, additional parameters such as 1. What endpoints are allowed to Publish or Subscribe to the Broker.
'client_id'
TODO: 'cnonce' might change name. TODO: register media type ace+json 2. What endpoints are allowed to access to which topic(s).
for HTTP?
Note that the alg parameter in the 'client_cred' COSE_Key MUST be a The request includes the following fields from the Authorization
signing algorithm, as defined in section 8 of [RFC8152], and that it Request (Section 3.1 of [I-D.ietf-ace-key-groupcomm]):
is the same algorithm used to compute the signature sent in
'client_cred_verify'.
Examples of the payload of a Authorization + Joining Request are * 'scope', containing the topic identifier, that the Client wishes
specified in Figure 5 and Figure 8. to access
The AS2 verifies that the Client is authorized to access the topic * 'audience', an array with identifiers of the KDC and the Broker.
and, if the 'client_cred' parameter is present, stores the public key
of the Client.
The AS2 response is an Authorization + Joining Response, with Other additional parameters can be included if necessary, as defined
Content-Format = "application/ace+cbor". The payload (formatted as a in [I-D.ietf-ace-oauth-authz].
CBOR map) MUST contain:
* the following fields from the Joining Response (Section 4.2 of The 'scope' parameter is encoded as follows, where 'gname' is treated
[I-D.ietf-ace-key-groupcomm]): as topic identifier or filter.
- 'kty' identifies a key type "COSE_Key", as defined in gname = tstr
Section 8.2.
- 'key', which contains a "COSE_Key" object (defined in role = tstr
[RFC8152], containing:
o 'kty' with value 4 (symmetric) scope_entry = [ gname , ? ( role / [ 2*role ] ) ]
o 'alg' with value defined by the AS2 (Content Encryption scope = << [ + scope_entry ] >>
Algorithm)
o 'Base IV' with value defined by the AS2 Figure 5: CDLL definition of scope, using as example group name
encoded as tstr and role as tstr.
o 'k' with value the symmetric key value Other scope representations are also possible and are described in
o OPTIONALLY, 'kid' with an identifier for the key value (Section 3.1 of [I-D.ietf-ace-key-groupcomm]). Note that in the AIF-
MQTT data model is described in Section 3 of the
[I-D.ietf-ace-mqtt-tls-profile], the role values have been further
constrained to "pub" and "sub".
- OPTIONALLY, 'exp' with the expiration time of the key The AS responds with an Authorization Response as defined in
Section 5.8.2 of [I-D.ietf-ace-oauth-authz] and Section 3.2 of
[I-D.ietf-ace-key-groupcomm]. If a token is returned, then the
audience of this token are the KDC and the Broker, and the client
uses the same token for both. In case CoAP PubSub is used as
communication protocol, 'profile' is set to "coap_pubsub_app" as
defined in Section 8.1.1. In case MQTT PubSub is used as
communication protocol, 'profile' is set to "mqtt_pubsub_app" as
defined in Section 8.1.2.
- 'pub_keys', containing the public keys of all authorized 4. Key Distribution for PubSub Content Protection
signing members formatted as COSE_Keys, if the 'get_pub_keys'
parameter was present and set to the empty array in the
Authorization + Key Distribution Request
* the following fields from the Authorization Response (Section 3.2 4.1. Token POST
of [I-D.ietf-ace-key-groupcomm]):
- 'profile' set to the corresponding value, see Section 3.2 or After receiving a token from the AS, the Client posts the token to
Section 3.3 the KDC (Section 3.3 [I-D.ietf-ace-key-groupcomm]). In addition to
the token post, a Subscriber Client MAY ask for the public keys in
the group, used for source authentication, as well as any other group
parameters. In this case, the message MUST have Content-Format set
to "application/ace+cbor" defined in Section 8.16 of
[I-D.ietf-ace-oauth-authz]. The message payload MUST be formatted as
a CBOR map, which MUST include the access token and the 'sign_info'
parameter. The details for the 'sign_info' parameter can be found in
Section 3.3 of [I-D.ietf-ace-key-groupcomm]. Alternatively, the
joining node may retrieve this information by other means as
described in [I-D.ietf-ace-key-groupcomm].
- OPTIONALLY 'scope', set to a CBOR array containing: The KDC verifies that the Client is authorized to access the topic
with the requested role. After successful verification, the Client
is authorized to receive the group keying material from the KDC and
join the group. The KDC replies to the Client with a 2.01 (Created)
response, using Content-Format "application/ace+cbor". The payload
of the 2.01 response is a CBOR map.
o the broker's topic as first element, and A Publisher Client MUST send its own public key to the KDC when
joining the group. Since the access token from a Publisher Client
will have "pub" role, the KDC MUST include 'kdcchallenge' in the CBOR
map, specifying a dedicated challenge N_S generated by the KDC. The
Client uses this challenge to prove possession of its own private key
(see [I-D.ietf-ace-key-groupcomm] for details).
o the string "publisher" if the client is an authorized 4.2. Join Request
publisher, "subscriber" if the client is an authorized
subscriber, or a CBOR array containing both, if the client
is authorized to be both.
Examples for the response payload are detailed in Figure 6 and In the next step, a joining node MUST have a secure communication
Figure 9. association established with the KDC, before starting to join a group
under that KDC. Possible ways to provide a secure communication
association are described in the DTLS transport profile
[I-D.ietf-ace-dtls-authorize] and OSCORE transport profile
[I-D.ietf-ace-oscore-profile] of ACE.
3.2. coap_pubsub_app Application Profile After establishing a secure communication, the Client sends a Joining
Request to the KDC as described in Section 4.3 of
[I-D.ietf-ace-key-groupcomm]. More specifically, the Client sends a
POST request to the /ace-group/GROUPNAME endpoint on KDC, with
Content-Format = "application/ace+cbor" that MUST contain in the
payload (formatted as a CBOR map, Section 4.1.2.1 of
[I-D.ietf-ace-key-groupcomm]):
In case CoAP PubSub is used as communication protocol: * 'scope' parameter as defined earlier
* 'profile' set to "coap_pubsub_app", as specified in Section 8.1.1. * 'get_pub_keys' parameter set to the empty array if the Client
needs to retrieve the public keys of the other pubsub members,
3.3. mqtt_pubsub_app Application Profile * 'client_cred' parameter containing the Client's public key
formatted as a COSE_Key (as defined in Section 8.2), if the Client
is a Publisher,
In case mQTT PubSub is used as communication protocol: * 'cnonce', encoded as a CBOR byte string, and including a dedicated
nonce N_C generated by the Client, if 'client_cred' is present,
* 'profile' set to "mqtt_pubsub_app", as specified in Section 8.1.2. * 'client_cred_verify', set to a singature computed over the
'rsnonce' concatenated with cnonce, if 'client_cred' is present,
4. Publisher * OPTIONALLY, if needed, the 'pub_keys_repos' parameter
TODO: Check 'cnonce'
In this section, it is specified how the Publisher requests, obtains Note that for a Subscriber-only Client, the Joining Request MUST NOT
and communicates to the Broker the access token, as well as the contain the 'client_cred parameter', the role element in the 'scope'
retrieval of the keying material to protect the publication. parameter MUST be set to "sub". The Subscriber MUST have access to
the public keys of all the Publishers; this MAY be achieved in the
Joining Request by using the parameter 'get_pub_keys' set to receive
the public key of all Publishers using "pub" as the 'role_filter' (as
described in Section 4.1.2.1 of [I-D.ietf-ace-key-groupcomm]).
+----------------+ +----------------+ If the 'client_cred' parameter is present, KDC stores the public key
| | | | of the Client. Note that the alg parameter in the 'client_cred'
| Authorization | | Authorization | COSE_Key MUST be a signing algorithm, as defined in section 8 of
| Server 1 | | Server 2 | [RFC8152], and that it is the same algorithm used to compute the
| | | | signature sent in 'client_cred_verify'.
+----------------+ +----------------+
^ ^
| |
+---------(A)----+ |
| +--------------------(B)--------+
v v
+------------+ +------------+
| | ----(C)---> | |
| Publisher | | Broker |
| | | |
| | | |
+------------+ +------------+
Figure 4: Phase 1: Publisher side The KDC response to Joining Response has the Content-Format =
"application/ace+cbor". The payload (formatted as a CBOR map) MUST
contain the following fields from the Joining Response (Section 4.2
of [I-D.ietf-ace-key-groupcomm]):
This is a combination of two independent phases: * 'kty' identifies a key type "COSE_Key".
* one is the establishment of a secure connection between Publisher * 'key', which contains a "COSE_Key" object (defined in [RFC8152],
and Broker, using an ACE transport profile such as DTLS containing:
[I-D.ietf-ace-dtls-authorize], OSCORE
[I-D.ietf-ace-oscore-profile] or REF MQTT Profile. (A)(C)
* the other is the Publisher's retrieval of keying material to - 'kty' with value 4 (symmetric)
protect the publication. (B)
In detail: - 'alg' with value defined by the AS2 (Content Encryption
Algorithm)
(A) corresponds to the Access Token Request and Response between - 'Base IV' with value defined by the AS2
Publisher and Authorization Server to retrieve the Access Token and
RS (Broker) Information. As specified, the Publisher has the role of
a CoAP client, the Broker has the role of the CoAP server.
(C) corresponds to the exchange between Publisher and Broker, where - 'k' with value the symmetric key value
the Publisher sends its access token to the Broker and establishes a
secure connection with the Broker. Depending on the Information
received in (A), this can be for example DTLS handshake, or other
protocols. Depending on the application, there may not be the need
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. - OPTIONALLY, 'kid' with an identifier for the key value
(B) corresponds to the retrieval of the keying material to protect * OPTIONALLY, 'exp' with the expiration time of the key
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
Section 3.1.
4.1. CoAP Publisher * 'pub_keys', containing the public keys of all authorized signing
members formatted as COSE_Keys, if the 'get_pub_keys' parameter
was present and set to the empty array in the Key Distribution
Request. For Subscriber Clients, the Joining Response MUST
contain the 'pub_keys' parameter.
An example of the payload of an Authorization + Joining Request and An example of the Joining Request and corresponding Response for a
corresponding Response for a CoAP Publisher using CoAP and CBOR is CoAP Publisher using CoAP and CBOR is specified in Figure 6 and
specified in Figure 5 and Figure 6, where SIG is a signature computed Figure 7, where SIG is a signature computed using the private key
using the private key associated to the public key and the algorithm associated to the public key and the algorithm in 'client_cred'.
in "client_cred".
{ {
"scope" : ["Broker1/Temp", "publisher"], "scope" : ["Broker1/Temp", "pub"],
"client_id" : "publisher1",
"client_cred" : "client_cred" :
{ / COSE_Key / { / COSE_Key /
/ type / 1 : 2, / EC2 / / type / 1 : 2, / EC2 /
/ kid / 2 : h'11', / kid / 2 : h'11',
/ alg / 3 : -7, / ECDSA with SHA-256 / / alg / 3 : -7, / ECDSA with SHA-256 /
/ crv / -1 : 1 , / P-256 / / crv / -1 : 1 , / P-256 /
/ x / -2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de1 / x / -2 : h'65eda5a12577c2bae829437fe338701a10aaa375e1bb5b5de1
08de439c08551d', 08de439c08551d',
/ y /-3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e / y /-3 : h'1e52ed75701163f7f9e40ddf9f341b3dc9ba860af7e0ca7ca7e
9eecd0084d19c', 9eecd0084d19c',
"cnonce" : h'd36b581d1eef9c7c, "cnonce" : h'd36b581d1eef9c7c,
"client_cred_verify" : SIG "client_cred_verify" : SIG
} }
} }
Figure 5: Authorization + Joining Request payload for a Publisher Figure 6: Joining Request payload for a Publisher
{ {
"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 7: Joining Response payload for a Publisher
4.2. MQTT Publisher
TODO
5. Subscriber
In this section, it is specified how the Subscriber retrieves the
keying material to protect the publication.
+----------------+
| |
| Authorization |
| Server 2 |
| |
+----------------+
^
|
+-----(D)------+
|
v
+------------+
| |
| Subscriber |
| |
| |
+------------+
Figure 7: Phase 2: Subscriber side
Step (D) between Subscriber and AS2 corresponds to the retrieval of
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
This step is the same as (B) between Publisher and AS2 (Section 3.1),
with the following differences:
* The Authorization + Joining Request MUST NOT contain the
'client_cred parameter', the role element in the 'scope' parameter
MUST be set to "subscriber". The Subscriber MUST have access to
the public keys of all the Publishers; this MAY be achieved in the
Authorization + Joining Request by using the parameter
'get_pub_keys' set to empty array.
* The Authorization + Key Distribution Response MUST contain the
'pub_keys' parameter.
5.1. CoAP Subscriber
An example of the payload of an Authorization + Joining Request and An example of the payload of a Joining Request and corresponding
corresponding Response for a CoAP Subscriber using CoAP and CBOR is Response for a Subscriber using CoAP and CBOR is specified in
specified in Figure 8 and Figure 9. Figure 8 and Figure 9.
{ {
"scope" : ["Broker1/Temp", "subscriber"], "scope" : ["Broker1/Temp", "sub"],
"get_pub_keys" : [ ] "get_pub_keys" : [true, ["pub"], []]
} }
Figure 8: Authorization + Joining Request payload for a Subscriber Figure 8: Joining Request payload for a Subscriber
{ {
"profile" : "coap_pubsub_app", "scope" : ["Broker1/Temp", "sub"],
"scope" : ["Broker1/Temp", "subscriber"],
"kty" : "COSE_Key" "kty" : "COSE_Key"
"key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7', "key" : {1: 4, 2: h'1234', 3: 12, 5: h'1f389d14d17dc7',
-1: h'02e2cc3a9b92855220f255fff1c615bc'}, -1: h'02e2cc3a9b92855220f255fff1c615bc'},
"pub_keys" : [ "pub_keys" : [
{ {
1 : 2, / type EC2 / 1 : 2, / type EC2 /
2 : h'11', / kid / 2 : h'11', / kid /
3 : -7, / alg ECDSA with SHA-256 / 3 : -7, / alg ECDSA with SHA-256 /
-1 : 1 , / crv P-256 / -1 : 1 , / crv P-256 /
-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: Joining Response payload for a Subscriber
5.2. MQTT Subscriber
TODO
6. Pub-Sub Protected Communication
This section specifies the communication Publisher-Broker and 5. PubSub Protected Communication
Subscriber-Broker, after the previous phases have taken place. The
operations of publishing and subscribing are defined in
[I-D.ietf-core-coap-pubsub].
+------------+ +------------+ +------------+ +------------+ +------------+ +------------+
| | | | | | | | | | | |
| Publisher | ----(E)---> | Broker | | Subscriber | | Publisher | ----(D)---> | Broker | | Subscriber |
| | | | <----(F)---- | | | | | | <----(E)---- | |
| | | | -----(G)---> | | | | | | -----(F)---> | |
+------------+ +------------+ +------------+ +------------+ +------------+ +------------+
Figure 10: Phase 3: Secure communication between Publisher and
Subscriber
The (E) message corresponds to the publication of a topic on the Figure 10: Secure communication between Publisher and Subscriber
Broker. The publication (the resource representation) is protected
with COSE ([RFC8152]). The (F) message is the subscription of the
Subscriber, which is unprotected, unless a profile of ACE
[I-D.ietf-ace-oauth-authz] is used between Subscriber and Broker.
The (G) message is the response from the Broker, where the
publication is protected with COSE.
The flow graph is presented below. (D) corresponds to the publication of a topic on the Broker. The
publication (the resource representation) is protected with COSE
([RFC8152]). The (E) message is the subscription of the Subscriber.
The subscription MAY be unprotected. The (F) message is the response
from the Broker, where the publication is protected with COSE.
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 for CoAP
The flow graph is presented below for CoAP. The message flow is
similar for MQTT, where PUT corresponds to a PUBLISH message, and GET
corresponds to a SUBSCRIBE message. Whenever a Client publishes a
new message, the Broker sends this message to all valid subscribers.
6.1. Using COSE Objects To Protect The Resource Representation 5.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 the KDC
exchange B (Section 3.1) to protect the payload of the PUBLISH (Section 4) to protect the payload of the PUBLISH operation
operation (Section 4.3 of [I-D.ietf-core-coap-pubsub] and REF MQTT). (Section 4.3 of [I-D.ietf-core-coap-pubsub] and
Specifically, the COSE Key is used to create a COSE_Encrypt0 with [MQTT-OASIS-Standard-v5]). Specifically, the COSE Key is used to
algorithm specified by AS2. The Publisher uses the private key create a COSE_Encrypt0 with algorithm specified by KDC. The
corresponding to the public key sent to the AS2 in exchange B Publisher uses the private key corresponding to the public key sent
(Section 3.1) to countersign the COSE Object as specified in to the KDC in exchange B (Section 4) to countersign the COSE Object
Section 4.5 of [RFC8152]. The CoAP payload is replaced by the COSE as specified in Section 4.5 of [RFC8152]. The payload is replaced by
object before the publication is sent to the Broker. the COSE 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
object to retrieve the right public key to verify the COSE 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 KDC
to verify and decrypt the publication received in the payload of the to verify and decrypt the publication received in the payload from
CoAP Notification from the Broker. the Broker (in the case of CoAP the publication is received by the
CoAP Notification and for MQTT, it is received as a PUBLISH message
from the Broker to the subscribing client).
The COSE object is constructed in the following way: The COSE object is constructed in the following way:
* 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 4 and MUST contain the content
encryption algorithm. encryption algorithm.
* 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].
* The ciphertext, computed over the plaintext that MUST contain the * The ciphertext, computed over the plaintext that MUST contain the
CoAP payload. message 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:[
skipping to change at page 16, line 5 skipping to change at page 13, line 37
/ ciphertext / h'8df0a3b62fccff37aa313c8020e971f8aC8d' / ciphertext / h'8df0a3b62fccff37aa313c8020e971f8aC8d'
] ]
) )
Figure 12: Example of COSE Object sent in the payload of a Figure 12: Example of COSE Object sent in the payload of a
PUBLISH 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].
6. Profile-specific Considerations
This section summarises the CoAP and MQTT specific pub-sub
communications, and considerations respectively.
6.1. CoAP PubSub Application Profile
A CoAP Pub-Sub Client and Broker use an ACE transport profile such as
DTLS [I-D.ietf-ace-dtls-authorize], OSCORE
[I-D.ietf-ace-oscore-profile].
As shown in Figure 1, (A) is an Access Token Request and Response
exchange between Publisher and Authorization Server to retrieve the
Access Token and RS (Broker) Information. As specified, the Client
has the role of a CoAP client, the Broker has the role of the CoAP
server.
(B) corresponds to the retrieval of the keying material to protect
the publication end-to-end (see Section 5.1), and uses
[I-D.ietf-ace-key-groupcomm]. The details are defined in Section 4.
(C) corresponds to the exchange between the Client and the Broker,
where the Client sends its access token to the Broker and establishes
a secure connection with the Broker. Depending on the Information
received in (A), this can be for example DTLS handshake, or other
protocols. Depending on the application, there may not be the need
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
simplicity, it is RECOMMENDED that the ACE transport profile used and
this specification use the same format of "scope".
After the previous phases have taken place, the pub-sub communication
can commence. The operations of publishing and subscribing are
defined in [I-D.ietf-core-coap-pubsub].
6.2. MQTT PubSub Application Profile
The steps MQTT clients go through are similar to the CoAP clients as
described in Section 6.1. The payload that is carried in MQTT
messages will be protected using COSE.
In MQTT, topics are organised as a tree, and in the
[I-D.ietf-ace-mqtt-tls-profile] 'scope' captures permissions for not
a single topic but a topic filter. Therefore, topic names (i.e.,
group names) may include wildcards spanning several levels of the
topic tree. Hence, it is important to distinguish application groups
and security groups defined in [I-D.ietf-core-groupcomm-bis]. An
application group has relevance at the application level - for
example, in MQTT an application group could denote all topics stored
under ""home/lights/". On the other hand, a security group is a
group of endpoints that each store group security material to
exchange secure communication within the group. The group
communication in [I-D.ietf-ace-key-groupcomm] refers to security
groups.
To be able join the right security group associated with requested
topics (application groups), the client needs to discover the
(application group, security group) association. In MQTT, $SYS/ has
been widely adopted as a prefix to topics that contain broker-
specific information, and hence, can be used by the broker for this
purpose. In typical implementations, Clients that subscribe to one
or more SYS-Topics receive the current value on the SYS topics as
soon as they subscribe, and then after periodically.
For an MQTT client we envision the following steps to take place:
1. Client learns the (application group, security group)
associations from the $SYS topic (this topic is RECOMMENDED to be
a protected topic). These associations MAY be published under
another topic.
2. Client computes the corresponding security groups for its
application groups, and sends token requests for the security
groups to AS.
3. Client sends join requests to KDC to gets the keys for these
security groups.
4. Client authorises to the Broker with the token (described in
[I-D.ietf-ace-mqtt-tls-profile]).
5. A Publisher Client sends PUBLISH messages for a given topic and
protects the payload with the corresponding key for the
associated security group. RS validates the PUBLISH message by
checking the topic's security group association and the stored
token.
6. A Subscriber Client may send SUBSCRIBE messages with one or
multiple topic filters. A topic filter may correspond to
multiple topics but MUST belong to a single security group. If
requested topics are in multiple security groups, then these
topics SHOULD be separated into the corresponding topic filters
in the SUBSCRIBE message.
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
topic to be able to verify the publications. Such a database could topic to be able to verify the publications. Such a database could
be set up and managed by the same entity having control of the topic, be set up and managed by the same entity having control of the topic,
i.e. AS2. i.e. KDC.
An application where it is not critical that only authorized An application where it is not critical that only authorized
Publishers can publish on a topic may decide not to make use of the Publishers can publish on a topic may decide not to make use of the
asymmetric crypto and only use symmetric encryption/MAC to asymmetric crypto and only use symmetric encryption/MAC to
confidentiality and integrity protect the publication, but this is confidentiality and integrity protection of the publication.
not recommended since, as a result, any authorized Subscribers with However, this is not recommended since, as a result, any authorized
access to the Broker may forge unauthorized publications without Subscribers with access to the Broker may forge unauthorized
being detected. In this symmetric case the Subscribers would only publications without being detected. In this symmetric case the
need one symmetric key per topic, and would not need to know any Subscribers would only need one symmetric key per topic, and would
information about the Publishers, that can be anonymous to it and the not need to know any information about the Publishers, that can be
Broker. anonymous to it and the Broker.
Subscribers can be excluded from future publications through re- Subscribers can be excluded from future publications through re-
keying for a certain topic. This could be set up to happen on a keying for a certain topic. This could be set up to happen on a
regular basis, for certain applications. How this could be done is regular basis, for certain applications. How this could be done is
out of scope for this work. out of scope for this work.
The Broker is only trusted with verifying that the Publisher is The Broker is only trusted with verifying that the Publisher is
authorized to publish, but is not trusted with the publications authorized to publish, but is not trusted with the publications
itself, which it cannot read nor modify. In this setting, caching of itself, which it cannot read nor modify. In this setting, caching of
publications on the Broker is still allowed. publications on the Broker is still allowed.
skipping to change at page 17, line 17 skipping to change at page 17, line 5
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 CoAP pub-sub authorization for publishers and subscribers in a CoAP pub-sub
setting scenario in a constrained environment. setting scenario in a constrained environment.
CBOR Key: TBD CBOR Key: TBD
Reference: [[This document]] Reference: [[This document]]
8.1.2. CoAP Profile Registration 8.1.2. MQTT Profile Registration
Name: mqtt_pubsub_app Name: mqtt_pubsub_app
Description: Profile for delegating client authentication and Description: Profile for delegating client authentication and
authorization for publishers and subscribers in a MQTT pub-sub authorization for publishers and subscribers in a MQTT pub-sub
setting scenario in a constrained environment. setting scenario in a constrained environment.
CBOR Key: TBD CBOR Key: TBD
Reference: [[This document]] Reference: [[This document]]
skipping to change at page 18, line 8 skipping to change at page 17, line 44
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", Work in Progress, Internet- Communication using ACE", Work in Progress, Internet-
Draft, draft-ietf-ace-key-groupcomm-10, 2 November 2020, Draft, draft-ietf-ace-key-groupcomm-11, 22 February 2021,
<http://www.ietf.org/internet-drafts/draft-ietf-ace-key- <https://www.ietf.org/archive/id/draft-ietf-ace-key-
groupcomm-10.txt>. groupcomm-11.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)", Work in Progress, Internet-Draft, Framework (ACE-OAuth)", Work in Progress, Internet-Draft,
draft-ietf-ace-oauth-authz-36, 16 November 2020, draft-ietf-ace-oauth-authz-40, 26 April 2021,
<http://www.ietf.org/internet-drafts/draft-ietf-ace-oauth- <https://www.ietf.org/archive/id/draft-ietf-ace-oauth-
authz-36.txt>. authz-40.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)", Work in Progress, Internet-Draft, draft-ietf- (CoAP)", Work in Progress, Internet-Draft, draft-ietf-
core-coap-pubsub-09, 30 September 2019, core-coap-pubsub-09, 30 September 2019,
<http://www.ietf.org/internet-drafts/draft-ietf-core-coap- <https://www.ietf.org/archive/id/draft-ietf-core-coap-
pubsub-09.txt>. pubsub-09.txt>.
[I-D.ietf-core-groupcomm-bis]
Dijk, E., Wang, C., and M. Tiloca, "Group Communication
for the Constrained Application Protocol (CoAP)", Work in
Progress, Internet-Draft, draft-ietf-core-groupcomm-bis-
03, 22 February 2021, <https://www.ietf.org/archive/id/
draft-ietf-core-groupcomm-bis-03.txt>.
[MQTT-OASIS-Standard-v5]
Banks, A., Briggs, E., Borgendale, K., and R. Gupta,
"OASIS Standard MQTT Version 5.0", 2017,
<http://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-
v5.0-os.html>.
[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>.
[RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", STD 94, RFC 8949,
DOI 10.17487/RFC8949, December 2020,
<https://www.rfc-editor.org/info/rfc8949>.
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", Work in Progress, Internet-Draft, draft- environments", Work in Progress, Internet-Draft, draft-
ietf-ace-actors-07, 22 October 2018, <http://www.ietf.org/ ietf-ace-actors-07, 22 October 2018,
internet-drafts/draft-ietf-ace-actors-07.txt>. <https://www.ietf.org/archive/id/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)", Work in Progress, Constrained Environments (ACE)", Work in Progress,
Internet-Draft, draft-ietf-ace-dtls-authorize-14, 29 Internet-Draft, draft-ietf-ace-dtls-authorize-16, 8 March
October 2020, <http://www.ietf.org/internet-drafts/draft- 2021, <https://www.ietf.org/archive/id/draft-ietf-ace-
ietf-ace-dtls-authorize-14.txt>. dtls-authorize-16.txt>.
[I-D.ietf-ace-mqtt-tls-profile]
Sengul, C. and A. Kirby, "Message Queuing Telemetry
Transport (MQTT)-TLS profile of Authentication and
Authorization for Constrained Environments (ACE)
Framework", Work in Progress, Internet-Draft, draft-ietf-
ace-mqtt-tls-profile-11, 14 April 2021,
<https://www.ietf.org/archive/id/draft-ietf-ace-mqtt-tls-
profile-11.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", Work in Progress, for Constrained Environments Framework", Work in Progress,
Internet-Draft, draft-ietf-ace-oscore-profile-14, 14 Internet-Draft, draft-ietf-ace-oscore-profile-18, 14 April
December 2020, <http://www.ietf.org/internet-drafts/draft- 2021, <https://www.ietf.org/archive/id/draft-ietf-ace-
ietf-ace-oscore-profile-14.txt>. oscore-profile-18.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]
* 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 4).
* 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 4).
* REQ3: Optionally, specify the acceptable values for 'sign_alg': * REQ3: Optionally, specify the acceptable values for 'sign_alg':
TODO TODO
* REQ4: Optionally, specify the acceptable values for * REQ4: Optionally, specify the acceptable values for
'sign_parameters': TODO 'sign_parameters': TODO
* REQ5: Optionally, specify the acceptable values for * REQ5: Optionally, specify the acceptable values for
'sign_key_parameters': TODO 'sign_key_parameters': TODO
* REQ6: Optionally, specify the acceptable values for 'pub_key_enc': * REQ6: Optionally, specify the acceptable values for 'pub_key_enc':
TODO TODO
* 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 4.
* REQ8: Specify the acceptable values of 'kty' : "COSE_Key", see * REQ8: Specify the acceptable values of 'kty' : "COSE_Key", see
Section 3.1. Section 4.
* REQ9: Specity the format of the identifiers of group members: TODO * REQ9: Specity the format of the identifiers of group members: TODO
* 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
* 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.
* 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 5.1.
* 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.
* 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.
* 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
skipping to change at page 21, line 16 skipping to change at page 21, line 28
'mgt_key_material': not defined 'mgt_key_material': not defined
* 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, Jim Schaad and Marco Tiloca for the useful
useful discussion and reviews that helped shape this document. discussion and reviews that helped shape this document.
Authors' Addresses Authors' Addresses
Francesca Palombini Francesca Palombini
Ericsson Ericsson
Email: francesca.palombini@ericsson.com Email: francesca.palombini@ericsson.com
Cigdem Sengul Cigdem Sengul
Brunel University Brunel University
 End of changes. 115 change blocks. 
450 lines changed or deleted 449 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/