MMUSIC | J. Recio, Ed. |
Internet-Draft | Unaffiliated |
Intended status: Standards Track | C. Holmberg |
Expires: November 30, 2020 | Ericsson |
May 29, 2020 |
MSRP over Data Channels
draft-ietf-mmusic-msrp-usage-data-channel-17
This document specifies how the Message Session Relay Protocol (MSRP) can be transported as a WebRTC data channel sub-protocol, using the SDP offer/answer generic data channel negotiation framework to establish such a channel. Two network configurations are supported: connecting two MSRP over data channel endpoints; and a gateway configuration, connecting an MSRP over data channel endpoint with an MSRP over TCP or TLS endpoint. This document updates [RFC4975]
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 November 30, 2020.
Copyright (c) 2020 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.
The Message Session Relay Protocol (MSRP) [RFC4975] is a protocol for transmitting a series of related instant messages in the context of a session. In addition to instant messaging, MSRP can also be used for image sharing or file transfer. MSRP was initially defined in [RFC4975] to work over TCP and TLS connections, and over a WebSocket subprotocol specified by [RFC7977].
This document specifies the negotiation and transport of MSRP over a WebRTC data channel [I-D.ietf-rtcweb-data-channel]. Negotiation is carried out as specified in [I-D.ietf-mmusic-data-channel-sdpneg] and MSRP is transported as a sub-protocol of a WebRTC data channel, without the TCP and TLS layers.
Defining MSRP as a data channel sub-protocol has many benefits:
Compared to WebSockets, which provide a message passing protocol to applications with no direct access to TCP or TLS sockets, data channels provide a low latency transport, leverage NAT-aware connectivity and security features of WebRTC, and are increasingly available not only in modern browsers but in other applications that use WebRTC for media or other purposes, such as IoT or telemetry in general, non-media data exchange, and so on.
Considering an MSRP endpoint as an MSRP application that uses a WebRTC data channel, this document describes two configurations where the other endpoint is respectively either another MSRP over data channel endpoint (e.g., a WebRTC application) or an MSRP endpoint using either TCP or TLS transport.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
In this document, an MSRP data channel is a data channel for which the instantiated sub-protocol is "MSRP", and where the channel is negotiated using the SDP-based external negotiation method defined in [I-D.ietf-mmusic-data-channel-sdpneg].
The following WebRTC data channel property values [I-D.ietf-rtcweb-data-channel] apply to a MSRP data channel:
Property | Value |
---|---|
Subprotocol Identifier | msrp |
Transmission reliability | reliable |
Transmission order | in-order |
Label | See Section 4.3 |
This section describes the SDP considerations which are specific to a MSRP data channel
This document extends the MSRP URI syntax [RFC4975] by defining the new transport parameter value "dc":
transport /= "dc" ; Add "dc" to existing transports per [RFC4975]
MSRP design provides for new transport bindings, see Section 6 of [RFC4975], MSRP implementations are expected to allow unrecognized transports for which there is no need to establish a connection to the resource described by the URI, as it's the case of data channels (Section 4.4).
The msrp-scheme portion of the MSRP-URI that represents an MSRP data channel endpoint (used in the SDP path attribute and in the MSRP message headers) is always "msrps", which indicates that the MSRP data channel is always secured using DTLS as described in [I-D.ietf-rtcweb-data-channel].
An offerer and answerer SHALL, in each offer and answer, include a dcmap attribute line ([I-D.ietf-mmusic-data-channel-sdpneg]) within the media description of the SCTP association for each MSRP data channel session to be negotiated.
The attribute includes the following data channel parameters:
The labelstring is set by the MSRP application according to [I-D.ietf-mmusic-data-channel-sdpneg].
The offerer and answerer SHALL NOT include the max-retr and the max-time attribute parameters in the dcmap attribute.
The offerer and answerer MAY include the ordered attribute parameter in the dcmap attribute. If included, the attribute parameter value SHALL be set to "true".
Below is an example of the dcmap attribute for an MSRP session to be negotiated with stream-id=2 and label="chat":
a=dcmap:2 label="chat";subprotocol="msrp"
An offerer and answerer SHALL, in each offer and answer, include a dcsa attribute line ([I-D.ietf-mmusic-data-channel-sdpneg]) within the media description for the SCTP association for each MSRP-specific SDP attribute to be negotiated for each MSRP data channel being negotiated.
An offerer and answerer SHALL include a dcsa attribute for each of the following MSRP-specific SDP attributes:
It is considered a protocol error if one or more of the dcsa embedded attributes listed above are not included in an offer or answer.
An offerer and answerer MAY include a dcsa attribute for any of the following MSRP-specific SDP attributes, following the procedures defined for each attributes:
A subsequent offer or answer MAY update the previously negotiated MSRP subprotocol attributes while keeping the same subprotocol a=dcmap description. The semantics for newly negotiated MSRP subprotocol attributes are per [RFC4975].
When MSRP messages are transported on a data channel, the "path" attribute is not used for routing of the messages. The MSRP data channel is established using the SDP offer/answer procedures defined in [I-D.ietf-mmusic-data-channel-sdpneg], and the MSRP messages are then transported on that data channel. This is different from legacy MSRP [RFC4975] but similar to MSRP CEMA [RFC6714]. However, when an endpoint receives an MSRP message over a data channel, it MUST still perform the MSRP-URI comparison procedures defined in [RFC4975].
As described in Section 4.4, the usage of a dsca embedded setup attribute is mandated for MSRP sessions over data channels. It is used to negotiate which MSRP session endpoint assumes the active role as per Section 4.2.2 of [RFC6135] and Section 5.4 of [RFC4975]. It has no relationship with the DTLS connection establishment roles [I-D.ietf-mmusic-sctp-sdp].
The dcsa embedded setup attribute is of the form "a=dcsa:x setup:<role>", with x being the data channel's SCTP stream identifier, so that such attribute is explicitly associated with an MSRP session over a specific data channel.
An MSRP session is closed by closing the associated data channel, following the procedures in [I-D.ietf-mmusic-data-channel-sdpneg].
The port value for the "m=" line SHOULD NOT be changed (e.g. to zero) when closing an MSRP session (unless all data channels are being closed and the SCTP association is no longer needed), since this would close the SCTP association and impact all of the data channels. In all cases in [RFC4975] where the procedure calls for setting the port to zero for the MSRP "m=" line in an SDP offer for TCP transport, the SDP offerer of an MSRP session with data channel transport SHALL remove the corresponding dcmap and dcsa attributes.
The SDP answerer must ensure that no dcmap or dcsa attributes are present in the SDP answer if no corresponding attributes are present in the received SDP offer.
SDP attributes specified in [RFC5547] for a file transfer "m=" line are embedded as subprotocol-specific attributes using the syntax defined in [I-D.ietf-mmusic-data-channel-sdpneg].
The following is an example of an "m=" line for data channels in an SDP offer that includes the attributes needed to establish two MSRP sessions: one for chat and one for file transfer. The example is derived from a combination of examples in [RFC4975] and [RFC5547].
m=application 54111 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 198.51.100.79 a=max-message-size:100000 a=sctp-port:5000 a=setup:actpass a=fingerprint:SHA-1 \ 4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB a=tls-id:4a756565cddef001be82 a=dcmap:0 label="chat";subprotocol="msrp" a=dcsa:0 msrp-cema a=dcsa:0 setup:active a=dcsa:0 accept-types:message/cpim text/plain a=dcsa:0 path:msrps://198.51.100.79:54111/si438dsaodes;dc a=dcmap:2 label="file transfer";subprotocol="msrp" a=dcsa:2 sendonly a=dcsa:2 msrp-cema a=dcsa:2 setup:active a=dcsa:2 accept-types:message/cpim a=dcsa:2 accept-wrapped-types:* a=dcsa:2 path:msrps://198.51.100.79:54111/jshA7we;dc a=dcsa:2 file-selector:name:"picture1.jpg" \ type:image/jpeg size:1463440 hash:sha-1:\ FF:27:0D:81:14:F1:8A:C3:35:3B:36:64:2A:62:C9:3E:D3:6B:51:B4 a=dcsa:2 file-transfer-id:rjEtHAcYVZ7xKwGYpGGwyn5gqsSaU7Ep a=dcsa:2 file-disposition:attachment a=dcsa:2 file-date:creation:"Mon, 12 Jan 2018 15:01:31 +0800" a=dcsa:2 file-icon:cid:id2@bob.example.com a=dcsa:2 file-range:1-1463440
The procedures specified in [RFC4975] apply except when this document specifies otherwise. This section describes the MSRP considerations specific to a MSRP data channel.
In this document, each MSRP session maps to one data channel exactly.
Section 4.5 describes how the active MSRP session endpoint role is negotiated. The active MSRP session endpoint uses the data channel established for this MSRP session by the generic data channel opening procedure defined in [I-D.ietf-mmusic-data-channel-sdpneg].
As soon as the WebRTC data channel is opened, the MSRP session is actually opened by the active MSRP session endpoint. In order to do this the active MSRP endpoint sends an MSRP SEND message (empty or not) to the other MSRP endpoint.
The closure of an MSRP session SHALL be signaled via SDP following the requirements in Section 4.6
If the data channel used to transport the MSRP session fails and gets torn down, the endpoints SHALL consider the MSRP session failed. An MSRP endpoint MAY, based on local policy, try to negotiate a new MSRP data channel.
Each text-based MSRP message is sent on the corresponding SCTP stream using standard MSRP framing and chunking procedures, as defined in [RFC4975], with each MSRP chunk delivered in a single SCTP user message. Therefore all sent MSRP chunks including the MSRP chunk header SHALL have lengths of less than or equal to the value of the peer's "a=max-message-size" attribute, which is associated with the data channel's SCTP association.
Data sending, receiving and reporting procedures SHALL conform to [RFC4975].
[RFC5547] defines an end-to-end file transfer method based on MSRP and the SDP offer/answer mechanism. This file transfer method is also usable by MSRP endpoints using data channels, with the following considerations:
This section describes the network configuration where one MSRP endpoint uses a MSRP data channel as MSRP transport, the other MSRP endpoint uses TLS/TCP connections as MSRP transport, and the two MSRP endpoints interwork via a gateway.
Specifically, a gateway can be configured to interwork an MSRP session over a data channel with a peer that does not support data channel transport in one of two ways.
In one model, the gateway performs as a MSRP B2BUA to interwork all the procedures as necessary between the endpoints. No further specification is needed for this model.
Alternately, the gateway can provide transport level interworking between MSRP endpoints using different transport protocols. In accordance with Section 4.4, path attributes SHALL NOT be used for transport level interworking.
When the gateway performs transport level interworking between MSRP endpoints, all of the procedures in Section 5 and Section 4 apply to each peer, with the following additions:
This document updates [RFC4975], by allowing the usage of the "msrps" scheme when the underlying connection is protected with DTLS.
MSRP traffic over data channels is secured, including confidentiality, integrity and source authentication, as specified by [I-D.ietf-rtcweb-data-channel]
Note that discussion in [RFC4975] on MSRP message attribution to remote identities applies to data channel transport.
This document modifies the usage of the msrps URI scheme, registered by [RFC4975], adding DTLS as a protected transport indicated by the URI scheme.
This document adds a reference to the subprotocol identifier "msrp" in the "WebSocket Subprotocol Name Registry"
NOTE to RFC Editor: Please replace "XXXX" with the number of this RFC.
This document modifies the usage of the SDP setup attribute, if this attribute is embedded in a dcsa attribute and associated with an MSRP session over a data channel. The modified usage is described in Section 4.5.
Usage level "dcsa(MSRP)" should be added to the IANA registration of the SDP setup attribute as follows:
Contact name: | IESG |
Contact email: | iesg@ietf.org |
Attribute name: | setup |
Usage level: | dcsa(MSRP) |
Purpose: | Negotiate the active role of an MSRP session over a data channel as per Section 4.5 |
Reference: | RFCXXXX |
The authors wish to acknowledge the borrowing of ideas from another internet draft by Peter Dunkley and Gavin Llewellyn, and to thank Flemming Andreasen, Christian Groves, Paul Kyzivat, Jonathan Lennox, Uwe Rauschenbach, Albrecht Schwarz, and Keith Drage for their invaluable comments.
Richard Ejzak, Keith Drage and Juergen Stoetzer-Bradler contributed an earlier version, before the draft was re-adopted.
Julien Maisonneuve helped with the re-adoption of the draft, and Maridi R. Makaraju (Raju) contributed valuable comments after the draft was re-adopted.