Internet-Draft | Join-Proxy | August 2021 |
Richardson, et al. | Expires 10 February 2022 | [Page] |
This document defines a protocol to securely assign a Pledge to a domain, represented by a Registrar, using an intermediary node between Pledge and Registrar. This intermediary node is known as a "constrained Join Proxy".¶
This document extends the work of [RFC8995] by replacing the Circuit-proxy between Pledge and Registrar by a stateless/stateful constrained (CoAP) Join Proxy. It relays join traffic from the Pledge to the Registrar.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 10 February 2022.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
Enrolment of new nodes into networks with enrolled nodes present is described in [RFC8995] ("BRSKI") and makes use of Enrolment over Secure Transport (EST) [RFC7030] with [RFC8366] vouchers to securely enroll devices. BRSKI connects a new joining device (called Pledge) to "Registrars" via a Join Proxy.¶
The specified solutions use https and may be too large in terms of code space or bandwidth required for constrained devices. Constrained devices possibly part of constrained networks [RFC7228] typically implement the IPv6 over Low-Power Wireless personal Area Networks (6LoWPAN) [RFC4944] and Constrained Application Protocol (CoAP) [RFC7252].¶
CoAP can be run with the Datagram Transport Layer Security (DTLS) [RFC6347] as a security protocol for authenticity and confidentiality of the messages. This is known as the "coaps" scheme. A constrained version of EST, using Coap and DTLS, is described in [I-D.ietf-ace-coap-est]. The [I-D.ietf-anima-constrained-voucher] extends [I-D.ietf-ace-coap-est] with BRSKI artefacts such as voucher, request voucher, and the protocol extensions for constrained Pledges.¶
DTLS is a client-server protocol relying on the underlying IP layer to perform the routing between the DTLS Client and the DTLS Server. However, the new Pledge will not be IP routable until it is authenticated to the network. A new Pledge can only initially use a link-local IPv6 address to communicate with a neighbour on the same link [RFC6775] until it receives the necessary network configuration parameters. However, before the Pledge can receive these configuration parameters, it needs to authenticate itself to the network to which it connects.¶
During enrollment, a DTLS connection is required between Pledge and Registrar.¶
This document specifies a new form of Join Proxy and protocol to act as intermediary between Pledge and Registrar to relay DTLS messages between Pledge and Registrar. Two versions of the Join Proxy are specified:¶
1 A stateful Join Proxy that locally stores IP addresses during the connection. 2 A stateless Join Proxy that where the connection state is stored in the messages.¶
This document is very much inspired by text published earlier in [I-D.kumar-dice-dtls-relay]. [I-D.richardson-anima-state-for-joinrouter] outlined the various options for building a join proxy. [RFC8995] adopted only the Circuit Proxy method (1), leaving the other methods as future work. This document standardizes the CoAP/DTLS (method 4).¶
The following terms are defined in [RFC8366], and are used identically as in that document: artifact, imprint, domain, Join Registrar/Coordinator (JRC), Manufacturer Authorized Signing Authority (MASA), Pledge, Trust of First Use (TOFU), and Voucher.¶
The term "installation network" refers to all devices in the installation and the network connections between them. The term "installation IP_address" refers to the set of adresses which are routable over the whole installation network.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
As depicted in the Figure 1, the Pledge (P), in an LLN mesh can be more than one hop away from the Registrar (R) and not yet authenticated into the network.¶
In this situation, the Pledge can only communicate one-hop to its nearest neighbour, the Join Proxy (J) using their link-local IPv6 addresses. However, the Pledge (P) needs to communicate with end-to-end security with a Registrar to authenticate and get the relevant system/network parameters. If the Pledge (P), knowing the IP-address of the Registrar, initiates a DTLS connection to the Registrar, then the packets are dropped at the Join Proxy (J) since the Pledge (P) is not yet admitted to the network or there is no IP routability to Pledge (P) for any returned messages from the Registrar.¶
++++ multi-hop |R |---- mesh +--+ +--+ | | \ |J |........|P | ++++ \-----| | | | +--+ +--+ Registrar Join Proxy Pledge
Without routing the Pledge (P) cannot establish a secure connection to the Registrar (R) over multiple hops in the network.¶
Furthermore, the Pledge (P) cannot discover the IP address of the Registrar (R) over multiple hops to initiate a DTLS connection and perform authentication.¶
To overcome the problems with non-routability of DTLS packets and/or discovery of the destination address of the Registrar, the Join Proxy is introduced. This Join Proxy functionality is configured into all authenticated devices in the network which may act as a Join Proxy for Pledges. The Join Proxy allows for routing of the packets from the Pledge using IP routing to the intended Registrar. An authenticated Join Proxy can discover the routable IP address of the Registrar over multiple hops. The following Section 5 specifies the two Join Proxy modes. A comparison is presented in Section 6.¶
A Join Proxy can operate in two modes:¶
A Join Proxy MUST implement one of the two modes. A Join Proxy MAY implement both, with an unspecified mechanism to switch between the two modes.¶
In stateful mode, the Join Proxy forwards the DTLS messages to the Registrar.¶
Assume that the Pledge does not know the IP address of the Registrar it needs to contact. The Join Proxy has has been enrolled via the Registrar and learns the IP address and port of the Registrar, for example by using the discovery mechanism described in Section 7. The Pledge first discovers (see Section 7) and selects the most appropriate Join Proxy. (Discovery can also be based upon [RFC8995] section 4.1, or via DNS-SD service discovery [RFC6763]). The Pledge initiates its request as if the Join Proxy is the intended Registrar. The Join Proxy receives the message at a discoverable "Join" port. The Join Proxy constructs an IP packet by copying the DTLS payload from the message received from the Pledge, and provides source and destination addresses to forward the message to the intended Registrar. The Join Proxy maintains a 4-tuple array to translate the DTLS messages received from the Registrar and forward it back to the Pledge.¶
In Figure 2 the various steps of the message flow are shown, with 5684 being the standard coaps port:¶
+------------+------------+-------------+--------------------------+ | Pledge | Join Proxy | Registrar | Message | | (P) | (J) | (R) | Src_IP:port | Dst_IP:port| +------------+------------+-------------+-------------+------------+ | --ClientHello--> | IP_P:p_P | IP_Ja:p_J | | --ClientHello--> | IP_Jb:p_Jb| IP_R:5684 | | | | | | <--ServerHello-- | IP_R:5684 | IP_Jb:p_Jb | | : | | | | <--ServerHello-- : | IP_Ja:p_J | IP_P:p_P | | : : | | | | [DTLS messages] | : | : | | : : | : | : | | --Finished--> : | IP_P:p_P | IP_Ja:p_J | | --Finished--> | IP_Jb:p_Jb| IP_R:5684 | | | | | | <--Finished-- | IP_R:5684 | IP_Jb:p_Jb | | <--Finished-- | IP_Ja:p_J | IP_P:p_P | | : : | : | : | +---------------------------------------+-------------+------------+ IP_P:p_P = Link-local IP address and port of Pledge (DTLS Client) IP_R:5684 = Routable IP address and coaps port of Registrar IP_Ja:P_J = Link-local IP address and join port of Join Proxy IP_Jb:p_Rb = Routable IP address and client port of Join proxy
The stateless Join Proxy aims to minimize the requirements on the constrained Join Proxy device. Stateless operation requires no memory in the Join Proxy device, but may also reduce the CPU impact as the device does not need to search through a state table.¶
If an untrusted Pledge that can only use link-local addressing wants to contact a trusted Registrar, and the Registrar is more than one hop away, it sends its DTLS messages to the Join Proxy.¶
When a Pledge attempts a DTLS connection to the Join Proxy, it uses its link-local IP address as its IP source address. This message is transmitted one-hop to a neighbouring (Join Proxy) node. Under normal circumstances, this message would be dropped at the neighbour node since the Pledge is not yet IP routable or is not yet authenticated to send messages through the network. However, if the neighbour device has the Join Proxy functionality enabled, it routes the DTLS message to its Registrar of choice.¶
The Join Proxy sends a "new" JPY message which includes the DTLS data as payload.¶
The JPY message payload consists of two parts:¶
On receiving the JPY message, the Registrar (or proxy) retrieves the two parts.¶
The Registrar transiently stores the Header field information. The Registrar uses the Contents field to execute the Registrar functionality. However, when the Registrar replies, it also extends its DTLS message with the header field in a JPY message and sends it back to the Join Proxy. The Registrar SHOULD NOT assume that it can decode the Header Field, it should simply repeat it when responding. The Header contains the original source link-local address and port of the Pledge from the transient state stored earlier and the Contents field contains the DTLS payload.¶
On receiving the JPY message, the Join Proxy retrieves the two parts. It uses the Header field to route the DTLS message containing the DTLS payload retrieved from the Contents field to the Pledge.¶
In this scenario, both the Registrar and the Join Proxy use discoverable "Join" ports, which may be the default ports.¶
The Figure 3 depicts the message flow diagram:¶
+--------------+------------+---------------+-----------------------+ | Pledge | Join Proxy | Registrar | Message | | (P) | (J) | (R) |Src_IP:port|Dst_IP:port| +--------------+------------+---------------+-----------+-----------+ | --ClientHello--> | IP_P:p_P |IP_Ja:p_Ja | | --JPY[H(IP_P:p_P),--> | IP_Jb:p_Jb|IP_R:p_Ra | | C(ClientHello)] | | | | <--JPY[H(IP_P:p_P),-- | IP_R:p_Ra |IP_Jb:p_Jb | | C(ServerHello)] | | | | <--ServerHello-- | IP_Ja:p_Ja|IP_P:p_P | | : | | | | [ DTLS messages ] | : | : | | : | : | : | | --Finished--> | IP_P:p_P |IP_Ja:p_Ja | | --JPY[H(IP_P:p_P),--> | IP_Jb:p_Jb|IP_R:p_Ra | | C(Finished)] | | | | <--JPY[H(IP_P:p_P),-- | IP_R:p_Ra |IP_Jb:p_Jb | | C(Finished)] | | | | <--Finished-- | IP_Ja:p_Ja|IP_P:p_P | | : | : | : | +-------------------------------------------+-----------+-----------+ IP_P:p_P = Link-local IP address and port of the Pledge IP_R:p_Ra = Routable IP address and join port of Registrar IP_Ja:p_Ja = Link-local IP address and join port of Join Proxy IP_Jb:p_Jb = Routable IP address and port of Join Proxy JPY[H(),C()] = Join Proxy message with header H and content C
The JPY message is constructed as a payload with media-type aplication/cbor¶
Header and Contents fields togther are one cbor array of 5 elements:¶
The join_proxy cannot decrypt the DTLS payload and has no knowledge of the transported media type.¶
JPY_message = [ ip : bstr, port : int, family : int, index : int payload : bstr ]
The content fields are DTLS encrypted. In CBOR diagnostic notation the payload JPY[H(IP_P:p_P)], will look like:¶
[h'IP_p', p_P, family, ident, h'DTLS-payload']¶
Examples are shown in Appendix A.¶
The stateful and stateless mode of operation for the Join Proxy have their advantages and disadvantages. This section should enable to make a choice between the two modes based on the available device resources and network bandwidth.¶
+-------------+----------------------------+------------------------+ | Properties | Stateful mode | Stateless mode | +-------------+----------------------------+------------------------+ | State |The Join Proxy needs | No information is | | Information |additional storage to | maintained by the Join | | |maintain mapping between | Proxy. Registrar needs | | |the address and port number | to store the packet | | |of the Pledge and those | header. | | |of the Registrar. | | +-------------+----------------------------+------------------------+ |Packet size |The size of the forwarded |Size of the forwarded | | |message is the same as the |message is bigger than | | |original message. |the original,it includes| | | |additional IP-addresses | +-------------+----------------------------+------------------------+ |Specification|The Join Proxy needs |New JPY message to | |complexity |additional functionality |encapsulate DTLS payload| | |to maintain state |The Registrar | | |information, and specify |and the Join Proxy | | |the source and destination |have to understand the | | |addresses of the DTLS |JPY message in order | | |handshake messages |to process it. | +-------------+----------------------------+------------------------+ | Ports | Join Proxy needs |Join Proxy and Registrar| | | discoverable "Join" port |need discoverable | | | | "Join" ports | +-------------+----------------------------+------------------------+
It is assumed that Join Proxy seamlessly provides a coaps connection between Pledge and Registrar. In particular this section replaces section 4.1 of [RFC8995].¶
The discovery follows two steps with two alternatives for step 1:¶
a. The Pledge is one hop away from the Registrar. The Pledge discovers the link-local address of the Registrar as described in [I-D.ietf-ace-coap-est]. From then on, it follows the BRSKI process as described in [I-D.ietf-ace-coap-est] and [I-D.ietf-anima-constrained-voucher], using link-local addresses.¶
b. The Pledge is more than one hop away from a relevant Registrar, and discovers the link-local address and join port of a Join Proxy. The Pledge then follows the BRSKI procedure using the link-local address of the Join Proxy.¶
Once a Pledge is enrolled, it may function as Join Proxy. The Join Proxy functions are advertised as descibed below. In principle, the Join Proxy functions are offered via a "join" port, and not the standard coaps port. Also the Registrar offers a "join" port to which the stateless join proxy sends the JPY message. The Join Proxy and Registrar show the extra join port number when reponding to a /.well-known/core discovery request addressed to the standard coap/coaps port.¶
Three discovery cases are discussed: Join_proxy discovers Registrar, Pledge discovers Registrar, and Pledge discovers Join-proxy. Each discovery case considers threa alternatives: coap discovery, 6tisch discovery and GRASP discovery.¶
In this section, the Pledge and Join Proxy are assumed to communicate via Link-Local addresses. This section describes the discovery of the Registrar by the Join-Proxy.¶
The discovery of the coaps Registrar, using coap discovery, by the Join Proxy follows section 6 of [I-D.ietf-ace-coap-est].¶
In the context of autonomous networks, the Join Proxy uses the DULL GRASP M_FLOOD mechanism to announce itself. Section 4.1.1 of [RFC8995] discusses this in more detail. The Registrar announces itself using ACP instance of GRASP using M_FLOOD messages. Autonomous Network Join Proxies MUST support GRASP discovery of Registrar as decribed in section 4.3 of [RFC8995] .¶
The discovery of Registrar by the Join-Proxy uses the enhanced beacons as discussed in [I-D.ietf-6tisch-enrollment-enhanced-beacon].¶
The Pledge MUST listen for GRASP M_FLOOD [I-D.ietf-anima-grasp] announcements of the objective: "AN_Proxy". See section Section 4.1.1 [RFC8995] for the details of the objective.¶
Not applicable.¶
The stateless Join Proxy can discover the join port of the Registrar by sending a GET request to "/.well-known/core" including a resource type (rt) parameter with the value "join-proxy" [RFC6690]. Upon success, the return payload will contain the join Port of the Registrar.¶
REQ: GET coap://[IP_address]/.well-known/core?rt=join-proxy RES: 2.05 Content <coaps://[IP_address]:join-port>; rt="join-proxy"¶
The discoverable port numbers are usually returned for Join Proxy resources in the <href> of the payload (see section 5.1 of [I-D.ietf-ace-coap-est]).¶
It should be noted here that the contents of the CBOR map used to convey return address information is not protected. However, the communication is between the Proxy and a known registrar are over the already secured portion of the network, so are not visible to eavesdropping systems.¶
All of the concerns in [RFC8995] section 4.1 apply. The Pledge can be deceived by malicious Join_Proxy announcements. The Pledge will only join a network to which it receives a valid [RFC8366] voucher [I-D.ietf-anima-constrained-voucher].¶
If the communicatione between Join-Proxy and Registrar passed over an unsecure network, then an attacker could change the cbor array, causing the Pledge to send traffic to another node. If the such scenario needed to be supported, then it would be reasonable for the Proxy to encrypt the CBOR array using a locally generated symmetric key. The Registrar would not be able to examine the result, but it does not need to do so. This is a topic for future work.¶
This document needs to create a registry for key indices in the CBOR map. It should be given a name, and the amending formula should be IETF Specification.¶
This specification registers a new Resource Type (rt=) Link Target Attributes in the "Resource Type (rt=) Link Target Attribute Values" subregistry under the "Constrained RESTful Environments (CoRE) Parameters" registry.¶
rt="brski-proxy". This BRSKI resource is used to query and return the supported BRSKI port of the Join Proxy. rt="join-proxy". This BRSKI resource is used to query and return the supported BRSKI port of the Registrar.¶
Many thanks for the comments by Brian Carpenter and Esko Dijk.¶
Sandeep Kumar, Sye loong Keoh, and Oscar Garcia-Morchon are the co-authors of the draft-kumar-dice-dtls-relay-02. Their draft has served as a basis for this document. Much text from their draft is copied over to this draft.¶
* Terminology updated * Several clarifications on discovery and routability * DTLS payload introduced¶
The examples show the request "GET coaps://192.168.1.200:5965/est/crts" to a Registrar. The header generated between Join-Proxy and Registrar and from Registrar to Join-Proxy are shown in detail. The DTLS payload is not shown.¶
The request from Join Proxy to Registrar looks like:¶
85 # array(5) 50 # bytes(16) FE800000000000000000FFFFC0A801C8 # 19 BDA7 # unsigned(48551) 0A # unsigned(10) 00 # unsigned(0) 58 2D # bytes(45) <cacrts DTLS encrypted request>¶
In CBOR Diagnostic:¶
[h'FE800000000000000000FFFFC0A801C8', 48551, 10, 0, h'<cacrts DTLS encrypted request>']¶
The response is:¶
85 # array(5) 50 # bytes(16) FE800000000000000000FFFFC0A801C8 # 19 BDA7 # unsigned(48551) 0A # unsigned(10) 00 # unsigned(0) 59 026A # bytes(618) <cacrts DTLS encrypted response>¶
In CBOR diagnostic:¶
[h'FE800000000000000000FFFFC0A801C8', 48551, 10, 0, h'<cacrts DTLS encrypted response>']¶