draft-ietf-ace-mqtt-tls-profile-02.txt   draft-ietf-ace-mqtt-tls-profile-03.txt 
ACE Working Group C. Sengul ACE Working Group C. Sengul
Internet-Draft Nominet Internet-Draft Nominet
Intended status: Standards Track A. Kirby Intended status: Standards Track A. Kirby
Expires: May 5, 2020 Oxbotica Expires: June 22, 2020 Oxbotica
P. Fremantle P. Fremantle
University of Portsmouth University of Portsmouth
November 2, 2019 December 20, 2019
MQTT-TLS profile of ACE MQTT-TLS profile of ACE
draft-ietf-ace-mqtt-tls-profile-02 draft-ietf-ace-mqtt-tls-profile-03
Abstract Abstract
This document specifies a profile for the ACE (Authentication and This document specifies a profile for the ACE (Authentication and
Authorization for Constrained Environments) framework to enable Authorization for Constrained Environments) framework to enable
authorization in an MQTT-based publish-subscribe messaging system. authorization in an MQTT-based publish-subscribe messaging system.
Proof-of-possession keys, bound to OAuth2.0 access tokens, are used Proof-of-possession keys, bound to OAuth2.0 access tokens, are used
to authenticate and authorize MQTT Clients. The protocol relies on to authenticate and authorize MQTT Clients. The protocol relies on
TLS for confidentiality and server authentication. TLS for confidentiality and server authentication.
skipping to change at page 1, line 38 skipping to change at page 1, line 38
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 May 5, 2020. This Internet-Draft will expire on June 22, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 14 skipping to change at page 2, line 14
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
1.2. ACE-Related Terminology . . . . . . . . . . . . . . . . . 4 1.2. ACE-Related Terminology . . . . . . . . . . . . . . . . . 4
1.3. MQTT-Related Terminology . . . . . . . . . . . . . . . . 4 1.3. MQTT-Related Terminology . . . . . . . . . . . . . . . . 5
2. Authorizing Connection Requests . . . . . . . . . . . . . . . 7 2. Authorizing Connection Requests . . . . . . . . . . . . . . . 7
2.1. Client Token Request to the Authorization Server (AS) . . 8 2.1. Client Token Request to the Authorization Server (AS) . . 8
2.2. Client Connection Request to the Broker (C) . . . . . . . 8 2.2. Client Connection Request to the Broker (C) . . . . . . . 9
2.2.1. Client-Server Authentication over TLS and MQTT . . . 8 2.2.1. Client-Server Authentication over TLS and MQTT . . . 9
2.2.2. authz-info: The Authorization Information Topic . . . 9 2.2.2. authz-info: The Authorization Information Topic . . . 10
2.2.3. Transporting Access Token Inside the MQTT CONNECT . . 9 2.2.3. Transporting Access Token Inside the MQTT CONNECT . . 11
2.2.4. Authentication Using AUTH Property . . . . . . . . . 11 2.2.4. Authentication Using AUTH Property . . . . . . . . . 12
2.2.4.1. Proof-of-Possession Using a Challenge from the 2.2.4.1. Proof-of-Possession Using a Challenge from the
TLS session . . . . . . . . . . . . . . . . . . . 11 TLS session . . . . . . . . . . . . . . . . . . . 13
2.2.4.2. Proof-of-Possession via Broker-generated 2.2.4.2. Proof-of-Possession via Broker-generated
Challenge/Response . . . . . . . . . . . . . . . 12 Challenge/Response . . . . . . . . . . . . . . . 13
2.2.4.3. Unauthorised Request: Authorisation Server 2.2.4.3. Unauthorised Request: Authorisation Server
Discovery . . . . . . . . . . . . . . . . . . . . 12 Discovery . . . . . . . . . . . . . . . . . . . . 14
2.2.5. Token Validation . . . . . . . . . . . . . . . . . . 13 2.2.5. Token Validation . . . . . . . . . . . . . . . . . . 14
2.2.6. The Broker's Response to Client Connection Request . 13 2.2.6. The Broker's Response to Client Connection Request . 15
3. Authorizing PUBLISH Messages . . . . . . . . . . . . . . . . 14 3. Authorizing PUBLISH and SUBSCRIBE Messages . . . . . . . . . 15
3.1. PUBLISH Messages from the Publisher Client to the Broker 14 3.1. PUBLISH Messages from the Publisher Client to the Broker 16
3.2. PUBLISH Messages from the Broker to the Subscriber 3.2. PUBLISH Messages from the Broker to the Subscriber
Clients . . . . . . . . . . . . . . . . . . . . . . . . . 14 Clients . . . . . . . . . . . . . . . . . . . . . . . . . 16
4. Authorizing SUBSCRIBE Messages . . . . . . . . . . . . . . . 15 3.3. Authorizing SUBSCRIBE Messages . . . . . . . . . . . . . 16
5. Token Expiration and Reauthentication . . . . . . . . . . . . 15 4. Token Expiration and Reauthentication . . . . . . . . . . . . 17
6. Handling Disconnections and Retained Messages . . . . . . . . 16 5. Handling Disconnections and Retained Messages . . . . . . . . 17
7. Reduced Protocol Interactions for MQTT v3.1.1 . . . . . . . . 16 6. Reduced Protocol Interactions for MQTT v3.1.1 . . . . . . . . 18
7.1. Token Transport . . . . . . . . . . . . . . . . . . . . . 16 6.1. Token Transport . . . . . . . . . . . . . . . . . . . . . 18
7.2. Handling Authorization Errors . . . . . . . . . . . . . . 18 6.2. Handling Authorization Errors . . . . . . . . . . . . . . 20
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
9. Security Considerations . . . . . . . . . . . . . . . . . . . 19 8. Security Considerations . . . . . . . . . . . . . . . . . . . 21
10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 20 9. Privacy Considerations . . . . . . . . . . . . . . . . . . . 22
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 22
11.1. Normative References . . . . . . . . . . . . . . . . . . 20 10.1. Normative References . . . . . . . . . . . . . . . . . . 22
11.2. Informative References . . . . . . . . . . . . . . . . . 21 10.2. Informative References . . . . . . . . . . . . . . . . . 24
Appendix A. Checklist for profile requirements . . . . . . . . . 22 Appendix A. Checklist for profile requirements . . . . . . . . . 24
Appendix B. Document Updates . . . . . . . . . . . . . . . . . . 22 Appendix B. Document Updates . . . . . . . . . . . . . . . . . . 25
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 23 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
1. Introduction 1. Introduction
This document specifies a profile for the ACE framework This document specifies a profile for the ACE framework
[I-D.ietf-ace-oauth-authz]. In this profile, Clients and a Broker [I-D.ietf-ace-oauth-authz]. In this profile, Clients and a Broker
use MQTT to exchange Application Messages. The protocol relies on use MQTT to exchange Application Messages. The protocol relies on
TLS for communication security between entities. The MQTT protocol TLS for communication security between entities. The MQTT protocol
interactions are described based on the MQTT v5.0 - the OASIS interactions are described based on the MQTT v5.0 - the OASIS
Standard [MQTT-OASIS-Standard-v5]. It is expected that MQTT Standard [MQTT-OASIS-Standard-v5]. It is expected that MQTT
deployments will retain backward compatibility for MQTT v3.1.1 deployments will retain backward compatibility for MQTT v3.1.1
clients, and therefore, this document also describes a reduced set of clients, and therefore, this document also describes a reduced set of
protocol interactions suited to MQTT v3.1.1 - the OASIS Standard protocol interactions for MQTT v3.1.1 - the OASIS Standard
[MQTT-OASIS-Standard]. However, it is RECOMMENDED to use MQTT v5.0 [MQTT-OASIS-Standard]. However, MQTT v5.0 is the RECOMMENDED version
as it works more naturally with ACE-style authentication and as it works more naturally with ACE-style authentication and
authorization. authorization.
MQTT is a publish-subscribe protocol and after connecting to the MQTT MQTT is a publish-subscribe protocol and after connecting to the MQTT
Broker, a Client can publish and subscribe to multiple topics. The Broker, a Client can publish and subscribe to multiple topics. The
MQTT Broker is responsible for distributing messages published by the MQTT Broker is responsible for distributing messages published by the
publishers to the appropriate subscribers. Publisher messages publishers to their subscribers. Messages are published under a
contains a Topic Name, which is used by the Broker to filter the Topic Name, and subscribers must subscribe to the Topic Names to
subscribers for the message. Subscribers must subscribe to the receive the corresponding messages. The Broker uses the Topic Name
topics to receive the corresponding messages. in a published message to determine which subscribers to relay the
messages.
In this document, message topics are treated as resources. The In this document, topics, more specifically, Topic Names, are treated
Clients are assumed to have identified the publish/subscribe topics as resources. The Clients are assumed to have identified the
of interest out-of-band (topic discovery is not a feature of the MQTT publish/subscribe topics of interest out-of-band (topic discovery is
protocol). A resource owner can pre-configure policies at the AS not a feature of the MQTT protocol). A resource owner can pre-
that give Clients publish or subscribe permissions to different configure policies at the AS that give Clients publish or subscribe
topics. permissions to different topics.
Clients use an access token, bound to a proof-of-possession (PoP) key Clients use an access token, bound to a proof-of-possession (PoP) key
to authorize with the MQTT Broker their connection and publish/ to authorize with the MQTT Broker their connection and publish/
subscribe permissions to topics. In the context of this ACE profile, subscribe permissions to topics. In the context of this ACE profile,
the MQTT Broker acts as the Resource Server (RS). In the rest of the the Broker acts as the Resource Server (RS). In the rest of the
document RS and Broker are used interchangeably. This document document the terms "RS" and "Broker" are used interchangeably. This
describes the following exchanges between Clients and the Broker. document describes how to authorise the following exchanges between
the Clients and the Broker.
o Authorizing connection requests from the Clients to the Broker o Connection requests from the Clients to the Broker
o Authorizing publish messages from the Clients to the Broker, and o Publish requests from the Clients to the Broker, and from the
from the Broker to the Clients Broker to the Clients
o Authorizing subscribe messages from Clients to the Broker o Subscribe requests from Clients to the Broker
To provide communication confidentiality and Resource Server This document does not protect the contents of the PUBLISH message
authentication, TLS is used, and TLS 1.3 is RECOMMENDED. This from the Broker, and hence, the content of the the PUBLISH message is
document makes the same assumptions as the Section 4 of the ACE not signed or encrypted separately for the subscribers. This
framework [I-D.ietf-ace-oauth-authz] regarding Client and RS functionality may be implemented using the proposal outlined in the
registration with the Authorization Server (AS) and setting up keying CoAP Pub-Sub Profile [I-D.palombini-ace-coap-pubsub-profile].
material. While the Client-Broker exchanges are only over MQTT, the
required Client-AS and RS-AS interactions are described for HTTPS- To provide communication confidentiality and RS authentication, TLS
based communication, using 'application/ace+json' content type, and is used and TLS 1.3 is RECOMMENDED. This document makes the same
unless otherwise specified, using JSON encoding. The token may be a assumptions as the Section 4 of the ACE framework
reference, or JSON Web Token (JWT). For JWT tokens, this document [I-D.ietf-ace-oauth-authz] regarding Client and RS registration with
follows RFC 7800 [RFC7800] for PoP semantics for JWTs. The Client-AS the AS and setting up keying material. While the Client-Broker
and RS-AS may also be other than HTTPS e.g., CoAP or MQTT. It may exchanges are only over MQTT, the required Client-AS and RS-AS
also be possible to use 'application/ace+cbor' content type, and CBOR interactions are described for HTTPS-based communication, using
encoding, and CBOR Web Token (CWT) and associated PoP semantics to 'application/ace+json' content type, and unless otherwise specified,
reduce the protocol memory and bandwidth requirements. For more using JSON encoding. The token may be a reference, or JSON Web Token
information on Proof of Possession semantics for CWTs, see Proof-of- (JWT). For JWT tokens, this document follows RFC 7800 [RFC7800] for
Possession Key Semantics for CBOR Web Tokens (CWTs) PoP semantics for JWTs. The Client-AS and RS-AS may also be other
[I-D.ietf-ace-cwt-proof-of-possession]. than HTTPS e.g., CoAP or MQTT. Implementations MAY also use
'application/ace+cbor' content type, and CBOR encoding, and CBOR Web
Token (CWT) and associated PoP semantics to reduce the protocol
memory and bandwidth requirements. For more information on Proof of
Possession semantics for CWTs, see Proof-of-Possession Key Semantics
for CBOR Web Tokens (CWTs) [I-D.ietf-ace-cwt-proof-of-possession].
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174], when, and only when, they appear in all 14 [RFC2119] [RFC8174], when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
1.2. ACE-Related Terminology 1.2. ACE-Related Terminology
The terminology for entities in the architecture is defined in OAuth The terminology for entities in the architecture is defined in OAuth
2.0 RFC 6749 [RFC6749] such as "Client" (C), "Resource Server" (RS) 2.0 RFC 6749 [RFC6749] such as "Client" (C), "Resource Server" (RS)
and "Authorization Server" (AS). and "Authorization Server" (AS).
The term "endpoint" is used following its OAuth definition, to denote
resources such as /token and /introspect at the AS.
The term "Resource" is used to refer to an MQTT Topic Name, which is The term "Resource" is used to refer to an MQTT Topic Name, which is
defined in Section 1.3. Hence, the "Resource Owner" is any entity defined in Section 1.3. Hence, the "Resource Owner" is any entity
that can authoritatively speak for the topic. that can authoritatively speak for the topic.
Certain security-related terms such as "authentication", Certain security-related terms such as "authentication",
"authorization", "confidentiality", "(data) integrity", "message "authorization", "confidentiality", "(data) integrity", "message
authentication code", and "verify" are taken from RFC 4949 [RFC4949]. authentication code", and "verify" are taken from RFC 4949 [RFC4949].
1.3. MQTT-Related Terminology 1.3. MQTT-Related Terminology
The document describes message exchanges as MQTT protocol The document describes message exchanges as MQTT protocol
interactions. The Clients are MQTT Clients, which connect to the interactions. The Clients are MQTT Clients, which connect to the
Broker to publish and subscribe to Application Messages. For Broker to publish and subscribe to Application Messages, labeled with
additional information, please refer to the MQTT v5.0 - the OASIS their topics. For additional information, please refer to the MQTT
Standard [MQTT-OASIS-Standard-v5] or the MQTT v3.1.1 - the OASIS v5.0 - the OASIS Standard [MQTT-OASIS-Standard-v5] or the MQTT v3.1.1
Standard [MQTT-OASIS-Standard]. - the OASIS Standard [MQTT-OASIS-Standard].
MQTTS MQTTS
Secured transport profile of MQTT. MQTTS runs over TLS. Secured transport profile of MQTT. MQTTS runs over TLS.
Broker Broker
The Server in MQTT. It acts as an intermediary between The Server in MQTT. It acts as an intermediary between the
Clients that publishes Application Messages, and the Clients Clients that publishes Application Messages, and the Clients
that made Subscriptions. The Broker acts as the Resource that made Subscriptions. The Broker acts as the Resource
Server for the Clients. Server for the Clients.
Application Message Application Message
The data carried by the MQTT protocol. The data has an The data carried by the MQTT protocol. The data has an
associated QoS level and a Topic Name. associated QoS level and a Topic Name.
QoS level QoS level
The level of assurance for the delivery of an Application The level of assurance for the delivery of an Application
skipping to change at page 6, line 16 skipping to change at page 6, line 25
Authentication Exchange. An AUTH packet is sent from the Authentication Exchange. An AUTH packet is sent from the
Client to the Broker or to the Broker to the Client as part Client to the Broker or to the Broker to the Client as part
of an extended authentication exchange. AUTH Properties of an extended authentication exchange. AUTH Properties
include Authentication Method and Authentication Data. The include Authentication Method and Authentication Data. The
Authentication Method is set in the CONNECT packet, and Authentication Method is set in the CONNECT packet, and
consequent AUTH packets follow the same Authentication consequent AUTH packets follow the same Authentication
Method. The contents of the Authentication Data are defined Method. The contents of the Authentication Data are defined
by the Authentication Method. by the Authentication Method.
PUBLISH PUBLISH
Publish packet that can be sent from a Client to the Broker, Publish request sent from a publishing Client to the Broker,
or from the Broker to a Client. or from the Broker to a subscribing Client.
PUBACK PUBACK
Response to PUBLISH packet with QoS level 1. PUBACK can be Response to PUBLISH request with QoS level 1. PUBACK can be
sent from the Broker to a Client or a Client to the Broker. sent from the Broker to a Client or a Client to the Broker.
PUBREC PUBREC
Response to PUBLISH packet with QoS level 2. PUBREC can be Response to PUBLISH request with QoS level 2. PUBREC can be
sent from the Broker to a Client or a Client to the Broker. sent from the Broker to a Client or a Client to the Broker.
SUBSCRIBE SUBSCRIBE
The Client subscribe request. The Client subscribe request.
SUBACK SUBACK
Subscribe acknowledgment. Subscribe acknowledgment.
PINGREQ PINGREQ
A ping request sent from a Client to the Broker. It signals A ping request sent from a Client to the Broker. It signals
to the Broker that the Client is alive, and is used to to the Broker that the Client is alive, and is used to
confirm that the Broker is still alive. The "Keep Alive" confirm that the Broker is also alive. The "Keep Alive"
period is set in the CONNECT message. period is set in the CONNECT message.
PINGRESP PINGRESP
Response sent by the Broker to the Client in response to Response sent by the Broker to the Client in response to
PINGREQ. It indicates the Broker is alive. PINGREQ. It indicates the Broker is alive.
Will Will
If the network connection is not closed normally, the Server If the network connection is not closed normally, the Server
sends a last Will message for the Client, if the Client sends a last Will message for the Client, if the Client
provided one in its CONNECT message. If the Will Flag is provided one in its CONNECT message. If the Will Flag is
set, then the payload of the CONNECT message includes set, then the payload of the CONNECT message includes
information about the Will. The information consists of the information about the Will. The information consists of the
Will Properties, Will Topic, and Will Payload fields. Will Properties, Will Topic, and Will Payload fields.
2. Authorizing Connection Requests 2. Authorizing Connection Requests
This section specifies how Client connections can be authorized by an This section specifies how Client connections are authorized by the
MQTT Broker.Figure 1 shows the basic protocol flow during connection MQTT Broker.Figure 1 shows the basic protocol flow during connection
set-up.The token request and response use the /token endpoint of the set-up.The token request and response use the /token endpoint at the
authorization server, specified in the Section 5.6 of the ACE AS, specified in the Section 5.6 of the ACE framework
framework [I-D.ietf-ace-oauth-authz]. Steps (D) and (E) are [I-D.ietf-ace-oauth-authz]. Steps (D) and (E) are optional, and use
optional, and use the introspection endpoint, specified in the the introspection endpoint, specified in the Section 5.7 of the ACE
Section 5.7 of the ACE framework. The Client and Broker use HTTPS to framework. The Client and Broker use HTTPS to communicate to AS via
communicate to AS via these endpoints. The Client and Broker use these endpoints. The Client and Broker use only MQTT to communicate
only MQTT to communicate between them. between them.
If the Client is resource-constrained, the Client's Authorisation If the Client is resource-constrained, a Client Authorisation Server
Server may carry out the token request on behalf of the Client, and may carry out the token request on behalf of the Client, and later,
later, onboard the Client with the token. Also, the C-AS and Broker- onboard the Client with the token. Also, the C-AS and Broker-AS
AS interfaces may be implemented using protocols other than HTTPS, interfaces may be implemented using protocols other than HTTPS, e.g.,
e.g., CoAP or MQTT. The interactions between a Client and its Client CoAP or MQTT. The interactions between a Client and its Client
Authorization Server for token onboarding, and the MQTTS support for Authorization Server for token onboarding, and the MQTTS support for
token requests are out of scope of this document. token requests are out of scope of this document.
+---------------------+ +---------------------+
| Client | | Client |
| | | |
+---(A) Token request--| Client - | +---(A) Token request--| Client - |
| | Authorization | | | Authorization |
| +-(B) Access token-> Server Interface | | +-(B) Access token-> Server Interface |
| | | (HTTPS) | | | | (HTTPS) |
skipping to change at page 8, line 9 skipping to change at page 8, line 37
| | (HTTPS) | | | (HTTPS) |
+-(E)Introspection---->|__________________| +-(E)Introspection---->|__________________|
response (optional) response (optional)
Figure 1: Connection set-up Figure 1: Connection set-up
2.1. Client Token Request to the Authorization Server (AS) 2.1. Client Token Request to the Authorization Server (AS)
The first step in the protocol flow (Figure 1 (A)) is the token The first step in the protocol flow (Figure 1 (A)) is the token
acquisition by the Client from the AS. When requesting an access acquisition by the Client from the AS. When requesting an access
token from the AS, the Client follows the token request as is token from the AS, the Client follows the token request as described
described in Section 5.6.1 of the ACE framework in Section 5.6.1 of the ACE framework [I-D.ietf-ace-oauth-authz],
[I-D.ietf-ace-oauth-authz], howevever, it MUST set the profile howevever, it MUST set the profile parameter to 'mqtt_tls'. The
parameter to 'mqtt_tls'. The media format is 'application/ace+json'. media format is 'application/ace+json'. The AS uses JSON in the
The AS uses a JSON structure in the payload of its responses both to payload of its responses to both to the Client and the RS.
the Client and the RS.
If the AS successfully verifies the access token request and If the AS successfully verifies the access token request and
authorizes the Client for the indicated audience (i.e., RS) and authorizes the Client for the indicated audience (i.e., RS) and
scopes (i.e., publish/subscribe permissions over topics), the AS scopes (i.e., publish/subscribe permissions over topics), the AS
issues an access token (Figure 1 (B)). The response includes the issues an access token (Figure 1 (B)). The response includes the
parameters described in Section 5.6.2 of the ACE framework parameters described in Section 5.6.2 of the ACE framework
[I-D.ietf-ace-oauth-authz]. The included token is assumed to be [I-D.ietf-ace-oauth-authz]. The included token is assumed to be
Proof-of-Possession (PoP) token by default. This document follows Proof-of-Possession (PoP) token by default. This document follows
RFC 7800 [RFC7800] for PoP semantics for JWTs. The PoP token RFC 7800 [RFC7800] for PoP semantics for JWTs. The PoP token
includes a 'cnf' parameter with a symmetric or asymmetric PoP key. includes a 'cnf' parameter with a symmetric or asymmetric PoP key.
The 'cnf' parameter in the web tokens are to be consumed by the The 'cnf' parameter in the web tokens are to be consumed by the RS
resource server and not the Client. The PoP token may include a and not the Client. The PoP token may include a 'rs_cnf' parameter
'rs_cnf' parameter containing the information about the public key containing the information about the public key used by the RS to
used by the RS to authenticate as described in authenticate as described in [I-D.ietf-ace-oauth-params].
[I-D.ietf-ace-oauth-params].
In the case of an error, the AS returns error responses for HTTP- The AS returns error responses for JSON-based interactions following
based interactions as ASCII codes in JSON content, as defined in the Section 5.2 of RFC 6749 [RFC6749]. When CBOR is used, the
Section 5.2 of RFC 6749 [RFC6749]. interactions must implement the Section 5.6.3 of ACE framework
[I-D.ietf-ace-oauth-authz].
2.2. Client Connection Request to the Broker (C) 2.2. Client Connection Request to the Broker (C)
2.2.1. Client-Server Authentication over TLS and MQTT 2.2.1. Client-Server Authentication over TLS and MQTT
The Client and the Broker MUST perform mutual authentication. The The Client and the Broker MUST perform mutual authentication. The
Client MAY authenticate to the Broker over MQTT or TLS. For MQTT, Client MAY authenticate to the Broker over MQTT or TLS. For MQTT,
the options are "None" and "ace". For TLS, the options are "Anon" the options are "None" and "ace". For TLS, the options are "Anon"
for anonynous client, and "Known(RPK/PSK)" for Raw Public Keys (RPK) for anonynous client, and "Known(RPK/PSK)" for Raw Public Keys (RPK)
and Pre-Shared Keys (PSK), respectively. Combined, the Client and Pre-Shared Keys (PSK), respectively. Combined, the Client
authentication takes the following options: authentication takes the following options:
o "TLS:Anon-MQTT:None": This option is used only for the topics that o "TLS:Anon-MQTT:None": This option is used only for the topics that
do not require authorization, including the "authz-info" topic. do not require authorization, including the "authz-info" topic.
Publishing to the "authz-info" topic is described in Publishing to the "authz-info" topic is described in
Section 2.2.2. Section 2.2.2.
o "TLS:Anon-MQTT:ace": The token is transported inside the CONNECT o "TLS:Anon-MQTT:ace": The token is transported inside the CONNECT
message, and MUST be validated using one of the methods described message, and MUST be validated using one of the methods described
in Section 2.2.2. This also supports a tokenless connection in Section 2.2.2. This option also supports a tokenless
request for AS discovery. connection request for AS discovery.
o "TLS:Known(RPK/PSK)-MQTT:none": For the RPK, the token MUST have o "TLS:Known(RPK/PSK)-MQTT:none": For the RPK, the token MUST have
been published to the "authz-info" topic. For the PSK, the token been published to the "authz-info" topic. For the PSK, the token
MAY have be provided in the "psk_identity". The TLS session set- MAY be, alternatively, provided in the "psk_identity". The TLS
up is as described in DTLS profile for ACE session set-up is as described in DTLS profile for ACE
[I-D.ietf-ace-dtls-authorize]. [I-D.ietf-ace-dtls-authorize].
o "TLS:Known(RPK/PSK)-MQTT:ace": This option SHOULD NOT be chosen. o "TLS:Known(RPK/PSK)-MQTT:ace": This option SHOULD NOT be chosen.
In any case, the token transported in the CONNECT overwrites any In any case, the token transported in the CONNECT overwrites any
permissions passed during the TLS authentication. permissions passed during the TLS authentication.
It is RECOMMENDED that the Client follows TLS:Anon-MQTT:ace. It is RECOMMENDED that the Client follows TLS:Anon-MQTT:ace.
The Broker MUST be authenticated during TLS handshake. If the Client The Broker MUST be authenticated during the TLS handshake. If the
authentication included TLS:Known(RPK/PSK), then the Broker is Client authentication uses TLS:Known(RPK/PSK), then the Broker is
authenticated using the respective method. For the other Client authenticated using the respective method. Otherwise, to
Authentication cases, to authenticate the Broker, the client MAY authenticate the Broker, the client MUST validate a public key from a
either have the ability to receive and validate a server-side X.509 certificate or an RPK from the Broker against the 'rs_cnf'
certificate or an RPK from the Broker against the 'rs_cnf' parameter parameter in the token response. The AS MAY include the thumbprint
in the token. of the RS's X.509 certificate in the 'rs_cnf' (thumbrint as defined
in [I-D.ietf-cose-x509]), then the client MUST validate the RS
certificate against this thumbprint.
2.2.2. authz-info: The Authorization Information Topic 2.2.2. authz-info: The Authorization Information Topic
In the cases when the Client MUST transport the token to the Broker In the cases when the Client MUST transport the token to the Broker
before the TLS handshake, the Client connects to the Broker and before the TLS handshake, the Client connects to the Broker and
publishes its token to the "authz-info" topic. The "authz-info" publishes its token to the "authz-info" topic. The "authz-info"
topic MUST be publish-only for Clients (i.e., the Clients are not topic MUST be publish-only (i.e., the Clients are not allowed to
allowed to subscribe to it). The Broker stores and indexes all subscribe to it). "authz-info" is not protected, and hence, the
tokens received to this topic in its key store similar to DTLS Client authenticates with the RS using the "TLS:Anon-MQTT:None"
profile for ACE [I-D.ietf-ace-dtls-authorize]. option. After publishing the token, the Client disconnects from the
Broker and is expected to try reconnecting over TLS.
The Broker must verify the validity of the token (i.e., through local The Broker stores and indexes all tokens received to this topic in
validation or introspection) as described in Section 2.2.5. The its key store similar to DTLS profile for ACE
Broker returns 'Not authorized' error to a PUBLISH request if the QoS [I-D.ietf-ace-dtls-authorize]. This profile follows the
level of this PUBLISH message is greater or equal to 1. After recommendation of Section 5.8.1 of ACE framework
publishing the token, the Client disconnects from the Broker and is [I-D.ietf-ace-oauth-authz], and expects that RS stores only one token
expected to try reconnecting over TLS. per proof-of-possession key, and any other token linked to the same
key overwrites existing token at the RS.
The Broker MUST verify the validity of the token (i.e., through local
validation or introspection) as described in Section 2.2.5. To
validate the token, RS MAY need to introspect the token with the AS
e.g., if the token is a reference. If the token is not valid, the
Broker MUST discard the token. Depending on the QoS level of the
PUBLISH message, the Broker may return the error response as a PUBACK
or a DISCONNECT message.
If the QoS level is equal to 0, and token is invalid or the claims
cannot be obtained in the case of an introspected token, the Broker
MUST send a DISCONNECT message with the reason code '0x87 (Not
authorized)'. If the token does not parse to a token, the RS MUST
send a DISCONNECT with the reason code '0x99 (Payload format
invalid)'.
For the QoS level of the PUBLISH message is greater than or equal to
1, the Broker MAY return 'Not authorized' in PUBACK. If the token
does not parse to a token, the PUBACK reason code is '0x99 (Payload
format invalid)'.
It must be noted that when the AS sends the 'Not authorized'
response, this corresponds to the token being invalid, and not that
the actual PUBLISH message was not authorized. Given that the
"authz-info" is a public topic, this response is not expected to
cause a confusion.
2.2.3. Transporting Access Token Inside the MQTT CONNECT 2.2.3. Transporting Access Token Inside the MQTT CONNECT
This section describes how the Client transports the token to the This section describes how the Client transports the token to the
Broker (RS) inside the CONNECT message. If this method is used, the Broker (RS) inside the CONNECT message. If this method is used, the
Client TLS connection is expected to be anonymous, and the Broker is Client TLS connection is expected to be anonymous, and the Broker is
authenticated during the TLS connection set-up. The approach authenticated during the TLS connection set-up. The approach
described in this section is similar to an earlier proposal by described in this section is similar to an earlier proposal by
Fremantle et al. [fremantle14]. Fremantle et al. [fremantle14].
Figure 2 shows the structure of the MQTT CONNECT message used in MQTT Figure 2 shows the structure of the MQTT CONNECT message used in MQTT
v5.0. A CONNECT message is composed of a fixed header, a variable v5.0. A CONNECT message is composed of a fixed header, a variable
header and a payload. The fixed header contains Control Packet Type header and a payload. The fixed header contains the Control Packet
(CPT), Reserved, and Remaining Length. The Variable Header contains Type (CPT), Reserved, and Remaining Length fields. The Variable
the Protocol Name, Protocol Level, Connect Flags, Keep Alive, and Header contains the Protocol Name, Protocol Level, Connect Flags,
Properties. The Connect Flags in the variable header specify the Keep Alive, and Properties fields. The Connect Flags in the variable
behavior of the MQTT connection. It also indicates the presence or header specify the properties of the MQTT session. It also indicates
absence of fields in the Payload. The payload contains one or more the presence or absence of some fields in the Payload. The payload
encoded fields, namely a unique Client identifier for the Client, a contains one or more encoded fields, namely a unique Client
Will Topic, Will Payload, User Name and Password. All but the Client identifier for the Client, a Will Topic, Will Payload, User Name and
identifier can be omitted depending on flags in the Variable Header. Password. All but the Client identifier can be omitted depending on
flags in the Variable Header.
0 8 16 24 32 0 8 16 24 32
+------------------------------------------------------+ +------------------------------------------------------+
|CPT=1 | Rsvd.|Remaining len.| Protocol name len. = 4 | |CPT=1 | Rsvd.|Remaining len.| Protocol name len. = 4 |
+------------------------------------------------------+ +------------------------------------------------------+
| 'M' 'Q' 'T' 'T' | | 'M' 'Q' 'T' 'T' |
+------------------------------------------------------+ +------------------------------------------------------+
| Proto.level=5|Connect flags| Keep alive | | Proto.level=5|Connect flags| Keep alive |
+------------------------------------------------------+ +------------------------------------------------------+
| Property length | | Property length |
| Auth. Method (0x15) | 'ace' | | Auth. Method (0x15) | 'ace' |
| Auth. Data (0x16) | empty or token or | | Auth. Data (0x16) | empty or token or |
| token + PoP data | | token + PoP data |
+------------------------------------------------------+ +------------------------------------------------------+
| Payload | | Payload |
+------------------------------------------------------+ +------------------------------------------------------+
Figure 2: MQTT v5 CONNECT control message with ACE authentication. Figure 2: MQTT v5 CONNECT control message with ACE authentication.
(CPT=Control Packet Type) (CPT=Control Packet Type)
The CONNECT message flags include Username, Password, Will retain, The CONNECT message flags are Username, Password, Will retain, Will
Will QoS, Will Flag, Clean Start, and Reserved. Figure 6 shows how QoS, Will Flag, Clean Start, and Reserved. Figure 6 shows how the
the MQTT connect flags MUST be set to use AUTH packets for MQTT connect flags MUST be set to use AUTH packets for authentication
authentication and authorisation. For AUTH, the username and and authorisation. To use AUTH, the username and password flags MUST
password flags MUST be set to 0. The RS MAY support token transport be set to 0. The RS MAY support token transport using username and
using username and password (the CONNECT message for that option is password and the CONNECT message for that option is described in
described in Section 7 for MQTT v3.1.1). Section 6 for MQTT v3.1.1, which is the only option available to MQTT
v3.1.1.
+-----------------------------------------------------------+ +-----------------------------------------------------------+
|User name|Pass.|Will retain|Will QoS|Will Flag|Clean| Rsvd.| |User name|Pass.|Will retain|Will QoS|Will Flag|Clean| Rsvd.|
| flag |flag | | | | | | | Flag |Flag | | | |Start| |
+-----------------------------------------------------------+ +-----------------------------------------------------------+
| 0 | 0 | X | X X | X | X | 0 | | 0 | 0 | X | X X | X | X | 0 |
+-----------------------------------------------------------+ +-----------------------------------------------------------+
Figure 3: CONNECT flags for AUTH Figure 3: CONNECT flags for AUTH
The Will Flag indicates that a Will message needs to be sent if The Will Flag indicates that a Will message needs to be sent if
network connection is not closed normally. The situations in which network connection is not closed normally. The situations in which
the Will message is published include disconnections due to I/O or the Will message is published include disconnections due to I/O or
network failures, and the server closing the network connection due network failures, and the server closing the network connection due
to a protocol error. The Client may set the Will Flag as desired to a protocol error. The Client may set the Will Flag as desired
(marked as 'X' in Figure 3). If the Will Flag is set to 1 and the (marked as 'X' in Figure 3). If the Will Flag is set to 1 and the
Broker accepts the connection request, the Broker must store the Will Broker accepts the connection request, the Broker must store the Will
message, and publish it when the network connection is closed message, and publish it when the network connection is closed
according to Will QoS and Will retain parameters, and MQTT Will according to Will QoS and Will retain parameters, and MQTT Will
management rules. To avoid publishing Will Messages in the case of management rules. To avoid publishing Will Messages in the case of
temporary network disconnections, the Client may specify a Will Delay temporary network disconnections, the Client may specify a Will Delay
Interval in Will Properties. Section 6 explains how the Broker deals Interval in the Will Properties. Section 5 explains how the Broker
with the retained messages in further detail. deals with the retained messages in further detail.
In MQTT v5, to achieve a clean session (i.e., the session starts In MQTT v5, to achieve a clean session (i.e., the session does not
without an existing session), the Client sets the Clean Start Flag to continue an existing session), the Client sets the Clean Start Flag
1 and, the Session Expiry Interval to 0 in the CONNECT message. to 1 and, the Session Expiry Interval to 0 in the CONNECT message.
However, in this profile, the Broker MUST always start with a clean However, in this profile, the Broker MUST always start with a clean
session regardless of how these parameters are set. The Broker MUST session regardless of how these parameters are set. The Broker MUST
set the Session Present flag to 0 in the CONNACK packet as a set the Session Present flag to 0 in the CONNACK packet to signal the
response. Client that the Broker started a clean session.
2.2.4. Authentication Using AUTH Property 2.2.4. Authentication Using AUTH Property
To use AUTH, the Client MUST set the Authentication Method as a To use AUTH, the Client MUST set the Authentication Method as a
property of a CONNECT packet by using the property identifier 21 property of a CONNECT packet by using the property identifier 21
(0x15). This is followed by a UTF-8 Encoded String containing the (0x15). This is followed by a UTF-8 Encoded String containing the
name of the Authentication Method, which MUST be set to 'ace'. If name of the Authentication Method, which MUST be set to 'ace'. If
the RS does not support this profile, it sends a CONNACK with a the RS does not support this profile, it sends a CONNACK with a
Reason Code of '0x8C (Bad authentication method)'. Reason Code of '0x8C (Bad authentication method)'.
skipping to change at page 11, line 41 skipping to change at page 13, line 4
(0x15). This is followed by a UTF-8 Encoded String containing the (0x15). This is followed by a UTF-8 Encoded String containing the
name of the Authentication Method, which MUST be set to 'ace'. If name of the Authentication Method, which MUST be set to 'ace'. If
the RS does not support this profile, it sends a CONNACK with a the RS does not support this profile, it sends a CONNACK with a
Reason Code of '0x8C (Bad authentication method)'. Reason Code of '0x8C (Bad authentication method)'.
The Authentication Method is followed by the Authentication Data, The Authentication Method is followed by the Authentication Data,
which has a property identifier 22 (0x16) and is binary data. Based which has a property identifier 22 (0x16) and is binary data. Based
on the Authentication Data, this profile allows: on the Authentication Data, this profile allows:
o Proof-of-Possession using a challenge from the TLS session o Proof-of-Possession using a challenge from the TLS session
o Proof-of-Possession via Broker generated challenge/response o Proof-of-Possession via Broker generated challenge/response
o Unauthorised request: Authorisation Server discovery o Unauthorised request and Authorisation Server discovery
2.2.4.1. Proof-of-Possession Using a Challenge from the TLS session 2.2.4.1. Proof-of-Possession Using a Challenge from the TLS session
For this option, the Authentication Data MUST contain the token and For this option, the Authentication Data MUST contain the token and
the keyed message digest (MAC) or the Client signature. The the keyed message digest (MAC) or the Client signature. The secret
challenge that is used as part of the proof-of-possession, i.e., to that is used for the proof-of-possession calculation, i.e., to
calculate the keyed message digest (MAC) or the Client signature, is calculate the keyed message digest (MAC) or the Client signature, is
obtained using using a TLS exporter ([RFC5705] for TLS 1.2 and for obtained using a TLS exporter ([RFC5705] for TLS 1.2 and for TLS 1.3,
TLS 1.3, Section 7.5 of [RFC8446]). The token is also validated as Section 7.5 of [RFC8446]). The secret is exported from TLS using the
described in Section 2.2.5 and the server responds with a CONNACK exporter label 'EXPORTER-ACE-Sign-Challenge', an empty context, and
with the appropriate response code. length of 32 bytes. The token is also validated as described in
Section 2.2.5 and the server responds with a CONNACK with the
appropriate response code.
2.2.4.2. Proof-of-Possession via Broker-generated Challenge/Response 2.2.4.2. Proof-of-Possession via Broker-generated Challenge/Response
For this option, the RS follows a Broker-generated challenge/response For this option, the RS follows a Broker-generated challenge/response
protocol. The success case is illustrated in Figure 4. If the protocol. The success case is illustrated in Figure 4. If the
Authentication Data only includes the token, the RS MUST respond with Authentication Data only includes the token, the RS MUST respond with
an AUTH packet, with the Authenticate Reason Code set to '0x18 an AUTH packet, with the Authenticate Reason Code set to '0x18
(Continue Authentication)'. This packet includes the Authentication (Continue Authentication)'. This packet includes the Authentication
Method, which MUST be set to 'ace' and Authentication Data. The Method, which MUST be set to 'ace' and Authentication Data. The
Authentication Data MUST NOT be empty and contains a challenge for Authentication Data MUST NOT be empty and contains an 8-byte nonce as
the Client. The Client responds to this with an AUTH packet with a a challenge for the Client. The Client responds to this with an AUTH
reason code '0x18 (Continue Authentication)'. Similarly, the Client packet with a reason code '0x18 (Continue Authentication)'.
packet sets the Authentication Method to 'ace'. The Authentication Similarly, the Client packet sets the Authentication Method to 'ace'.
Data in the Client's response contains the signature or MAC computed The Authentication Data in the Client's response contains a client-
over the RS's challenge. Next, the token is validated as described generated 8-byte nonce, and the signature or MAC computed over the RS
in Section 2.2.5. nonce concatenated with the client nonce. Next, the token is
validated as described in Section 2.2.5.
Resource Resource
Client Server Client Server
| | | |
|<===========>| TLS connection set-up |<===========>| TLS connection set-up
| | | |
| | | |
+------------>| CONNECT with Authentication Data +------------>| CONNECT with Authentication Data
| | contains only token | | contains only token
| | | |
<-------------+ AUTH '0x18 (Continue Authentication)' <-------------+ AUTH '0x18 (Continue Authentication)'
| | challenge | | 8-byte nonce as RS challenge
| | | |
|------------>| AUTH '0x18 (Continue Authentication)' |------------>| AUTH '0x18 (Continue Authentication)'
| | signature | | 8-byte client nonce + signature/MAC
| | | |
| |-----+ Token validation (may involve introspection) | |-----+ Token validation (may involve introspection)
| | | | | |
| |<----+ | |<----+
| | | |
|<------------+ CONNACK '0x00 (Success)' |<------------+ CONNACK '0x00 (Success)'
Figure 4: PoP Challenge/Response Protocol Flow - Success Figure 4: PoP Challenge/Response Protocol Flow - Success
2.2.4.3. Unauthorised Request: Authorisation Server Discovery 2.2.4.3. Unauthorised Request: Authorisation Server Discovery
skipping to change at page 13, line 22 skipping to change at page 15, line 4
the case of a self-contained token) or the RS MAY send an the case of a self-contained token) or the RS MAY send an
introspection request to the AS. RS MUST verify the claims according introspection request to the AS. RS MUST verify the claims according
to the rules set in the Section 5.8.1.1 of the ACE framework to the rules set in the Section 5.8.1.1 of the ACE framework
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
To authenticate the Client, the RS validates the signature or the To authenticate the Client, the RS validates the signature or the
MAC, depending on how the PoP protocol is implemented. Validation of MAC, depending on how the PoP protocol is implemented. Validation of
the signature or MAC MUST fail if the signature algorithm is set to the signature or MAC MUST fail if the signature algorithm is set to
"none", when the key used for the signature algorithm cannot be "none", when the key used for the signature algorithm cannot be
determined, or the computed and received signature/MAC do not match. determined, or the computed and received signature/MAC do not match.
To authorize the Client, the Broker uses the scope field in the token
(or in the introspection result). The scope field contains the
publish and subscribe permissions for the Client.
Scope strings SHOULD be encoded as a permission, followed by an
underscore, followed by a topic filter. Two permissions apply to
topics: 'publish' and 'subscribe'. An example scope field may
contain multiple such strings, space delimited, e.g., 'publish_topic1
subscribe_topic2/#'. Hence, this access token would give 'publish'
permission to the 'topic1', 'subscribe' permission to all the
subtopics of 'topic2'. If the Will Flag is set,then the Broker MUST
check that the token allows the publication of the Will message
(i.e., the scope is "publish_" followed by the Will Topic).
2.2.6. The Broker's Response to Client Connection Request 2.2.6. The Broker's Response to Client Connection Request
Based on the validation result (obtained either via local inspection Based on the validation result (obtained either via local inspection
or using the /introspection interface of the AS), the Broker MUST or using the /introspection interface of the AS), the Broker MUST
send a CONNACK message to the Client. The reason code of the CONNACK send a CONNACK message to the Client. The reason code of the CONNACK
is '0x00 (Success)' if the authentication is successful. The Broker is '0x00 (Success)' if the token validation is successful. The
MUST also set Session Present to 0 in the CONNACK packet to signal a Broker MUST also set Session Present to 0 in the CONNACK packet to
clean session to the Client. In case of an invalid PoP token, the signal a clean session to the Client. In case of an invalid PoP
CONNACK reason code is '0x87 (Not Authorized)'. token, the CONNACK reason code is '0x87 (Not Authorized)'.
If the Broker accepts the connection, it MUST store the token until If the Broker accepts the connection, it MUST store the token until
the end of connection. On Client or Broker disconnection, the Client the end of the connection. On Client or Broker disconnection, the
is expected to provide a token again inside the next CONNECT message. Client is expected to provide a token again inside the next CONNECT
message.
If the token is not self-contained and the Broker uses token If the token is not self-contained and the Broker uses token
introspection, it MAY cache the validation result to authorize the introspection, it MAY cache the validation result to authorize the
subsequent PUBLISH and SUBSCRIBE messages. PUBLISH and SUBSCRIBE subsequent PUBLISH and SUBSCRIBE messages. PUBLISH and SUBSCRIBE
messages, which are sent after a connection set-up, do not contain messages, which are sent after a connection set-up, do not contain
access tokens. If the introspection result is not cached, then the access tokens. If the introspection result is not cached, then the
RS needs to introspect the saved token for each request. The Broker RS needs to introspect the saved token for each request. The Broker
SHOULD use a cache time out to introspect tokens regularly. SHOULD also use a cache time out to introspect tokens regularly.
3. Authorizing PUBLISH Messages 3. Authorizing PUBLISH and SUBSCRIBE Messages
To authorize a Client's PUBLISH and SUBSCRIBE messages, the Broker
needs to use the scope field in the token (or in the introspection
result). The scope field contains the publish and subscribe
permissions for the Client. Scope strings SHOULD be encoded as a
permission, followed by an underscore, followed by a topic filter.
Two permissions apply to topic filters: 'publish' and 'subscribe'.
Topic filters are implemented as described in MQTT specification and
includes special wildcard characters. The multi-level wildcard, '#',
matches any number of levels within a topic, and the single-level
wildcard, '+', matches one topic level.
An example scope field may contain multiple such strings, space
delimited, e.g., 'publish_topic1 subscribe_topic2/#'
publish_+/topic3. This access token gives 'publish' permission to
the 'topic1', 'subscribe' permission to all the subtopics of
'topic2', and 'publish' permission to all topic3, skipping one level.
If the Will Flag is set,then the Broker MUST check that the token
allows the publication of the Will message (i.e., the scope is
"publish_" followed by the Will Topic).
3.1. PUBLISH Messages from the Publisher Client to the Broker 3.1. PUBLISH Messages from the Publisher Client to the Broker
On receiving the PUBLISH message, the Broker MUST use the type of On receiving the PUBLISH message, the Broker MUST use the type of
message (i.e., PUBLISH) and the Topic name in the message header to message (i.e., PUBLISH) and the Topic name in the message header to
compare against the cached token or its introspection result. match against the scope string in the cached token or its
introspection result. Following the example above, a client sending
a PUBLISH message to 'a/topic3' would be allowed to publish, as the
scope includes the string 'publish_+/topic3'.
If the Client is allowed to publish to the topic, the RS must publish If the Client is allowed to publish to the topic, the RS must publish
the message to all valid subscribers of the topic. The Broker may the message to all valid subscribers of the topic. In the case of an
also return an acknowledgment message if the QoS level is greater authorization failure, an error MAY be returned to the Client. For
than or equal to 1. this the QoS level of the PUBLISH message MUST be set to greater than
or equal to 1. This guarantees that RS responds with either a PUBACK
In case of an authorization failure, an error MAY be returned to the or PUBREC packet with reason code '0x87 (Not authorized)'.
Client. For this the QoS level of the PUBLISH message, should be set
to greater than or equal to 1. This guarantees that RS responds with
either a PUBACK or PUBREC packet with reason code '0x87 (Not
authorized)'.
On receiving a PUBACK with '0x87 (Not authorized)', the Client MAY On receiving a PUBACK with '0x87 (Not authorized)', the Client MAY
reauthenticate as described in Section 5, and pass a new token reauthenticate as described in Section 4, and pass a new token
following the same PoP methods as described in Figure 2. following the same PoP methods as described in Figure 2.
3.2. PUBLISH Messages from the Broker to the Subscriber Clients 3.2. PUBLISH Messages from the Broker to the Subscriber Clients
To forward PUBLISH messages to the subscribing Clients, the Broker To forward PUBLISH messages to the subscribing Clients, the Broker
identifies all the subscribers that have valid matching topic identifies all the subscribers that have valid matching topic
subscriptions (i.e., the tokens are valid, and token scopes allow a subscriptions (i.e., the tokens are valid, and token scopes allow a
subscription to the particular topic). The Broker sends a PUBLISH subscription to the particular topic). The Broker sends a PUBLISH
message with the Topic name to all the valid subscribers. message with the Topic name to all the valid subscribers.
RS MUST stop forwarding messages to the unauthorized subscribers. RS MUST stop forwarding messages to the unauthorized subscribers.
There is no way to inform the Clients with invalid tokens that an There is no way to inform the Clients with invalid tokens that an
authorization error has occurred other than sending a DISCONNECT authorization error has occurred other than sending a DISCONNECT
message. The RS SHOULD send a DISCONNECT message with the reason message. The RS SHOULD send a DISCONNECT message with the reason
code '0x87 (Not authorized)'. Note that the server-side DISCONNECT code '0x87 (Not authorized)'. Note that the server-side DISCONNECT
is a new feature of MQTT v5.0 (in MQTT v3.1.1, the server needs to is a new feature of MQTT v5.0 (in MQTT v3.1.1, the server needs to
drop the connection). drop the connection).
4. Authorizing SUBSCRIBE Messages 3.3. Authorizing SUBSCRIBE Messages
In MQTT, a SUBSCRIBE message is sent from a Client to the Broker to In MQTT, a SUBSCRIBE message is sent from a Client to the Broker to
create one or more subscriptions to one or more topics. The create one or more subscriptions to one or more topics. The
SUBSCRIBE message may contain multiple Topic Filters. The Topic SUBSCRIBE message may contain multiple Topic Filters. The Topic
Filters may include wildcard characters. Filters may include wildcard characters.
On receiving the SUBSCRIBE message, the Broker MUST use the type of On receiving the SUBSCRIBE message, the Broker MUST use the type of
message (i.e., SUBSCRIBE) and the Topic Filter in the message header message (i.e., SUBSCRIBE) and the Topic Filter in the message header
to compare against the stored token or introspection result. to match against a scope string of the stored token or introspection
result.
As a response to the SUBSCRIBE message, the Broker issues a SUBACK As a response to the SUBSCRIBE message, the Broker issues a SUBACK
message. For each Topic Filter, the SUBACK packet includes a return message. For each Topic Filter, the SUBACK packet includes a return
code matching the QoS level for the corresponding Topic Filter. In code matching the QoS level for the corresponding Topic Filter. In
the case of failure, the return code is 0x87, indicating that the the case of failure, the return code is 0x87, indicating that the
Client is 'Not authorized'. A reason code is returned for each Topic Client is 'Not authorized'. A reason code is returned for each Topic
Filter. Therefore, the Client may receive success codes for a subset Filter. Therefore, the Client may receive success codes for a subset
of its Topic Filters while being unauthorized for the rest. of its Topic Filters while being unauthorized for the rest.
5. Token Expiration and Reauthentication 4. Token Expiration and Reauthentication
The Broker MUST check for token expiration whenever a CONNECT, The Broker MUST check for token expiration whenever a CONNECT,
PUBLISH or SUBSCRIBE message is received or sent. The Broker SHOULD PUBLISH or SUBSCRIBE message is received or sent. The Broker SHOULD
check for token expiration on receiving a PINGREQUEST message. The check for token expiration on receiving a PINGREQUEST message. The
Broker MAY also check for token expiration periodically e.g., every Broker MAY also check for token expiration periodically e.g., every
hour. This may allow for early detection of a token expiry. hour. This may allow for early detection of a token expiry.
The token expiration is checked by checking the 'exp' claim of a JWT The token expiration is checked by checking the 'exp' claim of a JWT
or introspection response, or via performing an introspection request or introspection response, or via performing an introspection request
with the AS as described in Section 5.7 of the ACE framework with the AS as described in Section 5.7 of the ACE framework
[I-D.ietf-ace-oauth-authz]. Token expirations may trigger the RS to [I-D.ietf-ace-oauth-authz]. Token expirations may trigger the RS to
send PUBACK, SUBACK and DISCONNECT messages with return code set to send PUBACK, SUBACK and DISCONNECT messages with return code set to
'Not authorised'. After sending a DISCONNECT message, the network 'Not authorised'. After sending a DISCONNECT message, the network
connection is closed, and no more messages can be sent. However, as connection is closed, and no more messages can be sent. However, as
a response to the PUBACK and SUBACK, the Client MAY re-authenticate a response to the PUBACK and SUBACK, the Client MAY re-authenticate
by sending an AUTH packet with a Reason Code of 0x19 (Re- by sending an AUTH packet with a Reason Code of '0x19 (Re-
authentication). authentication)'.
To re-authenticate, the Client sends an AUTH packet with reason code To re-authenticate, the Client sends an AUTH packet with reason code
'0x19 (Re-authentication)'. The Client MUST set the Authentication '0x19 (Re-authentication)'. The Client MUST set the Authentication
Method as 'ace' and transport the new token in the Authentication Method as 'ace' and transport the new token in the Authentication
Data. The Client and the RS go through the same steps for proof of Data. The Client and the RS go through the same steps for proof of
possession validation as described in Section 2.2. If the re- possession validation as described in Section 2.2. The Client SHOULD
authentication fails, the server MUST send a DISCONNECT with the use the same method used for the first connection request. If the
re-authentication fails, the server MUST send a DISCONNECT with the
reason code '0x87 (Not Authorized)'. The Clients can also reason code '0x87 (Not Authorized)'. The Clients can also
proactively update their tokens i.e., before they receive a message proactively update their tokens i.e., before they receive a message
with 'Not authorized' return code. with 'Not authorized' return code.
6. Handling Disconnections and Retained Messages 5. Handling Disconnections and Retained Messages
In the case of a Client DISCONNECT, the Broker deletes all session In the case of a Client DISCONNECT, the Broker deletes all the
state but MUST keep the retained messages. By setting a RETAIN flag session state but MUST keep the retained messages. By setting a
in a PUBLISH message, the publisher indicates to the Broker that it RETAIN flag in a PUBLISH message, the publisher indicates to the
should store the most recent message for the associated topic. Broker that it should store the most recent message for the
Hence, the new subscribers can receive the last sent message from the associated topic. Hence, the new subscribers can receive the last
publisher of that particular topic without waiting for the next sent message from the publisher of that particular topic without
PUBLISH message. The Broker MUST continue publishing the retained waiting for the next PUBLISH message. The Broker MUST continue
messages as long as the associated tokens are valid. publishing the retained messages as long as the associated tokens are
valid.
In case of disconnections due to network errors or server In case of disconnections due to network errors or server
disconnection due to a protocol error (which includes authorization disconnection due to a protocol error (which includes authorization
errors), the Will message must be sent if the Client supplied a Will errors), the Will message must be sent if the Client supplied a Will
in the CONNECT message. The Client's token scopes MUST include the in the CONNECT message. The Client's token scopes MUST include the
Will Topic. The Will message MUST be published to the Will Topic Will Topic. The Will message MUST be published to the Will Topic
regardless of whether the corresponding token has expired. In the regardless of whether the corresponding token has expired. In the
case of a server-side DISCONNECT, the server returns the '0x87 Not case of a server-side DISCONNECT, the server returns the '0x87 Not
Authorized' return code to the Client. Authorized' return code to the Client.
7. Reduced Protocol Interactions for MQTT v3.1.1 6. Reduced Protocol Interactions for MQTT v3.1.1
This section describes a reduced set of protocol interactions for the This section describes a reduced set of protocol interactions for the
MQTT v3.1.1 Client. MQTT v3.1.1 Client.
7.1. Token Transport 6.1. Token Transport
As in MQTT v5, The Token MAY either be transported before the TLS As in MQTT v5, The Token MAY either be transported before the TLS
session publishing to the "authz-info" topic, or inside the CONNECT session publishing to the "authz-info" topic, or inside the CONNECT
message. message.
In MQTT v3.1.1, after the Client published to the "authz-info" topic, In MQTT v3.1.1, after the Client published to the "authz-info" topic,
it is not possible for the Broker to communicate the result of the it is not possible for the Broker to communicate the result of the
token verification. In any case, any token authorization failure token validation as PUBACK reason codes or server-side DISCONNECT
affect the subsequent TLS handshake, which can prompt the Client to messages are not supported. In any case, an invalid token would fail
obtain a valid token. the subsequent TLS handshake, which can prompt the Client to obtain a
valid token.
To transport the token to the Broker inside the CONNECT message, the To transport the token to the Broker inside the CONNECT message, the
Client uses the username and password fields of the CONNECT message. Client uses the username and password fields of the CONNECT message.
Figure 5 shows the structure of the MQTT CONNECT message. Figure 5 shows the structure of the MQTT CONNECT message.
0 8 16 24 32 0 8 16 24 32
+------------------------------------------------------+ +------------------------------------------------------+
|CPT=1 | Rsvd.|Remaining len.| Protocol name len. = 4 | |CPT=1 | Rsvd.|Remaining len.| Protocol name len. = 4 |
+------------------------------------------------------+ +------------------------------------------------------+
| 'M' 'Q' 'T' 'T' | | 'M' 'Q' 'T' 'T' |
skipping to change at page 17, line 44 skipping to change at page 19, line 44
The Clean Session Flag is ignored, and the Broker always sets up a The Clean Session Flag is ignored, and the Broker always sets up a
clean session. On connection success, the Broker MUST set the clean session. On connection success, the Broker MUST set the
Session Present flag to 0 in the CONNACK packet. Session Present flag to 0 in the CONNACK packet.
The Client may set the Will Flag as desired (marked as 'X' in The Client may set the Will Flag as desired (marked as 'X' in
Figure 6). Username and Password flags MUST be set to 1 to ensure Figure 6). Username and Password flags MUST be set to 1 to ensure
that the Payload of the CONNECT message includes both Username and that the Payload of the CONNECT message includes both Username and
Password fields. Password fields.
The CONNECT message defaults to 'ace' for authentication and The CONNECT in MQTT v3.1.1 does not have a field to indicate the
authorization as the header does not have a field to indicate the authentication method. To signal that the Username field contains an
authentication method. The Username field MUST be set to the access ACE token, this field MUST be prefixed with 'ace' keyword, which is
token. The Password field MUST be set to the keyed message digest followed by the access token. The Password field MUST be set to the
(MAC) or signature associated with the access token for proof-of- keyed message digest (MAC) or signature associated with the access
possession. The Client MUST apply the PoP key on the challenge token for proof-of-possession. The Client MUST apply the PoP key on
derived from the TLS session as described in Section 2.2.4.1. the challenge derived from the TLS session as described in
Section 2.2.4.1.
In MQTT v3.1.1, the MQTT Username as a UTF-8 encoded string (i.e., is In MQTT v3.1.1, the MQTT Username as a UTF-8 encoded string (i.e., is
prefixed by a 2-byte length field followed by UTF-8 encoded character prefixed by a 2-byte length field followed by UTF-8 encoded character
data) and may be up to 65535 bytes. Therefore, an access token that data) and may be up to 65535 bytes. Therefore, an access token that
is not a valid UTF-8 MUST be Base64 [RFC4648] encoded. (The MQTT is not a valid UTF-8 MUST be Base64 [RFC4648] encoded. (The MQTT
Password allows binary data up to 65535 bytes.) Password allows binary data up to 65535 bytes.)
7.2. Handling Authorization Errors 6.2. Handling Authorization Errors
Handling errors are more primitive in MQTT v3.1.1 due to not having Handling errors are more primitive in MQTT v3.1.1 due to not having
appropriate error fields, error codes, and server-side DISCONNECTS. appropriate error fields, error codes, and server-side DISCONNECTS.
In the following, we list how errors are handled without such In the following, we list how errors are handled without such
protocol support. protocol support.
o CONNECT without a token: It is not possible to support AS o CONNECT without a token: It is not possible to support AS
discovery via sending a tokenless CONNECT message to the Broker. discovery via sending a tokenless CONNECT message to the Broker.
This is because a CONNACK packet in MQTT v3.1.1 does not include a This is because a CONNACK packet in MQTT v3.1.1 does not include a
means to provide additional information to the Client. Therefore, means to provide additional information to the Client. Therefore,
AS discovery needs to take place out-of-band. CONNECT attempt AS discovery needs to take place out-of-band. CONNECT attempt
MUST fail. MUST fail.
o Client-RS PUBLISH authorization failure: In case of a failure, it o Client-RS PUBLISH authorization failure: In the case of a failure,
is not possible to return an error in MQTT v3.1.1. it is not possible to return an error in MQTT v3.1.1.
Acknowledgement messages only indicate success. In the case of an Acknowledgement messages only indicate success. In the case of an
authorization error, the Broker SHOULD disconnect the Client. authorization error, the Broker SHOULD disconnect the Client.
Otherwise, it MUST ignore the PUBLISH message. Also, DISCONNECT Otherwise, it MUST ignore the PUBLISH message. Also, as
messages are only sent from a Client to the Broker. So, server DISCONNECT messages are only sent from a Client to the Broker, the
disconnection needs to take place below the application layer. server disconnection needs to take place below the application
layer.
o SUBSCRIBE authorization failure: In the SUBACK packet, the return o SUBSCRIBE authorization failure: In the SUBACK packet, the return
code must be 0x80 indicating 'Failure' for the unauthorized code must be 0x80 indicating 'Failure' for the unauthorized
topic(s). Note that, in both MQTT versions, a reason code is topic(s). Note that, in both MQTT versions, a reason code is
returned for each Topic Filter. returned for each Topic Filter.
o RS-Client PUBLISH authorization failure: When RS is forwarding o RS-Client PUBLISH authorization failure: When RS is forwarding
PUBLISH messages to the subscribed Clients, it may discover that PUBLISH messages to the subscribed Clients, it may discover that
some of the subscribers are no more authorized due to expired some of the subscribers are no more authorized due to expired
tokens. These token expirations SHOULD lead to disconnecting the tokens. These token expirations SHOULD lead to disconnecting the
Client rather than silently dropping messages. Client rather than silently dropping messages.
8. IANA Considerations 7. IANA Considerations
The following registrations are done for the ACE OAuth Profile This document registers 'EXPORTER-ACE-Sign-Challenge from
Registry following the procedure specified in Section 2.2.4.1 in the TLS Exporter Label Registry TLS-REGISTRIES
[RFC8447].
In addition, the following registrations are done for the ACE OAuth
Profile Registry following the procedure specified in
[I-D.ietf-ace-oauth-authz]. [I-D.ietf-ace-oauth-authz].
Note to the RFC editor: Please replace all occurrences of "[RFC- Note to the RFC editor: Please replace all occurrences of "[RFC-
XXXX]" with the RFC number of this specification and delete this XXXX]" with the RFC number of this specification and delete this
paragraph. paragraph.
Profile name: mqtt_tls Name: mqtt_tls
Profile description: Profile for delegating Client authentication and Description: Profile for delegating Client authentication and
authorization using MQTT as the application protocol and TLS For authorization using MQTT as the application protocol and TLS For
transport layer security. transport layer security.
Profile ID: CBOR Value:
Change controller: IESG
Reference: [RFC-XXXX] Reference: [RFC-XXXX]
9. Security Considerations 8. Security Considerations
This document specifies a profile for the Authentication and This document specifies a profile for the Authentication and
Authorization for Constrained Environments (ACE) framework Authorization for Constrained Environments (ACE) framework
[I-D.ietf-ace-oauth-authz]. Therefore, the security considerations [I-D.ietf-ace-oauth-authz]. Therefore, the security considerations
outlined in [I-D.ietf-ace-oauth-authz] apply to this work. outlined in [I-D.ietf-ace-oauth-authz] apply to this work.
In addition, the security considerations outlined in MQTT v5.0 - the In addition, the security considerations outlined in MQTT v5.0 - the
OASIS Standard [MQTT-OASIS-Standard-v5] and MQTT v3.1.1 - the OASIS OASIS Standard [MQTT-OASIS-Standard-v5] and MQTT v3.1.1 - the OASIS
Standard [MQTT-OASIS-Standard] apply. Mainly, this document provides Standard [MQTT-OASIS-Standard] apply. Mainly, this document provides
an authorization solution for MQTT, the responsibility of which is an authorization solution for MQTT, the responsibility of which is
left to the specific implementation in MQTT v5.0 standard. In the left to the specific implementation in the MQTT standards. In the
following, we comment on a few relevant issues based on the current following, we comment on a few relevant issues based on the current
MQTT specifications. MQTT specifications.
To authorize a Client's publish and subscribe requests in an ongoing To authorize a Client's publish and subscribe requests in an ongoing
session, the RS caches the access token after accepting the session, the RS caches the access token after accepting the
connection from the Client. However, if some permissions are revoked connection from the Client. However, if some permissions are revoked
in the meantime, the RS may still grant publish/subscribe to revoked in the meantime, the RS may still grant publish/subscribe to revoked
topics. If the RS caches the token introspection responses, then the topics. If the RS caches the token introspection responses, then the
RS should use a reasonable cache timeout to introspect tokens RS should use a reasonable cache timeout to introspect tokens
regularly. When permissions change dynamically, it is expected that regularly. When permissions change dynamically, it is expected that
skipping to change at page 20, line 5 skipping to change at page 22, line 9
The RS may monitor Client behaviour to detect potential security The RS may monitor Client behaviour to detect potential security
problems, especially those affecting availability. These include problems, especially those affecting availability. These include
repeated token transfer attempts to the public "authz-info" topic, repeated token transfer attempts to the public "authz-info" topic,
repeated connection attempts, abnormal terminations, and Clients that repeated connection attempts, abnormal terminations, and Clients that
connect but do not send any data. If the RS supports the public connect but do not send any data. If the RS supports the public
"authz-info" topic, described in Section 2.2.2, then this may be "authz-info" topic, described in Section 2.2.2, then this may be
vulnerable to a DDoS attack, where many Clients use the "authz-info" vulnerable to a DDoS attack, where many Clients use the "authz-info"
public topic to transport fictitious tokens, which RS may need to public topic to transport fictitious tokens, which RS may need to
store indefinitely. store indefinitely.
10. Privacy Considerations 9. Privacy Considerations
The privacy considerations outlined in [I-D.ietf-ace-oauth-authz] The privacy considerations outlined in [I-D.ietf-ace-oauth-authz]
apply to this work. apply to this work.
In MQTT, the RS is a central trusted party and may forward In MQTT, the RS is a central trusted party and may forward
potentially sensitive information between Clients. Clients may potentially sensitive information between Clients. This document
choose to encrypt the payload of their messages. However, this would does not protect the contents of the PUBLISH message from the Broker,
not provide privacy for other properties of the message such as Topic and hence, the content of the the PUBLISH message is not signed or
Name. encrypted separately for the subscribers. This functionality may be
implemented using the proposal outlined in the CoAP Pub-Sub Profile
[I-D.palombini-ace-coap-pubsub-profile]. However, this solution
would still not provide privacy for other properties of the message
such as Topic Name.
11. References 10. References
11.1. Normative References 10.1. Normative References
[I-D.ietf-ace-dtls-authorize] [I-D.ietf-ace-dtls-authorize]
Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and
L. Seitz, "Datagram Transport Layer Security (DTLS) L. Seitz, "Datagram Transport Layer Security (DTLS)
Profile for Authentication and Authorization for Profile for Authentication and Authorization for
Constrained Environments (ACE)", draft-ietf-ace-dtls- Constrained Environments (ACE)", draft-ietf-ace-dtls-
authorize-08 (work in progress), April 2019. authorize-09 (work in progress), December 2019.
[I-D.ietf-ace-oauth-authz] [I-D.ietf-ace-oauth-authz]
Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and
H. Tschofenig, "Authentication and Authorization for H. Tschofenig, "Authentication and Authorization for
Constrained Environments (ACE) using the OAuth 2.0 Constrained Environments (ACE) using the OAuth 2.0
Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-25 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-29
(work in progress), October 2019. (work in progress), December 2019.
[I-D.ietf-ace-oauth-params] [I-D.ietf-ace-oauth-params]
Seitz, L., "Additional OAuth Parameters for Authorization Seitz, L., "Additional OAuth Parameters for Authorization
in Constrained Environments (ACE)", draft-ietf-ace-oauth- in Constrained Environments (ACE)", draft-ietf-ace-oauth-
params-05 (work in progress), March 2019. params-07 (work in progress), December 2019.
[I-D.ietf-cose-x509]
Schaad, J., "CBOR Object Signing and Encryption (COSE):
Headers for carrying and referencing X.509 certificates",
draft-ietf-cose-x509-05 (work in progress), November 2019.
[I-D.palombini-ace-coap-pubsub-profile]
Palombini, F., "CoAP Pub-Sub Profile for Authentication
and Authorization for Constrained Environments (ACE)",
draft-palombini-ace-coap-pubsub-profile-06 (work in
progress), November 2019.
[MQTT-OASIS-Standard] [MQTT-OASIS-Standard]
Banks, A., Ed. and R. Gupta, Ed., "OASIS Standard MQTT Banks, A., Ed. and R. Gupta, Ed., "OASIS Standard MQTT
Version 3.1.1 Plus Errata 01", 2015, <http://docs.oasis- Version 3.1.1 Plus Errata 01", 2015, <http://docs.oasis-
open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html>. open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html>.
[MQTT-OASIS-Standard-v5] [MQTT-OASIS-Standard-v5]
Banks, A., Ed., Briggs, E., Ed., Borgendale, K., Ed., and Banks, A., Ed., Briggs, E., Ed., Borgendale, K., Ed., and
R. Gupta, Ed., "OASIS Standard MQTT Version 5.0", 2017, R. Gupta, Ed., "OASIS Standard MQTT Version 5.0", 2017,
<http://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt- <http://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-
skipping to change at page 21, line 32 skipping to change at page 23, line 49
June 2014, <https://www.rfc-editor.org/info/rfc7250>. June 2014, <https://www.rfc-editor.org/info/rfc7250>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
11.2. Informative References [RFC8447] Salowey, J. and S. Turner, "IANA Registry Updates for TLS
and DTLS", RFC 8447, DOI 10.17487/RFC8447, August 2018,
<https://www.rfc-editor.org/info/rfc8447>.
10.2. Informative References
[fremantle14] [fremantle14]
Fremantle, P., Aziz, B., Kopecky, J., and P. Scott, Fremantle, P., Aziz, B., Kopecky, J., and P. Scott,
"Federated Identity and Access Management for the Internet "Federated Identity and Access Management for the Internet
of Things", research International Workshop on Secure of Things", research International Workshop on Secure
Internet of Things, September 2014, Internet of Things, September 2014,
<http://dx.doi.org/10.1109/SIoT.2014.8>. <http://dx.doi.org/10.1109/SIoT.2014.8>.
[I-D.ietf-ace-cwt-proof-of-possession] [I-D.ietf-ace-cwt-proof-of-possession]
Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
skipping to change at page 22, line 33 skipping to change at page 25, line 4
o Client and RS mutual authentication: Several options are possible o Client and RS mutual authentication: Several options are possible
and descibed in Section 2.2.1. and descibed in Section 2.2.1.
o Content format: For the HTTPS interactions with AS, "application/ o Content format: For the HTTPS interactions with AS, "application/
ace+json". ace+json".
o PoP protocols: Either symmetric or asymmetric keys can be o PoP protocols: Either symmetric or asymmetric keys can be
supported. supported.
o Unique profile identifier: mqtt_tls o Unique profile identifier: mqtt_tls
o Token introspection: RS uses HTTPS /introspect interface of AS. o Token introspection: RS uses HTTPS /introspect interface of AS.
o Token request: Client or its Client AS uses HTTPS /token interface o Token request: Client or its Client AS uses HTTPS /token interface
of AS. of AS.
o /authz-info endpoint: It MAY be supported using the method o /authz-info endpoint: It MAY be supported using the method
described in Section 2.2.2, but is not protected. described in Section 2.2.2, but is not protected.
o Token transport: Via "authz-info topic", or in MQTT CONNECT o Token transport: Via "authz-info" topic, or in MQTT CONNECT
message for both versions of MQTT. AUTH extensions also used for message for both versions of MQTT. AUTH extensions also used for
authentication and re-authentication for MQTT v5.0 as described in authentication and re-authentication for MQTT v5.0 as described in
Section 2.2. Section 2.2 and in Section 4.
Appendix B. Document Updates Appendix B. Document Updates
Version 02 to 03:
o Added the option of Broker certificate thumbprint in the 'rs_cnf'
sent to the Client.
o Clarified the use of a random nonce from the TLS Exporter for PoP,
added to the IANA requirements that the label should be
registered.
o Added a client nonce, when Challenge/Response Authentication is
used between Client and Broker.
o Clarified the use of the "authz-info" topic and the error response
if token validation fails.
o Added clarification on wildcard use in scopes for publish/
subscribe permissions
o Reorganised sections so that token authorisation for publish/
subscribe messages are better placed.
Version 01 to 02: Version 01 to 02:
o Clarified protection of Application Message payload as out of
scope, and cited draft-palombini-ace-coap-pubsub-profile for a
potential solution
o Expanded Client connection authorization to capture different o Expanded Client connection authorization to capture different
options for Client and Broker authentication over TLS and MQTT options for Client and Broker authentication over TLS and MQTT
o Removed Payload (and specifically Client Identifier) from proof- o Removed Payload (and specifically Client Identifier) from proof-
of-possesion in favor of using tls-exporter for a TLS-session of-possesion in favor of using tls-exporter for a TLS-session
based challenge. based challenge.
o Moved token transport via "authz-info" topic from the Appendix to o Moved token transport via "authz-info" topic from the Appendix to
the main text. the main text.
skipping to change at page 24, line 4 skipping to change at page 26, line 44
o Added new figures to explain AUTH packets exchang, updated CONNECT o Added new figures to explain AUTH packets exchang, updated CONNECT
message figure. message figure.
Acknowledgements Acknowledgements
The authors would like to thank Ludwig Seitz for his review and his The authors would like to thank Ludwig Seitz for his review and his
input on the authorization information endpoint, presented in the input on the authorization information endpoint, presented in the
appendix. appendix.
Authors' Addresses Authors' Addresses
Cigdem Sengul Cigdem Sengul
Nominet Nominet
4 Kingdom Street 4 Kingdom Street
London W2 6BD London W2 6BD
UK UK
Email: Cigdem.Sengul@nominet.uk Email: csengul@acm.org
Anthony Kirby Anthony Kirby
Oxbotica Oxbotica
1a Milford House, Mayfield Road, Summertown 1a Milford House, Mayfield Road, Summertown
Oxford OX2 7EL Oxford OX2 7EL
UK UK
Email: anthony@anthony.org Email: anthony@anthony.org
Paul Fremantle Paul Fremantle
University of Portsmouth University of Portsmouth
 End of changes. 94 change blocks. 
267 lines changed or deleted 362 lines changed or added

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