Message Session Relay Protocol (MSRP) over Data Channels
Unaffiliated
jose@ch3m4.com
Ericsson
Hirsalantie 11
Jorvas
02420
Finland
christer.holmberg@ericsson.com
ART
MMUSIC
webrtc
This document specifies how a Web Real-Time Communication (WebRTC)
data channel can be used as a transport mechanism for the Message Session Relay Protocol (MSRP)
and how the Session Description Protocol (SDP) offer/answer mechanism can be used to negotiate
such a data channel, referred to as an MSRP data channel. Two network configurations are supported:
the connection of two MSRP data channel endpoints; and a gateway configuration, which connects an MSRP data channel
endpoint with an MSRP endpoint that uses either TCP or TLS. This document updates RFC 4975.
Introduction
The Message Session Relay Protocol (MSRP) 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 to work over
TCP and TLS connections, and over a WebSocket subprotocol specified by .
This document specifies how a Web Real-Time Communication (WebRTC)
data channel can be used as a transport mechanism for MSRP
without the TCP and TLS layers, and how the Session Description Protocol (SDP) offer/answer
mechanism for data channels can be used
to negotiate such a data channel.
In this document, an MSRP data channel refers to a WebRTC data
channel for which the instantiated subprotocol is "msrp" and
the data channel is negotiated using the SDP offer/answer mechanism
.
Defining MSRP as a data channel subprotocol has many benefits:
- provides to applications a proven protocol enabling instant messaging, file transfer, image sharing
- integrates those features with other WebRTC voice, video, and data features
- leverages the SDP-based negotiation already defined for MSRP
- allows the interworking with MSRP endpoints running on a TCP or TLS connection
Compared to the WebSocket protocol, which provides a message-passing protocol to applications with no direct access to
TCP or TLS sockets, data channels provide a low-latency transport and leverage NAT-aware connectivity and
the security features of WebRTC.
This document defines an MSRP data channel endpoint as an MSRP application that
uses a WebRTC data channel for MSRP transport. This document describes
configurations for connecting such endpoint to another MSRP data channel endpoint,
or to an MSRP endpoint that uses either TCP or TLS transport.
This document updates as described in .
Conventions
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 when, and only when, they appear in all capitals, as
shown here.
WebRTC Data Channel Considerations
MSRP Data Channel
The following WebRTC data channel property values
apply to an MSRP data channel:
Property |
Value |
Subprotocol Identifier |
msrp |
Transmission reliability |
reliable |
Transmission order |
in-order |
Label |
See
|
SDP Considerations
The generic SDP considerations, including the SDP offer/answer
procedures , for negotiating a WebRTC data channel are
defined in . This section
and its subsections define the SDP considerations that are specific to an MSRP data channel,
identified by the "subprotocol" attribute parameter, with an "msrp" parameter value
in the 'dcmap' attribute.
MSRP URI
This document extends the MSRP URI syntax by defining the new transport parameter value "dc" (an abbreviation of data channel):
MSRP design provides for new transport bindings (see ).
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 is the case of data channels ().
MSRP URI msrp-scheme
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 .
Use of the 'dcmap' Attribute
An offerer and answerer SHALL, in each offer and answer,
include a 'dcmap' attribute in the SDP
media description ("m=" section) describing the SCTP association used to realize the MSRP data channel.
The attribute includes the following data channel parameters:
- "label=" labelstring
- "subprotocol=" "msrp"
The labelstring is set by the MSRP application according to .
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 a 'dcmap' attribute for an MSRP session to be
negotiated with the "dcmap-stream-id" parameter set to 2 and the "label" parameter set to "chat":
Use of the 'dcsa' Attribute
An offerer and answerer can, in each offer and answer, include one or
more data channel subprotocol attributes ('dcsa' attributes) in
the "m=" section describing the SCTP association used to realize the
MSRP data channel. An SDP attribute included in a 'dcsa' attribute is referred
to as a DCSA-embedded attribute.
If an offerer or answerer receives a 'dcsa' attribute that contains
an SDP attribute for which usage has not been defined for an MSRP data
channel, the offerer or answerer should ignore the 'dcsa' attribute,
following the rules in .
An offerer and answerer SHALL include a 'dcsa' attribute for each of the following MSRP-specific SDP attributes:
- defined in : 'path'.
- defined in : 'msrp-cema'.
- defined in : 'setup'.
See .
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 attribute:
- defined in : 'accept-types', 'accept-wrapped-types', and 'max-size'.
- defined in : 'sendonly', 'recvonly', 'inactive', and 'sendrecv'.
- defined in : all the parameters related to MSRP file transfer. See .
A subsequent offer or answer MAY update the previously negotiated MSRP subprotocol attributes
while keeping the 'dcmap' attribute associated with the MSRP data channel unchanged. The semantics
for newly negotiated MSRP subprotocol attributes are per .
When MSRP messages are transported on a data channel, the 'path' attribute is not used for the routing
of the messages. The MSRP data channel is established using the SDP offer/answer procedures defined
in , and the MSRP messages are then transported
on that data channel. This is different from legacy MSRP but similar to
MSRP Connection Establishment for Media Anchoring (MSRP CEMA) .
Because of this, a DCSA-embedded 'msrp-cema' attribute is
mandated for MSRP sessions over data channels. However, when an endpoint receives an MSRP message
over a data channel, it MUST still perform the MSRP URI comparison procedures defined in
.
Use of the DCSA-Embedded 'setup' Attribute
As described in , the usage of a
DCSA-embedded 'setup' attribute is mandated for MSRP sessions over data channels.
It is used to negotiate which MSRP data channel endpoint assumes the active role as per
and
. It has no relationship with the DTLS connection establishment roles .
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
the 'setup' attribute is explicitly associated with an MSRP session over a specific data channel.
Session Closing
An MSRP session is closed by closing the associated data channel
following the procedures in .
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 where the procedure
calls for setting the port to zero in 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.
Support for MSRP File Transfer Function
SDP attributes specified in for a file transfer "m=" line are embedded as subprotocol-specific attributes using the syntax defined in .
Example
Below is an example of an offer and an answer that include 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 and .
Offer:
Answer:
Note that due to RFC formatting conventions, this document splits
SDP content that exceeds 72 characters across lines, marking this
line folding with a backslash character. This backslash and its
trailing CRLF and whitespace would not appear in actual SDP content.
MSRP Considerations
The procedures specified in apply except when this document specifies otherwise. This section describes the MSRP considerations specific to an MSRP data channel.
Session Mapping
In this document, each MSRP session maps to one data channel exactly.
Session Opening
describes how the active MSRP data channel endpoint role is negotiated. The active MSRP data channel endpoint uses the data channel established for this MSRP session by the generic data channel opening procedure defined in .
As soon as the WebRTC data channel is opened, the MSRP session is actually opened by the active MSRP data channel endpoint.
In order to do this, the active MSRP data channel endpoint sends an MSRP SEND message (empty or not) to the peer (passive) MSRP data channel endpoint.
Session Closing
The closure of an MSRP session SHALL be signaled via
SDP following the requirements in .
If the data channel used to transport the MSRP session fails and is torn down, the MSRP data channel endpoints SHALL consider the MSRP session failed. An MSRP data channel endpoint MAY, based on local policy, try to negotiate a new MSRP data channel.
Data Framing
Each text-based MSRP message is sent on the corresponding data channel using standard MSRP framing and chunking procedures, as defined in , with each MSRP chunk delivered in a single SCTP user message. Therefore all sent MSRP chunks SHALL have lengths of less than or equal to the value of the peer's 'max-message-size' attribute associated with the SCTP association.
Data Sending, Receiving, and Reporting
Data sending, receiving, and reporting procedures SHALL conform to .
Support for MSRP File Transfer Function
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 data channel endpoints
with the following considerations:
- As an MSRP session maps to one data channel, a file transfer session maps also to one data channel.
- SDP attributes are negotiated as specified in .
- Once the file transfer is complete, the same data channel MAY be reused for another file transfer.
Gateway Considerations
This section describes the network configuration where one MSRP endpoint uses an 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 an MSRP Back-to-Back User Agent (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 ,
'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 and
apply to each peer, with the following additions:
- The gateway SHALL use the MSRP CEMA mechanism towards the non-data channel endpoint.
- If the non-data channel endpoint does not support MSRP CEMA,
transport-level interworking mode is not possible, and the gateway needs to act as an MSRP B2BUA.
- The gateway SHALL NOT modify the 'path' attribute received from data channel or from non-data channel endpoints.
- The gateway SHALL NOT modify the 'setup' value
received from data channel or from non-data channel endpoints.
- The endpoint establishing an MSRP session using data channel transport SHALL NOT request inclusion of any relays, although it MAY interoperate with a peer that signals the use of relays.
Updates to RFC 4975
This document updates
by allowing the usage of the "msrps" scheme when the underlying connection is protected with DTLS.
Security Considerations
MSRP traffic over data channels, including confidentiality, integrity, and source authentication,
is secured as specified by .
However, allows transport of
MSRP traffic over nonsecured TCP connections and does not provide a mechanism to guarantee usage of TLS end to end.
As described in , even if TLS is used between some hops,
TCP might still be used between other hops.
Operators need to establish proper policies
in order to ensure that the MSRP traffic is protected between endpoints.
specifies security considerations related to the usage of MSRP for file transfer.
specifies security considerations related to B2BUAs.
Note that the discussion in on MSRP message attribution to remote identities applies to data channel transport.
If the Session Initiation Protocol (SIP) is used to implement the offer/answer transactions for establishing the MSRP data channel, the SIP security considerations specified in apply.
IANA Considerations
"msrps" URI scheme
This document modifies the usage of the "msrps" URI scheme,
registered by ,
by adding DTLS as a protected transport indicated by the URI scheme.
A reference to RFC 8873 has been added to the URI scheme "msrps"
in the "Uniform Resource Identifier (URI) Schemes" registry.
Subprotocol Identifier "msrp"
A reference to RFC 8873 has been added to the subprotocol identifier
"msrp" in the "WebSocket Subprotocol Name Registry".
SDP Attributes
This document modifies the usage of a set of SDP attributes if any of those
attributes is included in an SDP 'dcsa' attribute associated with an
MSRP data channel. The modified usage of the SDP 'setup' attribute is
described in . The usage of the other
SDP attributes is described in .
- 'accept-types'
- 'accept-wrapped-types'
- 'file-date'
- 'file-disposition'
- 'file-icon'
- 'file-range'
- 'file-selector'
- 'file-transfer-id'
- 'inactive'
- 'max-size'
- 'msrp-cema'
- 'path'
- 'recvonly'
- 'sendonly'
- 'sendrecv'
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'accept-types' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- accept-types
- Usage level:
- dcsa (msrp)
- Purpose:
- Contain the list of media types that the endpoint is willing to receive.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'accept-wrapped-types' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- accept-wrapped-types
- Usage level:
- dcsa (msrp)
- Purpose:
- Contain the list of media types that the endpoint is willing to receive in an MSRP message with multipart content.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-date' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-date
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate one or more dates related to the file in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-disposition' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-disposition
- Usage level:
- dcsa (msrp)
- Purpose:
- Provide a suggestion to the other endpoint about the intended disposition of the file in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-icon' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-icon
- Usage level:
- dcsa (msrp)
- Purpose:
- Contain a pointer to a small preview icon representing the contents of the file in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-range' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-range
- Usage level:
- dcsa (msrp)
- Purpose:
- Contain the range of transferred octets of the file in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-selector' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-selector
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate a file in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'file-transfer-id' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- file-transfer-id
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate a unique identifier of the file transfer operation in an MSRP file transfer negotiation.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'inactive' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- inactive
- Usage level:
- dcsa (msrp)
- Purpose:
- Negotiate the direction of the media flow on an MSRP data channel.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'max-size' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- max-size
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate the largest message an MSRP endpoint wishes to accept.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'msrp-cema' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- msrp-cema
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate that the routing of MSRP messages transported on a data channel is more similar to the MSRP CEMA mechanism than the legacy MSRP routing mechanism.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'path' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- path
- Usage level:
- dcsa (msrp)
- Purpose:
- Indicate an endpoint, but not used for routing, as described in
.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'recvonly' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- recvonly
- Usage level:
- dcsa (msrp)
- Purpose:
- Negotiate the direction of the media flow on an MSRP data channel.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'sendonly' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- sendonly
- Usage level:
- dcsa (msrp)
- Purpose:
- Negotiate the direction of the media flow on an MSRP data channel.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'setup' attribute in the "att-field" subregistry 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
.
- Reference:
- RFC 8873
The usage level "dcsa (msrp)" has been added to the registration of the SDP
'sendrecv' attribute in the Session Description Protocol (SDP) Parameters "att-field" subregistry as follows:
- Contact name:
- IESG
- Contact email:
- iesg@ietf.org
- Attribute name:
- sendrecv
- Usage level:
- dcsa (msrp)
- Purpose:
- Negotiate the direction of the media flow on an MSRP data channel.
- Reference:
- RFC 8873
References
Normative References
WebRTC Data Channels
Negotiation Data Channels Using the Session Description
Protocol (SDP)
Unaffiliated
Nokia
Unaffiliated
Unaffiliated
Huawei
Session Description Protocol (SDP) Offer/Answer Procedures for
Stream Control Transmission Protocol (SCTP) over Datagram Transport Layer
Security (DTLS) Transport
Informative References
Acknowledgments
The authors wish to acknowledge the borrowing of ideas from
another Internet-Draft by and
, and to thank
, ,
, ,
, , and
for their invaluable comments.
, , and
contributed to an earlier draft version
of this document before the draft was readopted.
helped with the readoption of this document, and
contributed valuable comments
after the document was readopted.