Draft: draft-ietf-core-coap-tcp-tls

Commentary: ( includes original proposal for resolution of ; this may need further updates . )
Where NATs are still present, CoAP over TCP can also help with their
traversal.  NATs often calculate expiration timers based on the
transport layer protocol being used by application protocols.  Many
NATs are built around the assumption that a transport layer protocol
such as TCP gives them additional information about the session life
cycle and keep TCP-based NAT bindings around for a longer period.
UDP, on the other hand, does not provide such information to a NAT
and timeouts tend to be much shorter, as research confirms
HomeGateway.
Where NATs are still present, CoAP over TCP can also help with their
traversal.  NATs often calculate expiration timers based on the
transport layer protocol being used by application protocols.  Many
NATs are built around the assumption that a transport layer protocol,
such as TCP, gives them additional information about the session life
cycle and keep TCP-based NAT bindings around for a longer period.
UDP, on the other hand, does not provide such information to a NAT
and timeouts tend to be much shorter, as research confirms
HomeGateway.
The present document describes a shim header that conveys length
information about each CoAP message.  Modifications to CoAP beyond
the replacement of the message layer (e.g., to introduce further
optimizations) are intentionally avoided.
Conceptually, the CoAP over TCP/TLS specification replaces most of
CoAP's message layer by a new message adapter on top of TCP or TLS
that does provides a framing mechanism on top of the byte stream
provided by TCP/TLS, conveying the length information about each CoAP
message that on datagram transports is provided by the datagram layer
below (UDP, DTLS).
The message adapter also adds a way to use signaling messages to
perform various housekeeping operations on the TCP, see [I-D.bormann-
core-signaling].
When CoAP is used over TLS then some of the housekeeping features are
already available with the TLS Handshake protocol; less new
functionality is then required.
Modifications to CoAP beyond the replacement of the message layer
(e.g., to introduce further optimizations) are intentionally avoided.
The interaction model of CoAP over TCP is very similar to the one for
CoAP over UDP, with the key difference that using TCP voids the need
to provide certain transport layer protocol features, such as
reliable delivery, fragmentation and reassembly, as well as
congestion control, at the CoAP level.  The protocol stack is
illustrated in stack (derived from RFC7252, Figure 1).
The interaction model of CoAP over TCP is very similar to the one for
CoAP over UDP, with the key difference that using TCP voids the need
to provide certain transport layer protocol features at the CoAP
level, such as reliable delivery, fragmentation and reassembly, as
well as congestion control.  The protocol stack is illustrated in
stack (derived from RFC7252, Figure 1).
The CoAP message format defined in RFC7252, as shown in CoAP-Header,
relies on the datagram transport (UDP, or DTLS over UDP) for keeping
the individual messages separate.
The CoAP message format defined in RFC7252, as shown in CoAP-Header,
relies on the datagram transport (UDP, or DTLS over UDP) for keeping
the individual messages separate and for providing length
information.
This document defines how to convey CoAP over TCP and TLS.  It does
not introduce new vulnerabilities beyond those described already in
the CoAP specification.  CoAP RFC7252 makes use of DTLS 1.2 and this
specification consequently uses TLS 1.2 RFC5246.  CoAP MUST NOT be
used with older versions of TLS.  Guidelines for use of cipher suites
and TLS extensions can be found in I-D.ietf-dice-profile.
When CoAP is exchanged over TLS port 443, the "TLS Application
Layer Protocol Negotiation Extension" RFC7301 MUST be used to
allow demultiplexing at the server-side.
This document defines how to convey CoAP over TCP and TLS.  CoAP
RFC7252 makes use of DTLS 1.2 and this specification consequently
uses TLS 1.2 RFC5246.  CoAP MUST NOT be used with older versions of
TLS.  Guidelines for use of cipher suites and TLS extensions can be
found in I-D.ietf-dice-profile.
TLS does not protect the TCP header.  This may, for example, allow an
on-path adversary to terminate a TCP connection prematurely by
spoofing a TCP reset message.