RFC2PSM / RFCChunks /MQTT_segments.json
zilinlin's picture
Upload folder using huggingface_hub
c3edc81 verified
[
{
"section_number": "1.",
"section_name": "Introduction",
"tag": "Section 1. Introduction",
"content": "This document specifies a profile for the ACE framework [RFC9200].\n In this profile, Clients and Servers (Brokers) use MQTT to exchange\n Application Messages. The protocol relies on TLS for communication\n security between entities. The MQTT protocol interactions are\n described based on the MQTT v5.0 OASIS Standard\n [MQTT-OASIS-Standard-v5]. Since it is expected that MQTT deployments\n will continue to support MQTT v3.1.1 Clients, this document also\n describes a reduced set of protocol interactions for the MQTT v3.1.1\n OASIS Standard [MQTT-OASIS-Standard-v3.1.1]. However, MQTT v5.0 is\n the RECOMMENDED version, as it works more naturally with ACE-style\n authentication and authorization.\n MQTT is a publish-subscribe protocol, and after connecting to the\n MQTT Server (Broker), a Client can publish and subscribe to multiple\n topics. The Broker, which acts as the Resource Server (RS), is\n responsible for distributing messages published by the publishers to\n their subscribers. In the rest of the document, the terms \"RS\",\n \"MQTT Server\", and \"Broker\" are used interchangeably.\n Messages are published under a Topic Name, and subscribers subscribe\n to the Topic Names to receive the corresponding messages. The Broker\n uses the Topic Name in a published message to determine which\n subscribers to relay the messages to. In this document, topics (more\n specifically, Topic Names) are treated as resources. The Clients are\n assumed to have identified the publish/subscribe topics of interest\n out of band (topic discovery is not a feature of the MQTT protocol).\n A Resource Owner can preconfigure policies at the Authorization\n Server (AS) that give Clients publish or subscribe permissions to\n different topics.\n Clients prove their permission to publish and subscribe to topics\n hosted on an MQTT Broker using an access token that is bound to a\n Proof-of-Possession (PoP) key. This document describes how to\n authorize the following exchanges between the Clients and the Broker.\n * connection requests from the Clients to the Broker\n * publish requests from the Clients to the Broker and from the\n Broker to the Clients\n * subscribe requests from the Clients to the Broker\n Clients use the MQTT PUBLISH packet to publish to a topic. The\n mechanisms specified in this document do not protect the Payload of\n the PUBLISH packet from the Broker. Hence, the Payload is not signed\n or encrypted specifically for the subscribers. This functionality\n may be implemented using the proposal outlined in the ACE Pub-Sub\n Profile [ACE-PUBSUB-PROFILE].\n To provide communication confidentiality and Broker authentication to\n the MQTT Clients, TLS is used, and TLS 1.3 [RFC8446] is RECOMMENDED.\n This document makes the same assumptions as Section 4 of the ACE\n framework [RFC9200] regarding Client and RS registration with the AS\n for setting up the keying material. While the Client-Broker\n exchanges are only over MQTT, the required Client-AS and RS-AS\n interactions are described for HTTPS-based communication [RFC9110],\n using the \"application/ace+json\" content type and, unless otherwise\n specified, JSON encoding. The token MAY be an opaque reference to\n authorization information or a JSON Web Token (JWT) [RFC7519]. For\n JWTs, this document follows [RFC7800] for PoP semantics for JWTs, and\n the mechanisms for providing and verifying PoP are detailed in\n Section 2.2. The Client-AS and RS-AS exchanges MAY also use\n protocols other than HTTP, e.g., Constrained Application Protocol\n (CoAP) [RFC7252] or MQTT. It is recommended that TLS is used to\n secure these communication channels between Client-AS and RS-AS. To\n reduce the protocol memory and bandwidth requirements,\n implementations MAY also use the \"application/ace+cbor\" content type,\n Concise Binary Object Representation (CBOR) encoding [RFC8949], CBOR\n Web Tokens (CWTs) [RFC8392], and associated PoP semantics. For more\n information, see \"Proof-of-Possession Key Semantics for CBOR Web\n Tokens (CWTs)\" [RFC8747]. A JWT uses JSON Object Signing and\n Encryption (JOSE), while a CWT uses CBOR Object Signing and\n Encryption (COSE) [RFC9052] for security protection.\n1.1. Requirements Language\n The key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\",\n \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"NOT RECOMMENDED\", \"MAY\", and\n \"OPTIONAL\" in this document are to be interpreted as described in\n BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all\n capitals, as shown here.\n1.2. ACE-Related Terminology\n Certain security-related terms, such as \"authentication\",\n \"authorization\", \"data confidentiality\", \"(data) integrity\", \"message\n authentication code\" (MAC), and \"verify\", are taken from [RFC4949].\n The terminology for entities in the architecture is defined in OAuth\n 2.0 [RFC6749], such as \"Client\" (C), \"Resource Server\" (RS), and\n \"Authorization Server\" (AS).\n The term \"resource\" is used to refer to an MQTT Topic Name, which is\n defined in Section 1.3. Hence, the \"Resource Owner\" is any entity\n that can authoritatively speak for the topic. This document also\n defines a Client Authorization Server for Clients that are not able\n to support HTTP.\n Client Authorization Server (CAS)\n An entity that prepares and endorses authentication and\n authorization data for a Client and communicates to the AS\n using HTTPS.\n1.3. MQTT-Related Terminology\n The document describes message exchanges as MQTT protocol\n interactions. The Clients are MQTT Clients, which connect to the\n Broker to publish and subscribe to Application Messages (which are\n labeled with their topics). For additional information, please refer\n to the MQTT v5.0 OASIS Standard [MQTT-OASIS-Standard-v5] or MQTT\n v3.1.1 OASIS Standard [MQTT-OASIS-Standard-v3.1.1].\n Broker \n The Server in MQTT. It acts as an intermediary between the\n Clients that publish Application Messages and the Clients\n that made Subscriptions. The Broker acts as the Resource\n Server for the Clients.\n Client \n A device or program that uses MQTT.\n Network Connection\n A construct provided by the underlying transport protocol\n that is being used by MQTT. It connects the Client to the\n Server. It provides the means to send an ordered, lossless\n stream of bytes in both directions. This document uses TLS\n as the transport protocol.\n Session\n A stateful interaction between a Client and a Broker. Some\n Sessions last only as long as the Network Connection; others\n can span multiple Network Connections.\n Application Message\n The data carried by the MQTT protocol. The data has an\n associated Quality-of-Service (QoS) level and Topic Name.\n MQTT Control Packet\n The MQTT protocol operates by exchanging a series of MQTT\n Control Packets. Each packet is composed of a Fixed Header,\n a Variable Header (depending on the Control Packet type), and\n a Payload.\n UTF-8-encoded string\n A string prefixed with a two-byte-length field that gives the\n number of bytes in a UTF-8-encoded string itself. Unless\n stated otherwise, all UTF-8-encoded strings can have any\n length in the range 0 to 65535 bytes.\n Binary Data\n Binary Data is represented by a two-byte-length field, which\n indicates the number of data bytes, followed by that number\n of bytes. Thus, the length of Binary Data is limited to the\n range of 0 to 65535 bytes.\n Variable Byte Integer\n A Variable Byte Integer is encoded using an encoding scheme\n that uses a single byte for values up to 127. For larger\n values, the least significant seven bits of each byte encode\n the data, and the most significant bit is used to indicate\n whether there are bytes following in the representation.\n Thus, each byte encodes 128 values and a \"continuation bit\".\n The maximum number of bytes in the Variable Byte Integer\n field is four.\n QoS level\n The level of assurance for the delivery of an Application\n Message. The QoS level can be 0-2, where 0 indicates \"At\n most once delivery\", 1 indicates \"At least once delivery\",\n and 2 indicates \"Exactly once delivery\".\n Property\n The last field of the Variable Header is a set of properties\n for several MQTT Control Packets (e.g., CONNECT and CONNACK).\n A property consists of an Identifier that defines its usage\n and data type, followed by a value. The Identifier is\n encoded as a Variable Byte Integer. For example, the\n \"Authentication Data\" property uses the identifier 22.\n Topic Name\n The label attached to an Application Message, which is\n matched to a Subscription.\n Subscription\n A Subscription comprises a Topic Filter and a maximum QoS. A\n Subscription is associated with a single Session.\n Topic Filter\n An expression that indicates interest in one or more Topic\n Names. Topic Filters may include wildcards.\n MQTT sends various Control Packets across a Network Connection. The\n following is not an exhaustive list, and the Control Packets that are\n not relevant for authorization are not explained. For instance,\n these include the PUBREL and PUBCOMP packets used in the 4-step\n handshake required for QoS level 2.\n CONNECT\n The Client requests to connect to the Broker. This is the\n first packet sent by a Client.\n CONNACK\n The Broker connection acknowledgment. CONNACK packets\n contain return codes that indicate either a success or an\n error state in response to a Client's CONNECT packet.\n AUTH \n An AUTH Control Packet is sent from the Client to the Broker\n or from the Broker to the Client as part of an extended\n authentication exchange. AUTH properties include the\n Authentication Method and Authentication Data. The\n Authentication Method is set in the CONNECT packet, and\n consequent AUTH packets follow the same Authentication\n Method. The contents of the Authentication Data are defined\n by the Authentication Method.\n PUBLISH\n Publish request sent from a publishing Client to the Broker\n or from the Broker to a subscribing Client.\n PUBACK \n Response to a PUBLISH request with QoS level 1. PUBACK can\n be sent from the Broker to a Client or from a Client to the\n Broker.\n PUBREC \n Response to a PUBLISH request with QoS level 2. PUBREC can\n be sent from the Broker to a Client or from a Client to the\n Broker.\n SUBSCRIBE\n Subscribe request sent from a Client.\n SUBACK \n Subscribe acknowledgment from the Broker to the Client.\n PINGREQ\n A ping request sent from a Client to the Broker. It signals\n to the Broker that the Client is alive and is used to confirm\n that the Broker is also alive. The \"Keep Alive\" period is\n set in the CONNECT packet.\n PINGRESP\n Response sent by the Broker to the Client in response to\n PINGREQ. It indicates the Broker is alive.\n DISCONNECT\n The DISCONNECT packet is the final MQTT Control Packet sent\n from the Client or the Broker. It indicates the reason why\n the Network Connection is being closed. If the Network\n Connection is closed without the Client first sending a\n DISCONNECT packet with reason code 0x00 (Normal\n disconnection) and the MQTT Connection has a Will Message,\n the Will Message is published.\n Will \n If the Network Connection is not closed normally, the Broker\n sends a last Will Message for the Client if the Client\n provided one in its CONNECT packet. Situations in which the\n Will Message is published include, but are not limited to,\n the following:\n * an I/O error or network failure detected by the Broker,\n * the Client fails to communicate within the Keep Alive\n period,\n * the Client closes the Network Connection without first\n sending a DISCONNECT packet with reason code 0x00 (Normal\n disconnection), and\n * the Broker closes the Network Connection without first\n receiving a DISCONNECT packet with reason code 0x00\n (Normal disconnection).\n If the Will Flag is set in the CONNECT flags, then the\n Payload of the CONNECT packet includes information about the\n Will. The information consists of the Will Properties, Will\n Topic, and Will Payload fields."
},
{
"section_number": "2.",
"section_name": "Authorizing Connection Requests",
"tag": "Section 2. Authorizing Connection Requests",
"content": "This section specifies how Client connections are authorized by the\n AS and verified by the MQTT Broker. Figure 1 shows the basic\n protocol flows during connection setup. The token request and\n response use the token endpoint at the AS, specified for HTTP-based\n interactions in Section 5.8 of the ACE framework [RFC9200]. Steps\n (D) and (E) are optional and use the introspection endpoint specified\n in Section 5.9 of the ACE framework [RFC9200]. The discussion in\n this document assumes that the Client and the Broker use HTTPS to\n communicate with the AS via these endpoints. The Client and the\n Broker use MQTT to communicate between them. The C-AS and Broker-AS\n communications MAY be implemented using protocols other than HTTPS,\n e.g., CoAP or MQTT. Whatever protocol is used for the C-AS and\n Broker-AS communications MUST provide mutual authentication,\n confidentiality protection, and integrity protection.\n If the Client is resource constrained or does not support HTTPS, a\n separate Client Authorization Server may carry out the token request\n on behalf of the Client (Figure 1, steps (A) and (B)) and, later,\n onboard the Client with the token. The interactions between a Client\n and its Client Authorization Server for token onboarding and support\n for MQTT-based token requests at the AS are out of the scope of this\n document.\n +---------------------+\n | Client |\n | |\n +---(A) Token request------| Client - |\n | | Authorization |\n | +-(B) Access token-----> Server Interface |\n | | | (HTTPS) |\n | | |_____________________|\n | | | |\n +--v-------------+ | Pub/Sub Interface |\n | Authorization | | (MQTT over TLS) |\n | Server | +----------------^----+\n |________________| | |\n | ^ (C) Connection (F) Connection\n | | request + response\n | | access token |\n | | | |\n | | +---v--------------+\n | | | Broker |\n | | | (MQTT over TLS) |\n | | |__________________|\n | +(D) Introspection-----| |\n | request (optional)| RS-AS interface |\n | | (HTTPS) |\n +-(E) Introspection-------->|__________________|\n response (optional)\n Figure 1: Connection Setup\n2.1. Client Token Request to the Authorization Server (AS)\n The first step in the protocol flow (Figure 1, step (A)) is the token\n acquisition by the Client from the AS. The Client and the AS MUST\n perform mutual authentication. The Client requests an access token\n from the AS, as described in Section 5.8.1 of the ACE framework\n [RFC9200]. The document follows the procedures defined in\n Section 3.2.1 of the DTLS profile [RFC9202] for raw public keys\n (RPKs) [RFC7250]) and in Section 3.3.1 of [RFC7250] for pre-shared\n keys (PSKs). However, the content type of the request is set to\n \"application/ace+json\", and the AS uses JSON in the Payload of its\n responses to the Client and the RS. As explained earlier,\n implementations MAY also use the \"application/ace+cbor\" content type.\n On receipt of the token request, the AS verifies the request. If the\n AS successfully verifies the access token request and authorizes the\n Client for the indicated audience (i.e., RS) and scopes (i.e.,\n publish/subscribe permissions over topics, as described in\n Section 2.3), the AS issues an access token (Figure 1, step (B)).\n The response includes the parameters described in Section 5.8.2 of\n the ACE framework [RFC9200]. For RPKs, the parameters are as\n described in Section 3.2.1 of the DTLS profile [RFC9202]. For PSKs,\n the document follows Section 3.3.1 of the DTLS profile [RFC9202]. In\n both cases, if the response contains an \"ace_profile\" parameter, this\n parameter is set to \"mqtt_tls\". The returned token is a Proof-of-\n Possession (PoP) token by default.\n This document follows [RFC7800] for PoP semantics for JWTs (CWTs MAY\n also be used). The AS includes a \"cnf\" (confirmation) parameter in\n the PoP token to declare that the Client possesses a particular key\n and the RS can cryptographically confirm that the Client has\n possession of that key, as described in [RFC9201].\n Note that the contents of the web tokens (including the \"cnf\"\n parameter) are to be consumed by the RS and not the Client (the\n Client obtains the key information in a different manner). The RPK\n case is handled as described in Section 3.2.1 of the DTLS profile\n [RFC9202]. For the PSK case, the referenced procedures apply, with\n the following exceptions to accommodate JWT and JOSE use. In this\n case, the AS adds a \"cnf\" parameter to the Access Information\n carrying a JSON Web Key (JWK) [RFC7517] object that contains either\n the symmetric key itself or a key identifier that can be used by the\n RS to determine the secret key it shares with the Client. The JWT is\n created as explained in Section 7 of [RFC7519], and the JWT MUST\n include a JSON Web Encryption (JWE) [RFC7516]. If a CWT/COSE is\n used, this information MUST be inside the \"COSE_Key\" object and MUST\n be encrypted using a \"COSE_Encrypt0\" structure.\n The AS returns error responses for JSON-based interactions following\n Section 5.2 of [RFC6749]. When CBOR is used, the interactions MUST\n implement the procedure described in Section 5.8.3 of the ACE\n framework [RFC9200].\n2.2. Client Connection Request to the Broker (C)\n2.2.1. Overview of Client-RS Authentication Methods over TLS and MQTT\n Unless the Client publishes and subscribes to only public topics, the\n Client and the Broker MUST perform mutual authentication. The Client\n MUST authenticate to the Broker either over MQTT or TLS before\n performing any other action. For MQTT, the options are \"None\" and\n \"ace\". For TLS, the options are \"Anon\" for an anonymous client, and\n \"Known(RPK/PSK)\" for RPKs and PSKs, respectively. The \"None\" and\n \"Anon\" options do not provide client authentication but can be used\n either during authentication or in combination with authentication at\n the other layer. When the Client uses TLS:Anon,MQTT:None, the Client\n can only publish or subscribe to public topics. Thus, the client\n authentication procedures involve the following possible\n combinations:\n TLS:Anon,MQTT:None:\n This option is used only for the topics that do not require\n authorization, including the \"authz-info\" topic. Publishing\n to the \"authz-info\" topic is described in Section 2.2.2.\n TLS:Anon,MQTT:ace:\n The token is transported inside the CONNECT packet and MUST\n be validated using one of the methods described in\n Section 2.2.2. This option also supports a tokenless\n connection request for AS discovery. As per the ACE\n framework [RFC9200], a separate step is needed to determine\n whether the discovered AS URI is authorized to act as an AS.\n TLS:Known(RPK/PSK),MQTT:none:\n This specification supports client authentication with TLS\n with RPKs and PSKs, following the procedures described in the\n DTLS profile [RFC9202]. For the RPK, the Client MUST have\n published the token to the \"authz-info\" topic. For the PSK,\n the token MAY be published to the \"authz-info\" topic or MAY\n be, alternatively, provided as a \"PSK identity\" (e.g., an\n \"identity\" in the \"identities\" field in the Client's\n \"pre_shared_key\" extension in TLS 1.3).\n TLS:Known(RPK/PSK),MQTT:ace:\n This option SHOULD NOT be chosen as the token transported in\n the CONNECT packet and overwrites any permissions passed\n during the TLS authentication.\n It is RECOMMENDED that the Client implements TLS:Anon,MQTT:ace as the\n first choice when working with protected topics. However, MQTT\n v3.1.1 Clients that do not prefer to overload the User Name and\n Password fields for ACE (as described in Section 6) MAY implement\n TLS:Known(RPK/PSK),MQTT:none and, consequently, TLS:Anon,MQTT:None to\n submit their token to \"authz-info\".\n The Broker MUST support TLS:Anon,MQTT:ace. To support Clients with\n different capabilities, the Broker MAY provide multiple client\n authentication options, e.g., support TLS:Known(RPK),MQTT:none and\n TLS:Anon,MQTT:None, to enable RPK-based client authentication.\n The Client MUST authenticate the Broker during the TLS handshake. If\n the Client authentication uses TLS:Known(RPK/PSK), then the Broker is\n authenticated using the respective method. Otherwise, to\n authenticate the Broker, the Client MUST validate a public key from\n an X.509 certificate or an RPK from the Broker against the \"rs_cnf\"\n parameter in the token response, which contains information about the\n public key used by the RS to authenticate if the token type is \"pop\"\n and asymmetric keys are used as defined in [RFC9201]. The AS MAY\n include the thumbprint of the RS's X.509 certificate in the \"rs_cnf\"\n (thumbprint, as defined in [RFC9360]). In this case, the Client MUST\n validate the RS certificate against this thumbprint.\n2.2.2. authz-info: The Authorization Information Topic\n In the cases when the Client must transport the token to the Broker\n first, the Client connects to the Broker to publish its token to the\n \"authz-info\" topic. The \"authz-info\" topic MUST only be published\n (i.e., the Clients are not allowed to subscribe to it). \"authz-info\"\n is not protected, and hence, the Client uses the TLS:Anon,MQTT:None\n option over a TLS connection. After publishing the token, the Client\n disconnects from the Broker and is expected to reconnect using client\n authentication over TLS (i.e., TLS:Known(RPK/PSK),MQTT:none).\n The Broker stores and indexes all tokens received to the \"authz-info\"\n topic in its key store (similar to the DTLS profile for ACE\n [RFC9202]). This profile follows the recommendation of\n Section 5.10.1 of the ACE framework [RFC9200] and expects that the\n Broker stores only one token per PoP key, and any other token linked\n to the same key overwrites an existing token.\n The Broker MUST verify the validity of the token (i.e., through local\n validation or introspection if the token is a reference), as\n described in Section 2.2.5. If the token is not valid, the Broker\n MUST discard the token.\n Depending on the QoS level of the PUBLISH packet, the Broker returns\n the error response as a PUBACK, PUBREC, or DISCONNECT packet. If the\n QoS level is equal to 0, and the token is not valid, or if the claims\n cannot be obtained in the case of an introspected token, the Broker\n MUST send a DISCONNECT packet with reason code 0x87 (Not authorized).\n If the PUBLISH Payload does not parse to a token, the Broker MUST\n send a DISCONNECT with reason code 0x99 (Payload format invalid).\n If the QoS level of the PUBLISH packet is greater than or equal to 1,\n and the token is not valid, or the claims cannot be obtained in the\n case of an introspected token, the Broker MUST send reason code 0x87\n (Not authorized) in the PUBACK or PUBREC. If the PUBLISH Payload\n does not parse to a token, the PUBACK/PUBREC reason code is 0x99\n (Payload format invalid).\n When the Broker sends the \"Not authorized\" response, it must be noted\n that this corresponds to the token being not valid and not that the\n actual PUBLISH packet was not authorized. Given that the \"authz-\n info\" is a public topic, this response is not expected to cause\n confusion.\n2.2.3. Client Authentication over TLS\n This document supports TLS with raw public keys (RPKs) [RFC7250] and\n with pre-shared keys (PSKs). The TLS session setup follows the DTLS\n profile for ACE [RFC9202], as the profile applies to TLS equally well\n [RFC9430]. When there are exceptions to the DTLS profile, these are\n explicitly stated in the document. If TLS 1.2 is used, [RFC7925]\n describes how TLS can be used for constrained devices, alongside\n recommended cipher suites. Additionally, TLS 1.2 implementations\n MUST use the \"Extended Main Secret\" extension (terminology adopted\n from [TLS-bis]) to incorporate the handshake transcript into the main\n secret [RFC7627]. TLS implementations SHOULD use the Server Name\n Indication (SNI) [RFC6066] and Application-Layer Protocol Negotiation\n (ALPN) [RFC7301] extensions so the TLS handshake authenticates as\n much of the protocol context as possible.\n2.2.3.1. Raw Public Key Mode\n This document follows the procedures defined in Section 3.2.2 of the\n DTLS profile for ACE [RFC9202] with the following exceptions. The\n Client MUST upload the access token to the Broker using the method\n specified in Section 2.2.2 before initiating the handshake.\n2.2.3.2. Pre-Shared Key Mode\n This document follows the procedures defined in Section 3.3.2 of the\n DTLS profile for ACE [RFC9202] with the following exceptions.\n To use TLS 1.3 with pre-shared keys, the Client utilizes the PSK\n extension specified in [RFC8446] using the key conveyed in the \"cnf\"\n parameter of the AS response. The same key is bound to the access\n token in the \"cnf\" claim. The Client can upload the token, as\n specified in Section 2.2.2, before initiating the handshake. When\n using a previously uploaded token, the Client MUST indicate during\n the handshake which previously uploaded access token it intends to\n use. To do so, it MUST create a \"COSE_Key\" or \"JWK\" structure with\n the \"kid\" that was conveyed in the \"rs_cnf\" claim in the token\n response from the AS and the key type \"symmetric\". This structure is\n then included as the only element in the \"cnf\" structure and the\n encoded value of that \"cnf\" structure used as a PSK identity in TLS.\n As an alternative to the access token upload, the Client can provide\n the most recent access token, JWT or CWT, as a PSK identity.\n In contrast to the DTLS profile for ACE [RFC9202], a Client MAY omit\n support for the cipher suites TLS_PSK_WITH_AES_128_CCM_8 and\n TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8. For TLS 1.2, however, a client\n MUST support TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 for PSKs [RFC8442]\n and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 for RPKs [RFC8422], as\n recommended in [RFC9325] (and adjusted to be a PSK cipher suite as\n appropriate).\n2.2.4. Client Authentication over MQTT\n2.2.4.1. Transporting the Access Token inside the MQTT CONNECT\n This section describes how the Client transports the token to the\n Broker inside the CONNECT packet. If this method is used, the Client\n TLS connection is expected to be anonymous, and the Broker is\n authenticated during the TLS connection setup. The approach\n described in this section is similar to an earlier proposal by\n Fremantle, et al. [Fremantle14].\n After sending the CONNECT packet, the Client MUST wait to receive the\n CONNACK packet from the Broker. The only packets it is allowed to\n send are DISCONNECT or AUTH that are in response to the Broker AUTH.\n Similarly, except for a DISCONNECT and AUTH response from the Client,\n the Broker MUST NOT process any packets before sending a CONNACK\n packet.\n Figure 2 shows the structure of the MQTT CONNECT packet used in MQTT\n v5.0. A CONNECT packet is composed of a Fixed Header, a Variable\n Header, and a Payload The Fixed Header contains the Control Packet\n Type (CPT), Reserved, and Remaining Length fields. The Remaining\n Length is a Variable Byte Integer that represents the number of bytes\n remaining within the current Control Packet, including data in the\n Variable Header and the Payload. The Variable Header contains the\n Protocol Name, Protocol Level, Connect flags, Keep Alive, and\n Properties fields. The Connect flags in the Variable Header specify\n the properties of the MQTT Session. It also indicates the presence\n or absence of some fields in the Payload. The Payload contains one\n or more encoded fields, namely a unique Client Identifier for the\n Client, a Will Topic, Will Payload, User Name, and Password. All but\n the Client Identifier can be omitted depending on the flags in the\n Variable Header. The Client Identifier identifies the Client to the\n Broker and, therefore, is unique for each Client. It must be noted\n that the Client Identifier is an unauthenticated identifier used\n within the MQTT protocol and so is not bound to the access token.\n 0 8 16\n +---------------------------+\n |Protocol name length = 4 |\n +---------------------------+\n | 'M' 'Q' |\n +---------------------------+\n | 'T' 'T' |\n +---------------------------+\n |Proto.level=5|Connect flags|\n +---------------------------+\n | Keep alive |\n +---------------------------+\n | CONNECT Properties Length |\n | (up to 4 bytes) |\n +---------------------------+\n | ( ..Other properties..) |\n +---------------------------+\n | Authentication Method |\n | (0x15) | Len |\n | Len | 'a' |\n | 'c' | 'e' |\n +---------------------------+\n | Authentication Data |\n | (0x16) | Len |\n | Len | token |\n | or token + PoP data |\n +---------------------------+\n Figure 2: MQTT v5 CONNECT Variable Header with Authentication\n Method Property for ACE\n The CONNECT flags are User Name, Password, Will Retain, Will QoS,\n Will Flag, Clean Start, and Reserved. Table 1 shows how the flags\n MUST be set to use AUTH packets for authentication and authorization,\n i.e., the User Name Flag and Password Flag MUST be set to 0. An MQTT\n v5.0 Broker MAY also support token transport using the User Name and\n Password to provide a security option for MQTT v3.1.1 Clients, as\n described in Section 6.\n +===========+==========+========+======+======+=======+==========+\n | User Name | Password | Will | Will | Will | Clean | Reserved |\n | Flag | Flag | Retain | QoS | Flag | Start | |\n +===========+==========+========+======+======+=======+==========+\n | 0 | 0 | X | X X | X | X | 0 |\n +-----------+----------+--------+------+------+-------+----------+\n Table 1: CONNECT Flags for AUTH\n The Will Flag indicates that a Will Message needs to be sent. The\n Client MAY set the Will Flag as desired (marked as \"X\" in Table 1).\n If the Will Flag is set to 1, the Broker MUST check that the token\n allows the publication of the Will Message (i.e., the Will Topic\n Filter is in the scope array). The check is performed against the\n token scope described in Section 2.3. If the Will authorization\n fails, the connection is refused, as described in Section 2.4.1. If\n the Broker accepts the connection request, the Broker stores the Will\n Message and publishes it when the Network Connection is closed\n according to Will QoS, Will Retain parameters, and MQTT Will\n management rules. To avoid publishing the Will Messages in the case\n of temporary network disconnections, the Client specifies a Will\n Delay Interval in the Will Properties. Section 5 explains how the\n Broker deals with the retained messages in further detail.\n In MQTT v5.0, the Client signals a new Session (i.e., that the\n Session does not continue an existing Session) by setting the Clean\n Start flag to 1 in the CONNECT packet. In this profile, the Client\n SHOULD always start with a new Session. The Broker MAY also signal\n that it does not support the continuation of an existing Session by\n setting the Session Expiry Interval to 0 in the CONNACK. If the\n Broker starts a new Session, the Broker MUST set the Session Present\n flag to 0 in the CONNACK packet to signal this to the Client.\n The Broker MAY support continuing an existing Session, e.g., if the\n Broker requires it for QoS reasons. In this case, if a CONNECT\n packet is received with Clean Start set to 0, and there is a Session\n associated with the Client Identifier, the Broker MUST resume\n communications with the Client based on the state from the existing\n Session. In its response, the Broker MUST set the Session Present\n flag to 1 in the CONNACK packet to signal the continuation of an\n existing Session to the Client. The Session State stored by the\n Client and the Broker is described in Section 5.\n When reconnecting to a Broker that supports continuing existing\n Sessions, the Client MUST still provide a token in addition to using\n the same Client Identifier and setting the Clean Start to 0. The\n Broker MUST still perform PoP validation on the provided token. If\n the token matches the stored state, the Broker MAY skip introspecting\n a token-by-reference and use the stored introspection result. The\n Broker MUST also verify the Client is authorized to receive or send\n MQTT packets that are pending transmission. When a Client connects\n with a long Session Expiry Interval, the Broker may need to maintain\n the Client's MQTT Session State after it disconnects for an extended\n period. Brokers SHOULD implement administrative policies to limit\n misuse.\n Note that, according to the MQTT standard, the Broker uses the Client\n Identifier to identify the Session State. In the case of a Client\n Identifier collision, a Client may take over another Client's\n Session. Given that the Broker MUST associate the Client with a\n valid token, a Client will only send or receive messages to its\n authorized topics. Therefore, while this issue is not expected to\n affect security, it may affect QoS (i.e., PUBLISH or QoS messages\n saved for Client A may be delivered to a Client B). In addition, if\n this Client Identifier represents a Client already connected to the\n Broker, the Broker sends a DISCONNECT packet to the existing Client\n with reason code 0x8E (Session taken over) and closes the connection\n to the Client.\n2.2.4.2. Authentication Using the AUTH Property\n Figure 2 shows the Authentication Method and Authentication Data\n fields when the client authenticates using the AUTH property. The\n Client MUST set the Authentication Method as a property of a CONNECT\n packet by using the property identifier 21 (0x15). This is followed\n by a UTF-8-encoded string containing the name of the Authentication\n Method, which MUST be set to \"ace\". If the Broker does not support\n this profile, it sends a CONNACK packet with reason code 0x8C (Bad\n authentication method).\n The Authentication Method is followed by the Authentication Data,\n which has a property identifier 22 (0x16) and is Binary Data. Based\n on the Authentication Data, the Broker MUST support both options\n below:\n * proof of possession using a challenge from the TLS session\n * proof of possession via a Broker-generated challenge/response\n2.2.4.2.1. Proof of Possession Using a Challenge from the TLS Session\n +-----------------------------------------------------------------+\n |Authentication|Token Length|Token |MAC or Signature |\n |Data Length | | |(over TLS exporter content) |\n +-----------------------------------------------------------------+\n Figure 3: Authentication Data for PoP Based on TLS Exporter Content\n For this option, the Authentication Data inside the Client's CONNECT\n packet MUST contain the two-byte integer token length, the token, and\n the keyed message digest (MAC) or the Client signature (as shown in\n Figure 3). The Proof-of-Possession key in the token is used to\n calculate the keyed message digest (MAC) or the Client signature\n based on the content obtained from the TLS exporter ([RFC5705] for\n TLS 1.2 and Section 7.5 of [RFC8446] for TLS 1.3). This content is\n exported from the TLS session using the exporter label \"EXPORTER-ACE-\n MQTT-Sign-Challenge\", an empty context, and a length of 32 bytes.\n The token is also validated, as described in Section 2.2.5, and the\n Broker responds with a CONNACK packet with the appropriate response\n code. The Client cannot reauthenticate using this method during the\n same TLS session (see Section 4).\n2.2.4.2.2. Proof of Possession via Broker-generated Challenge/Response\n +------------------------------------+\n |Authentication|Token Length|Token |\n |Data Length | | |\n +------------------------------------+\n Figure 4: Authentication Data to Initiate PoP Based on Challenge/\n Response\n +--------------------------+\n |Authentication|RS Nonce |\n |Data Length |(8 bytes) |\n +--------------------------+\n Figure 5: Authentication Data for Broker Challenge\n For this option, the Broker follows a Broker-generated challenge/\n response protocol. If the Authentication Data inside the Client's\n CONNECT contains only the two-byte integer token length and the token\n (as shown in Figure 4), the Broker MUST respond with an AUTH packet\n with the authenticated reason code set to 0x18 (Continue\n Authentication). The Broker also uses this method if the\n Authentication Data does not contain a token, but the Broker has a\n token stored for the connecting Client.\n The Broker continues authentication using an AUTH packet that\n contains the Authentication Method and the Authentication Data. The\n Authentication Method MUST be set to \"ace\", and the Authentication\n Data MUST NOT be empty and MUST contain an 8-byte RS nonce as a\n challenge for the Client (Figure 5).\n +---------------------------------------------------------+\n |Authentication|Client Nonce |MAC or Signature |\n |Data Length |(8 bytes) |(over RS nonce+Client nonce)|\n +---------------------------------------------------------+\n Figure 6: Authentication Data for the Client Challenge Response\n The Client responds to this with an AUTH packet with reason code 0x18\n (Continue Authentication). Similarly, the Client packet sets the\n Authentication Method to \"ace\". The Authentication Data in the\n Client's response is formatted as shown in Figure 6 and includes the\n 8-byte Client nonce and the signature or MAC computed over the RS\n nonce concatenated with the Client nonce using PoP key in the token.\n Next, the token is validated as described in Section 2.2.5. The\n success case is illustrated in Figure 7. The Client MAY also\n reauthenticate using this challenge-response flow, as described in\n Section 4.\n Client Broker\n | |\n |<===========>| TLS connection setup\n | |\n | |\n +------------>| CONNECT with Authentication Data\n | | contains only token\n | |\n <-------------+ AUTH 0x18 (Cont. Authentication)\n | | 8-byte RS nonce as challenge\n | |\n |------------>| AUTH 0x18 (Cont. Authentication)\n | | 8-byte Client nonce + signature/MAC\n | |\n | |---+ Token validation\n | | | (may involve introspection)\n | |<--+\n | |\n |<------------+ CONNACK 0x00 (Success)\n Figure 7: PoP Challenge/Response Flow - Success\n2.2.5. Broker Token Validation\n The Broker MUST verify the validity of the token either locally\n (e.g., in the case of a self-contained token) or MAY send a request\n to the introspection endpoint of the AS (as described for HTTP-based\n interactions in Section 5.9 of the ACE framework [RFC9200]). The\n Broker MUST verify the claims in the access token according to the\n rules set in Section 5.10.1.1 of the ACE framework [RFC9200].\n To authenticate the Client, the Broker validates the signature or the\n MAC, depending on how the PoP protocol is implemented. For self-\n contained tokens, the Broker MUST process the security protection of\n the token first, as specified by the respective token format, i.e., a\n CWT uses COSE, while a JWT uses JOSE. For a token-by-reference, the\n Broker uses the \"cnf\" structure returned as a result of token\n introspection, as specified in [RFC7519]. HMAC-SHA-256 (HS256)\n [RFC6234] and Ed25519 [RFC8032] are mandatory to implement for the\n Broker. The Client MUST implement at least one of them depending on\n the choice of symmetric or asymmetric validation. Validation of the\n signature or MAC MUST fail if the signature algorithm is set to\n \"none\" when the key used for the signature algorithm cannot be\n determined or the computed and received signature/MAC do not match.\n The Broker MUST check if the access token is still valid, if it is\n the intended destination (i.e., the audience) of the token, and if\n the token was issued by an authorized Authorization Server. If the\n Client is using TLS RPK mode to authenticate to the Broker, the AS\n constructs the access token so that the Broker can associate the\n access token with the Client's public key. The \"cnf\" claim MUST\n contain either the Client's RPK or, if the key is already known by\n the Broker (e.g., from previous communication), a reference to it.\n2.3. Token Scope and Authorization\n The scope field contains the publish and subscribe permissions for\n the Client. Therefore, the token or its introspection result MUST be\n cached to allow a Client's future PUBLISH and SUBSCRIBE messages.\n During the CONNECT, if the Will Flag is set to 1, the Broker MUST\n also authorize the publication of the Will Topic and Will Message\n using the token's scope field. The Broker uses the scope to match\n against the Topic Name in a PUBLISH packet (including Will Topic in\n the CONNECT) or a Topic Filter in a SUBSCRIBE packet.\n The scope in the token is a single value. For a JWT, the single\n scope is a base64url-encoded string with any padding characters\n removed, which has an internal structure of a JSON array. For a CWT,\n this information is represented in CBOR. The internal structure\n follows the Authorization Information Format (AIF) for ACE [RFC9237].\n Using the Concise Data Definition Language (CDDL) [RFC8610], the\n specific data model for MQTT is:\n AIF-MQTT = AIF-Generic<mqtt-topic-filter, mqtt-permissions>\n AIF-Generic<Toid, Tperm> = [* [Toid, Tperm]]\n mqtt-topic-filter = tstr ; as per Section 4.7 of MQTT v5.0\n mqtt-permissions = [+permission]\n permission = \"pub\"/\"sub\"\n Figure 8: AIF-MQTT Data Model\n Topic Filters are implemented according to Section 4.7 of the MQTT\n v5.0 OASIS Standard [MQTT-OASIS-Standard-v5]. By default, Wildcard\n Subscriptions are supported, and so, the Topic Filter may include\n special wildcard characters. The multi-level wildcard, \"#\", matches\n any number of levels within a topic, and the single-level wildcard,\n \"+\", matches one topic level. The Broker MAY signal in the CONNACK\n explicitly whether Wildcard Subscriptions are supported by returning\n a CONNACK property \"Wildcard Subscription Available\". A value of 0\n means that Wildcard Subscriptions are not supported. A value of 1\n means Wildcard Subscriptions are supported.\n Following this model, an example scope may contain:\n [[\"topic1\",[\"pub\",\"sub\"]],[\"topic2/#\",[\"pub\"]],[\"+/topic3\",[\"sub\"]]]\n Figure 9: Example Scope\n This access token gives publish (\"pub\") and subscribe (\"sub\")\n permissions to the \"topic1\", publish permission to all the subtopics\n of \"topic2\", and subscribe permission to all \"topic3\", skipping one\n level.\n If the scope is empty, the Broker records no permissions for the\n Client for any topic. In this case, the Client is not able to\n publish or subscribe to any protected topics. The non-empty scope is\n used to authorize the Will Topic, if provided, in the CONNECT packet,\n during connection setup and, if the connection request succeeds, the\n Topic Names or Topic Filters requested in the future PUBLISH and\n SUBSCRIBE packets. For the authorization to succeed, the Broker MUST\n verify that the Topic Name or Topic Filter in question is either an\n exact match to or a subset of at least one \"topic_filter\" in the\n scope.\n2.4. Broker Response to Client Connection Request\n Based on the validation result (obtained either via local inspection\n or using the introspection interface of the AS), the Broker MUST send\n a CONNACK packet to the Client.\n2.4.1. Unauthorized Request and the Optional Authorization Server\n Discovery\n Authentication can fail for the following reasons:\n * if the Client does not provide a valid token,\n * the Client omits the Authentication Data field and the Broker has\n no token stored for the Client,\n * the token or Authentication data are malformed, or\n * if the Will Flag is set, the authorization checks for the Will\n Topic fails.\n The Broker responds with the CONNACK reason code 0x87 (Not\n Authorized) or any other applicable reason code.\n The Broker MAY also trigger AS discovery and include a User Property\n (identified as property type 38 (0x26)) in the CONNACK for the AS\n Request Creation Hints. The User Property is a UTF-8 string pair,\n composed of a name and a value. The name of the User Property MUST\n be set to \"ace_as_hint\". The value of the User Property is a UTF-\n 8-encoded JSON object containing the mandatory \"AS\" parameter and the\n optional parameters \"audience\", \"kid\", \"cnonce\", and \"scope\", as\n defined in Section 5.3 of the ACE framework [RFC9200].\n2.4.2. Authorization Success\n On success, the reason code of the CONNACK is 0x00 (Success). If the\n Broker starts a new Session, it MUST also set Session Present to 0 in\n the CONNACK packet to signal a new Session to the Client. Otherwise,\n it MUST set Session Present to 1.\n Having accepted the connection, the Broker MUST be prepared to store\n the token during the connection and after disconnection for future\n use. If the token is not self-contained and the Broker uses token\n introspection, it MAY cache the validation result to authorize the\n subsequent PUBLISH and SUBSCRIBE packets. PUBLISH and SUBSCRIBE\n packets, which are sent after a connection setup, do not contain\n access tokens. If the introspection result is not cached, the Broker\n needs to introspect the saved token for each request. The Broker\n SHOULD also use a cache timeout to introspect tokens regularly. The\n timeout value is specific to the application and should be chosen to\n reduce the risk of using stale introspection responses."
},
{
"section_number": "3.",
"section_name": "Authorizing PUBLISH and SUBSCRIBE Packets",
"tag": "Section 3. Authorizing PUBLISH and SUBSCRIBE Packets",
"content": "Using the cached token or its introspection result, the Broker uses\n the scope field to match against the Topic Name in a PUBLISH packet\n or a Topic Filter in a SUBSCRIBE packet.\n3.1. PUBLISH Packets from the Publisher Client to the Broker\n On receiving the PUBLISH packet, the Broker MUST use the type of\n packet (i.e., PUBLISH) and the Topic Name in the packet header to\n match against the scope array items in the cached token or its\n introspection result. Following the example in Section 2.3, the\n Client sending a PUBLISH packet for \"topic2/a\" would be allowed, as\n the scope array includes the [\"topic2/#\",[\"pub\"]].\n If the Client is allowed to publish to the topic, the Broker\n publishes the message to all valid subscribers of the topic. In the\n case of an authorization failure, the Broker MUST return an error if\n the Client has set the QoS level of the PUBLISH packet to greater\n than or equal to 1. Depending on the QoS level, the Broker responds\n with either a PUBACK or PUBREC packet with reason code 0x87 (Not\n authorized). On receiving an acknowledgment with 0x87 (Not\n authorized), the Client MAY reauthenticate by providing a new token,\n as described in Section 4.\n For QoS level 0, the Broker sends a DISCONNECT packet with reason\n code 0x87 (Not authorized) and closes the Network Connection. Note\n that the server-side DISCONNECT is a new feature of MQTT v5.0 (in\n MQTT v3.1.1, the server needs to drop the connection).\n For all QoS levels, the Broker MAY return 0x80 (Unspecified error) if\n they do not want to leak the Topic Names to unauthorized clients.\n3.2. PUBLISH Packets from the Broker to the Subscriber Clients\n To forward PUBLISH packets to the subscribing Clients, the Broker\n identifies all the subscribers that have valid matching Topic\n Subscriptions to the Topic Name of the PUBLISH packet (i.e., the\n tokens are valid, and token scopes allow a Subscription to this\n particular Topic Name). The Broker forwards the PUBLISH packet to\n all the valid subscribers.\n The Broker MUST NOT forward messages to unauthorized subscribers. To\n avoid silently dropping messages, the Broker MUST close the Network\n Connection and SHOULD inform the affected subscribers. In this case,\n the only way to inform a client would be sending a DISCONNECT packet.\n Therefore, the Broker SHOULD send a DISCONNECT packet with reason\n code 0x87 (Not authorized) before closing the Network Connection to\n these clients.\n3.3. Authorizing SUBSCRIBE Packets\n In MQTT, a SUBSCRIBE packet is sent from a Client to the Broker to\n create one or more Subscriptions to one or more topics. The\n SUBSCRIBE packet may contain multiple Topic Filters. The Topic\n Filters may include wildcard characters.\n On receiving the SUBSCRIBE packet, the Broker MUST use the type of\n packet (i.e., SUBSCRIBE) and the Topic Filter in the packet header to\n match against the scope field of the stored token or introspection\n result. The Topic Filters MUST be an exact match to or be a subset\n of at least one of the \"topic_filter\" fields in the scope array found\n in the Client's token. For example, if the Client sends a SUBSCRIBE\n request for topic \"a/b/*\" and has a token that permits \"a/*\", this is\n a valid SUBSCRIBE request, as \"a/b/*\" is a subset of \"a/*\". (The\n process is similar to a Broker matching the Topic Name in a PUBLISH\n packet against the Subscriptions known to the Server.)\n As a response to the SUBSCRIBE packet, the Broker issues a SUBACK\n packet. For each Topic Filter, the SUBACK packet includes a return\n code matching the QoS level for the corresponding Topic Filter. In\n the case of failure, the return code is 0x87, indicating that the\n Client is not authorized. The Broker MAY return 0x80 (Unspecified\n error) if they do not want to leak the Topic Names to unauthorized\n clients. A reason code is returned for each Topic Filter.\n Therefore, the Client may receive success codes for a subset of its\n Topic Filters while being unauthorized for the rest."
},
{
"section_number": "4.",
"section_name": "Token Expiration, Update, and Reauthentication",
"tag": "Section 4. Token Expiration, Update, and Reauthentication",
"content": "The Broker MUST check for token expiration whenever a CONNECT,\n PUBLISH, or SUBSCRIBE packet is received or sent. The Broker SHOULD\n check for token expiration on receiving a PINGREQ packet. The Broker\n MAY also check for token expiration periodically, e.g., every hour.\n This may allow for early detection of a token expiry.\n The token expiration is checked by checking the \"exp\" claim of a JWT\n or introspection response or via performing an introspection request\n with the AS, as described in Section 5.9 of the ACE framework\n [RFC9200]. Token expirations may trigger the Broker to send PUBACK,\n SUBACK, and DISCONNECT packets with the return code set to \"Not\n authorized\". After sending a DISCONNECT packet, the Network\n Connection is closed, and no more messages can be sent.\n The Client MAY reauthenticate a response to PUBACK and SUBACK, which\n signal loss of authorization. The Clients MAY also proactively\n update their tokens, i.e., before they receive a packet with a \"Not\n authorized\" return code. To start reauthentication, the Client MUST\n send an AUTH packet with reason code 0x19 (Reauthentication). The\n Client MUST set the Authentication Method as \"ace\" and transport the\n new token in the Authentication Data. If reauthenticating during the\n current TLS session, the Client MUST NOT use the method described in\n Section 2.2.4.2.1, i.e., proof of possession using a challenge from\n the TLS session, to avoid reusing the same challenge value from the\n TLS-Exporter. Note that this means that servers will either need to\n record in the session ticket or database entry whether the TLS-\n Exporter-derived challenge was used or always deny use of the TLS-\n Exporter-derived challenge for resumed sessions. In TLS 1.3, the\n resumed connection would have a new exporter value, but the\n requirement is phrased this way for simplicity. For\n reauthentications in the same TLS-session, the Client MUST use the\n challenge-response PoP, as defined in Section 2.2.4.2.2. The Broker\n accepts reauthentication requests if the Client has already submitted\n a token (may be expired), for which it performed proof of possession.\n Otherwise, the Broker MUST deny the request. If the reauthentication\n fails, the Broker MUST send a DISCONNECT packet with reason code 0x87\n (Not Authorized)."
},
{
"section_number": "5.",
"section_name": "Handling Disconnections and Retained Messages",
"tag": "Section 5. Handling Disconnections and Retained Messages",
"content": "In the case of a Client DISCONNECT, if the Session Expiry Interval is\n set to 0, the Broker doesn't store the Session State but MUST keep\n the retained messages. If the Broker stores the Session State, the\n state MAY include the token and its introspection result (for\n reference tokens) in addition to the MQTT Session State. The MQTT\n Session State is identified by the Client Identifier and includes the\n following:\n * the Client Subscriptions,\n * messages with QoS levels 1 and 2, which have not been completely\n acknowledged or are pending transmission to the Client, and\n * if the Session is currently not connected, the time at which the\n Session will end and the Session State will be discarded.\n The token/introspection state is not part of the MQTT Session State,\n and PoP validation is required for each new connection, regardless of\n whether existing MQTT Sessions are continued.\n The messages to be retained are indicated to the Broker by setting a\n RETAIN flag in a PUBLISH packet. This way, the publisher signals to\n the Broker to store the most recent message for the associated topic.\n Hence, the new subscribers can receive the last sent message from the\n publisher for that particular topic without waiting for the next\n PUBLISH packet. The Broker MUST continue publishing the retained\n messages as long as the associated tokens are valid. In the MQTT\n standard, if QoS is 0 for the PUBLISH packet, the Broker may discard\n the retained message any time. For QoS > 1, the message expiry\n interval dictates how long the retained message is kept. However, it\n is important that the Broker avoids sending messages indefinitely for\n the Clients that never update their tokens (i.e., the Client connects\n briefly with a valid token, sends a PUBLISH packet with the RETAIN\n flag set to 1 and QoS > 1, disconnects, and never connects again).\n Therefore, the Broker MUST use the minimum of the token expiry and\n message expiry interval to discard a retained message.\n In case of disconnections due to network errors or server\n disconnection due to a protocol error (which includes authorization\n errors), the Will Message is sent if the Client supplied a Will in\n the CONNECT packet. The Client's token scope array MUST include the\n Will Topic. The Will Message MUST be published to the Will Topic,\n regardless of whether the corresponding token has expired (as it has\n been validated and accepted during CONNECT)."
},
{
"section_number": "6.",
"section_name": "Reduced Protocol Interactions for MQTT v3.1.1",
"tag": "Section 6. Reduced Protocol Interactions for MQTT v3.1.1",
"content": "This section describes a reduced set of protocol interactions for the\n MQTT v3.1.1 Clients. An MQTT v5.0 Broker MAY implement these\n interactions for the MQTT v3.1.1 Clients; the flows described in this\n section are NOT RECOMMENDED for use by MQTT v5.0 Clients. Brokers\n that do not support MQTT v3.1.1 Clients return a CONNACK packet with\n reason code 0x84 (Unsupported Protocol Version) in response to the\n connection requests.\n6.1. Token Transport\n As in MQTT v5.0, the token MAY either be transported before, by\n publishing to the \"authz-info\" topic, or inside the CONNECT packet.\n If the Client provided the token via the \"authz-info\" topic and will\n not update the token in the CONNECT packet, it MUST authenticate over\n TLS. The Broker SHOULD still be prepared to store the Client access\n token for future use (regardless of the method of transport).\n In MQTT v3.1.1, after the Client has published to the \"authz-info\"\n topic, the Broker cannot communicate the result of the token\n validation because PUBACK reason codes or server-side DISCONNECT\n packets are not supported. In any case, the subsequent TLS handshake\n would fail without a valid token, which can prompt the Client to\n obtain a valid token.\n To transport the token to the Broker inside the CONNECT packet, the\n Client uses the User Name and Password fields. Figure 10 shows the\n structure of the MQTT CONNECT packet.\n 0 8 16\n +---------------------------+\n |Protocol name length = 4 |\n +---------------------------+\n | 'M' 'Q' |\n +---------------------------+\n | 'T' 'T' |\n +---------------------------+\n |Proto.level=5|Connect flags|\n +---------------------------+\n | Keep alive |\n +---------------------------+\n | Payload |\n | Client Identifier |\n | (UTF-8-encoded string) |\n | User Name as access token |\n | (UTF-8-encoded string) |\n | Password for signature/MAC|\n | (Binary Data) |\n +---------------------------+\n Figure 10: MQTT CONNECT Variable Header Using a User Name and\n Password for ACE\n Table 2 shows how the MQTT connect flags MUST be set to initiate a\n connection with the Broker.\n +================+==========+========+======+======+=======+=======+\n | User Name Flag | Password | Will | Will | Will | Clean | Rsvd. |\n | | Flag | Retain | QoS | Flag | | |\n +================+==========+========+======+======+=======+=======+\n | 1 | 1 | X | X X | X | X | 0 |\n +----------------+----------+--------+------+------+-------+-------+\n Table 2: MQTT CONNECT Flags (Rsvd. = Reserved)\n The Client SHOULD set the Clean flag to 1 to always start a new\n Session. If the Clean flag is set to 0, the Broker MUST resume\n communications with the Client based on the state from the current\n Session (as identified by the Client Identifier). If there is no\n Session associated with the Client Identifier, the Broker MUST create\n a new Session. The Broker MUST set the Session Present flag in the\n CONNACK packet accordingly, i.e., 0 to indicate a new Session to the\n Client and 1 to indicate that the existing Session is continued. The\n Broker MUST still perform PoP validation on the provided Client\n token. MQTT v3.1.1 does not use a Session Expiry Interval, and the\n Client expects that the Broker maintains the Session State after it\n disconnects. However, the stored Session State can be discarded as a\n result of administrator action or policies (e.g., defining an\n automated response based on storage capabilities), and Brokers SHOULD\n implement administrative policies to limit misuse.\n The Client MAY set the Will Flag as desired (marked as \"X\" in\n Table 2). User Name and Password flags MUST be set to 1 to ensure\n that the Payload of the CONNECT packet includes both the User Name\n and Password fields. The MQTT User Name is a UTF-8-encoded string,\n and the MQTT Password is Binary Data.\n The CONNECT in MQTT v3.1.1 does not have a field to indicate the\n Authentication Method. To signal that the User Name field contains\n an ACE token, this field MUST be prefixed with the keyword \"ace\",\n i.e., the User Name field is a concatenation of 'a', 'c', 'e', and\n the access token represented as:\n 'U+0061'||'U+0063'||'U+0065'||UTF-8(access token)\n Figure 11: User Name in CONNECT\n To this end, the access token MUST be encoded with base64url,\n omitting the \"=\" padding characters [RFC4648].\n The Password field MUST be set to the keyed message digest (MAC) or\n signature associated with the access token for PoP. The Client MUST\n apply the PoP key on the challenge derived from the TLS session, as\n described in Section 2.2.4.2.1.\n6.2. Handling Authorization Errors\n Error handling is more primitive in MQTT v3.1.1 due to not having\n appropriate error fields, error codes, and server-side DISCONNECTs.\n Therefore, the Broker will disconnect on almost any error and may not\n keep the Session State, necessitating that clients make a greater\n effort to ensure that tokens remain valid and do not attempt to\n publish to topics that they do not have permissions for. The\n following lists how the Broker responds to specific errors.\n CONNECT without a token:\n The tokenless CONNECT attempt MUST fail. This is because the\n challenge-response-based PoP is not possible for MQTT v3.1.1.\n It is also not possible to support AS discovery since a\n CONNACK packet in MQTT v3.1.1 does not include a means to\n provide additional information to the Client. Therefore, AS\n discovery needs to take place out of band.\n Client-Broker PUBLISH authorization failure:\n In the case of a failure, it is not possible to return an\n error in MQTT v3.1.1. Acknowledgment messages only indicate\n success. In the case of an authorization error, the Broker\n MUST ignore the PUBLISH packet and disconnect the Client.\n Also, as DISCONNECT packets are only sent from a Client to\n the Broker, the server disconnection needs to take place\n below the application layer.\n SUBSCRIBE authorization failure:\n In the SUBACK packet, the return code is 0x80, indicating\n failure for the unauthorized topic(s). Note that, in both\n MQTT versions, a reason code is returned for each Topic\n Filter.\n Broker-Client PUBLISH authorization failure:\n When the Broker is forwarding PUBLISH packets to the\n subscribed Clients, it may discover that some of the\n subscribers are no longer authorized due to expired tokens.\n These token expirations MUST lead to disconnecting the Client\n rather than silently dropping messages."
},
{
"section_number": "7.",
"section_name": "IANA Considerations",
"tag": "Section 7. IANA Considerations",
"content": "7.1. TLS Exporter Labels Registration\n This document registers \"EXPORTER-ACE-MQTT-Sign-Challenge\"\n (introduced in Section 2.2.4.2.1 in this document) in the \"TLS\n Exporter Labels\" registry [RFC8447].\n Recommended: N\n DTLS-OK: N\n Reference: RFC 9431\n7.2. Media Type Registration\n This document registers the \"application/ace+json\" media type for\n messages of the protocols defined in this document carrying\n parameters encoded in JSON.\n Type name: application\n Subtype name: ace+json\n Required parameters: N/A\n Optional parameters: N/A\n Encoding considerations: Encoding considerations are identical to\n those specified for the \"application/json\" media type.\n Security considerations: Section 8 of RFC 9431\n Interoperability considerations: none\n Published specification: RFC 9431\n Applications that use this media type: This media type is intended\n for Authorization-Server-Client and Authorization-Server-Resource-\n Server communication as part of the ACE framework using JSON\n encoding, as specified in RFC 9431.\n Fragment identifier considerations: none\n Additional information:\n Deprecated alias names for this type: none\n Magic number(s): none\n File extension(s): none\n Macintosh file type code(s): none\n Person & email address to contact for further information:\n Cigdem Sengul <csengul@acm.org>\n Intended usage: COMMON\n Restrictions on usage: none\n Author: Cigdem Sengul <csengul@acm.org>\n Change controller: IETF\n7.3. ACE OAuth Profile Registration\n The following registrations have been made in the \"ACE Profiles\"\n registry, following the procedure specified in [RFC9200].\n Name: mqtt_tls\n Description: Profile for delegating Client authentication and\n authorization using MQTT for the Client and Broker (RS)\n interactions and HTTP for the AS interactions. TLS is used for\n confidentiality and integrity protection and server\n authentication. Client authentication can be provided either via\n TLS or using in-band PoP validation at the MQTT application layer.\n CBOR Value: 3\n Reference: RFC 9431\n7.4. AIF\n For the media types \"application/aif+cbor\" and \"application/\n aif+json\", defined in Section 5.1 of [RFC9237], IANA has registered\n the following entries for the two media type parameters Toid and\n Tperm in the respective subregistry defined in Section 5.2 of\n [RFC9237] within the \"Media Type Sub-Parameter Registries\".\n For Toid:\n Name: mqtt-topic-filter\n Description/Specification: Topic Filter, as defined in\n Section 2.3 of RFC 9431.\n Reference: RFC 9431, Section 2.3\n For Tperm:\n Name: mqtt-permissions\n Description/Specification: Permissions for the MQTT Client, as\n defined in Section 2.3 of RFC 9431. Tperm is an array of one\n or more text strings that each have a value of either \"pub\" or\n \"sub\".\n Reference: RFC 9431, Section 2.3"
},
{
"section_number": "8.",
"section_name": "Security Considerations",
"tag": "Section 8. Security Considerations",
"content": "This document specifies a profile for the Authentication and\n Authorization for Constrained Environments (ACE) framework [RFC9200].\n Therefore, the security considerations outlined in [RFC9200] apply to\n this work.\n In addition, the security considerations outlined in the MQTT v5.0\n OASIS Standard [MQTT-OASIS-Standard-v5] and MQTT v3.1.1 OASIS\n Standard [MQTT-OASIS-Standard-v3.1.1] apply. Mainly, this document\n provides an authorization solution for MQTT, the responsibility of\n which is left to the specific implementation in the MQTT standards.\n In the following, we comment on a few relevant issues based on the\n current MQTT specifications.\n After the Broker validates an access token and accepts a connection\n from a client, it caches the token to authorize a Client's publish\n and subscribe requests in an ongoing Session. The Broker does not\n cache any tokens that cannot be validated. If a Client's permissions\n get revoked, but the access token has not expired, the Broker may\n still grant publish/subscribe to revoked topics. If the Broker\n caches the token introspection responses, then the Broker SHOULD use\n a reasonable cache timeout to introspect tokens regularly. The\n timeout value is application specific and should be chosen to reduce\n the risk of using stale introspection responses. When permissions\n change dynamically, it is expected that the AS also follows a\n reasonable expiration strategy for the access tokens.\n The Broker may monitor Client behavior to detect potential security\n problems, especially those affecting availability. These include\n repeated token transfer attempts to the public \"authz-info\" topic,\n repeated connection attempts, abnormal terminations, and Clients that\n connect but do not send any data. If the Broker supports the public\n \"authz-info\" topic, described in Section 2.2.2, then this may be\n vulnerable to a DDoS attack, where many Clients use the \"authz-info\"\n public topic to transport tokens that are not meant to be used and\n that the Broker may need to store until they expire.\n For MQTT v5.0, when a Client connects with a long Session Expiry\n Interval, the Broker may need to maintain the Client's MQTT Session\n State after it disconnects for an extended period. For MQTT v3.1.1,\n the Session State may need to be stored indefinitely, as it does not\n have a Session Expiry Interval feature. The Broker SHOULD implement\n administrative policies to limit misuse by the Client resulting from\n continuing existing Sessions."
},
{
"section_number": "9.",
"section_name": "Privacy Considerations",
"tag": "Section 9. Privacy Considerations",
"content": "The privacy considerations outlined in [RFC9200] apply to this work.\n In MQTT, the Broker is a central trusted party and may forward\n potentially sensitive information between Clients. The mechanisms\n defined in this document do not protect the contents of the PUBLISH\n packet from the Broker, and hence, the content of the PUBLISH packet\n is not signed or encrypted separately for the subscribers. This\n functionality may be implemented using the proposal outlined in the\n ACE Pub-Sub Profile [ACE-PUBSUB-PROFILE]. However, this solution\n would still not provide privacy for other fields of the packet, such\n as Topic Name."
},
{
"section_number": "10.",
"section_name": "References",
"tag": "Section 10. References",
"content": "10.1. Normative References\n [MQTT-OASIS-Standard-v3.1.1]\n Banks, A., Ed. and R. Gupta, Ed., \"MQTT Version 3.1.1 Plus\n Errata 01\", OASIS Standard, December 2015,\n <https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-\n v3.1.1.html>.\n [MQTT-OASIS-Standard-v5]\n Banks, A., Ed., Briggs, E., Ed., Borgendale, K., Ed., and\n R. Gupta, Ed., \"MQTT Version 5.0\", OASIS Standard, March\n 2019, <https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-\n v5.0.html>.\n [RFC2119] Bradner, S., \"Key words for use in RFCs to Indicate\n Requirement Levels\", BCP 14, RFC 2119,\n <https://www.rfc-editor.org/info/rfc2119>.\n [RFC4648] Josefsson, S., \"The Base16, Base32, and Base64 Data\n <https://www.rfc-editor.org/info/rfc4648>.\n [RFC5705] Rescorla, E., \"Keying Material Exporters for Transport\n Layer Security (TLS)\", RFC 5705, DOI 10.17487/RFC5705,\n [RFC6066] Eastlake 3rd, D., \"Transport Layer Security (TLS)\n Extensions: Extension Definitions\", RFC 6066,\n <https://www.rfc-editor.org/info/rfc6066>.\n [RFC6234] Eastlake 3rd, D. and T. Hansen, \"US Secure Hash Algorithms\n (SHA and SHA-based HMAC and HKDF)\", RFC 6234,\n <https://www.rfc-editor.org/info/rfc6234>.\n [RFC6749] Hardt, D., Ed., \"The OAuth 2.0 Authorization Framework\",\n <https://www.rfc-editor.org/info/rfc6749>.\n [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,\n Weiler, S., and T. Kivinen, \"Using Raw Public Keys in\n Transport Layer Security (TLS) and Datagram Transport\n Layer Security (DTLS)\", RFC 7250, DOI 10.17487/RFC7250,\n [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan,\n \"Transport Layer Security (TLS) Application-Layer Protocol\n Negotiation Extension\", RFC 7301, DOI 10.17487/RFC7301,\n [RFC7516] Jones, M. and J. Hildebrand, \"JSON Web Encryption (JWE)\",\n <https://www.rfc-editor.org/info/rfc7516>.\n [RFC7517] Jones, M., \"JSON Web Key (JWK)\", RFC 7517,\n <https://www.rfc-editor.org/info/rfc7517>.\n [RFC7519] Jones, M., Bradley, J., and N. Sakimura, \"JSON Web Token\n <https://www.rfc-editor.org/info/rfc7519>.\n [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A.,\n Langley, A., and M. Ray, \"Transport Layer Security (TLS)\n Session Hash and Extended Master Secret Extension\",\n <https://www.rfc-editor.org/info/rfc7627>.\n [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, \"Proof-of-\n Possession Key Semantics for JSON Web Tokens (JWTs)\",\n <https://www.rfc-editor.org/info/rfc7800>.\n [RFC8032] Josefsson, S. and I. Liusvaara, \"Edwards-Curve Digital\n Signature Algorithm (EdDSA)\", RFC 8032,\n <https://www.rfc-editor.org/info/rfc8032>.\n [RFC8174] Leiba, B., \"Ambiguity of Uppercase vs Lowercase in RFC\n 2119 Key Words\", BCP 14, RFC 8174, DOI 10.17487/RFC8174,\n [RFC8422] Nir, Y., Josefsson, S., and M. Pegourie-Gonnard, \"Elliptic\n Curve Cryptography (ECC) Cipher Suites for Transport Layer\n Security (TLS) Versions 1.2 and Earlier\", RFC 8422,\n <https://www.rfc-editor.org/info/rfc8422>.\n [RFC8442] Mattsson, J. and D. Migault, \"ECDHE_PSK with AES-GCM and\n AES-CCM Cipher Suites for TLS 1.2 and DTLS 1.2\", RFC 8442,\n <https://www.rfc-editor.org/info/rfc8442>.\n [RFC8446] Rescorla, E., \"The Transport Layer Security (TLS) Protocol\n <https://www.rfc-editor.org/info/rfc8446>.\n [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, \"Concise Data\n Definition Language (CDDL): A Notational Convention to\n Express Concise Binary Object Representation (CBOR) and\n JSON Data Structures\", RFC 8610, DOI 10.17487/RFC8610,\n [RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.\n Tschofenig, \"Proof-of-Possession Key Semantics for CBOR\n Web Tokens (CWTs)\", RFC 8747, DOI 10.17487/RFC8747, March\n 2020, <https://www.rfc-editor.org/info/rfc8747>.\n [RFC9052] Schaad, J., \"CBOR Object Signing and Encryption (COSE):\n Structures and Process\", STD 96, RFC 9052,\n <https://www.rfc-editor.org/info/rfc9052>.\n [RFC9110] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,\n Ed., \"HTTP Semantics\", STD 97, RFC 9110,\n <https://www.rfc-editor.org/info/rfc9110>.\n [RFC9200] Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and\n H. Tschofenig, \"Authentication and Authorization for\n Constrained Environments Using the OAuth 2.0 Framework\n <https://www.rfc-editor.org/info/rfc9200>.\n [RFC9201] Seitz, L., \"Additional OAuth Parameters for Authentication\n and Authorization for Constrained Environments (ACE)\",\n <https://www.rfc-editor.org/info/rfc9201>.\n [RFC9202] Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and\n L. Seitz, \"Datagram Transport Layer Security (DTLS)\n Profile for Authentication and Authorization for\n Constrained Environments (ACE)\", RFC 9202,\n <https://www.rfc-editor.org/info/rfc9202>.\n [RFC9237] Bormann, C., \"An Authorization Information Format (AIF)\n for Authentication and Authorization for Constrained\n Environments (ACE)\", RFC 9237, DOI 10.17487/RFC9237,\n [RFC9360] Schaad, J., \"CBOR Object Signing and Encryption (COSE):\n Header Parameters for Carrying and Referencing X.509\n Certificates\", RFC 9360, DOI 10.17487/RFC9360, February\n 2023, <https://www.rfc-editor.org/info/rfc9360>.\n [RFC9430] Bergmann, O., Preu\u00df Mattsson, J., and G. Selander,\n \"Extension of the Datagram Transport Layer Security (DTLS)\n Profile for Authentication and Authorization for\n Constrained Environments (ACE) to Transport Layer Security\n <https://www.rfc-editor.org/info/rfc9430>.\n10.2. Informative References\n [ACE-PUBSUB-PROFILE]\n Palombini, F., Sengul, C., and M. Tiloca, \"Publish-\n Subscribe Profile for Authentication and Authorization for\n Constrained Environments (ACE)\", Work in Progress,\n Internet-Draft, draft-ietf-ace-pubsub-profile-06, 13 March\n 2023, <https://datatracker.ietf.org/doc/html/draft-ietf-\n ace-pubsub-profile-06>.\n [Fremantle14]\n Fremantle, P., Aziz, B., Kopecky, J., and P. Scott,\n \"Federated Identity and Access Management for the Internet\n of Things\", International Workshop on Secure Internet of\n Things, DOI 10.1109/SIoT.2014.8, September 2014,\n <https://dx.doi.org/10.1109/SIoT.2014.8>.\n [RFC4949] Shirey, R., \"Internet Security Glossary, Version 2\",\n <https://www.rfc-editor.org/info/rfc4949>.\n [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, \"The Constrained\n Application Protocol (CoAP)\", RFC 7252,\n <https://www.rfc-editor.org/info/rfc7252>.\n [RFC7925] Tschofenig, H., Ed. and T. Fossati, \"Transport Layer\n Security (TLS) / Datagram Transport Layer Security (DTLS)\n Profiles for the Internet of Things\", RFC 7925,\n <https://www.rfc-editor.org/info/rfc7925>.\n [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig,\n \"CBOR Web Token (CWT)\", RFC 8392, DOI 10.17487/RFC8392,\n [RFC8447] Salowey, J. and S. Turner, \"IANA Registry Updates for TLS\n <https://www.rfc-editor.org/info/rfc8447>.\n [RFC8949] Bormann, C. and P. Hoffman, \"Concise Binary Object\n Representation (CBOR)\", STD 94, RFC 8949,\n <https://www.rfc-editor.org/info/rfc8949>.\n [RFC9325] Sheffer, Y., Saint-Andre, P., and T. Fossati,\n \"Recommendations for Secure Use of Transport Layer\n Security (TLS) and Datagram Transport Layer Security\n (DTLS)\", BCP 195, RFC 9325, DOI 10.17487/RFC9325, November\n 2022, <https://www.rfc-editor.org/info/rfc9325>.\n [TLS-bis] Rescorla, E., \"The Transport Layer Security (TLS) Protocol\n Version 1.3\", Work in Progress, Internet-Draft, draft-\n ietf-tls-rfc8446bis-09, 7 July 2023,\n <https://datatracker.ietf.org/doc/html/draft-ietf-tls-\n rfc8446bis-09>."
},
{
"section_number": "Appendix A.",
"section_name": "Checklist for Profile Requirements",
"tag": "Section Appendix A. Checklist for Profile Requirements",
"content": "Based on the requirements on profiles for the ACE framework\n [RFC9200], this document fulfills the following:\n * Optional AS discovery: AS discovery is supported with the MQTT\n v5.0 described in Section 2.2.\n * The communication protocol between the Client and Broker (RS):\n MQTT\n * The security protocol between the Client and RS: TLS\n * Client and RS mutual authentication: Several options are possible\n and described in Section 2.2.1.\n * Proof-of-possession protocols: Both symmetric and asymmetric keys\n are supported, as specified in Section 2.2.4.2.\n * Content-Format: For the HTTPS interactions with AS, \"application/\n ace+json\".\n * Unique profile identifier: mqtt_tls\n * Token introspection: The RS uses the HTTPS introspection interface\n of the AS.\n * Token request: The Client or its Client AS uses the HTTPS token\n endpoint of the AS.\n * authz-info endpoint: It MAY be supported using the method\n described in Section 2.2.2 but is not protected other than by the\n TLS channel between the Client and RS.\n * Token transport: Via the \"authz-info\" topic, TLS with PSKs\n (provided as a PSK identity), or in the MQTT CONNECT packet for\n both versions of MQTT. The AUTH extensions can also be used for\n authentication and reauthentication for MQTT v5.0, as described in\n Sections 2.2 and 4.\nAcknowledgments\n The authors would like to thank Ludwig Seitz for his review and his\n input on the authorization information endpoint; Benjamin Kaduk for\n his review, insightful comments, and contributions to resolving\n issues; and Carsten Bormann for his review and revisions to the AIF-\n MQTT data model. The authors would like to thank Paul Fremantle for\n the initial discussions on MQTT v5.0 support.\nAuthors' Addresses\n Cigdem Sengul\n Brunel University\n Dept. of Computer Science\n Uxbridge\n UB8 3PH\n United Kingdom\n Email: csengul@acm.org\n Anthony Kirby\n Oxbotica\n 1a Milford House\n Mayfield Road, Summertown\n Oxford\n OX2 7EL\n United Kingdom\n Email: anthony@anthony.org"
}
]