RFC 6135

An Alternative Connection Model for the Message Session Relay Protocol (MSRP)

πŸ“… published February 2011, from ietf

Okay bestie, welcome to RFC 6135 πŸŽ€ This is An Alternative Connection Model for the Message Session Relay Protocol (MSRP), and it is literally about how two chatty apps decide who dials whom πŸ“žβœ¨

Here's the title block tea πŸ«–: C. Holmberg (Ericsson) and S. Blau (Ericsson AB) wrote it. It's on the Standards Track πŸ‘‘, ISSN 2070-1721, and it's dated February 2011 🌸. The header doesn't list anything it obsoletes or updates, so it's standing on its own πŸ’…

Abstract

okay so this doc defines an alternate connection model for MSRP User Agents (UAs) πŸ¦‹ It uses COMEDIA (connection-oriented media) to set up the MSRP transport connection. The vibe is that UAs stuck behind Network Address Translators (NATs) can negotiate which endpoint starts the Transmission Control Protocol (TCP) connection, so MSRP messages can actually get through the NAT 🫢

Status of This Memo

this is an Internet Standards Track document πŸ”₯

this is a product of the Internet Engineering Task Force (IETF). it represents the consensus of the IETF community, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG). more on Internet Standards is in Section 2 of RFC 5741 πŸ“š

info about its current status, any errata, and how to give feedback lives at http://www.rfc-editor.org/info/rfc6135 πŸ“

Copyright (c) 2011 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 (http://trustee.ietf.org/license-info) as in effect on the publication date. read these carefully, bestie, they spell out your rights and restrictions πŸ™ˆ Code Components pulled from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License βš–οΈ

Table of Contents

1. Introduction ....................................................2
2. Terminology .....................................................3
3. Applicability Statement .........................................3
4. COMEDIA for MSRP ................................................3
   4.1. General ....................................................3
   4.2. a=setup ....................................................3
        4.2.1. General .............................................3
        4.2.2. Attribute Usage .....................................4
   4.3. TLS ........................................................5
   4.4. a=connection ...............................................5
   4.5. MSRP Relay Connection ......................................6
5. Interoperability with the Connection Model Defined in RFC 4975 ..6
6. Security Considerations .........................................6
7. Acknowledgements ................................................7
8. References ......................................................7
   8.1. Normative References .......................................7
   8.2. Informative References .....................................7

1. Introduction ✨

the MSRP core spec [RFC4975] says the MSRP User Agent (UA) that sends the Session Description Protocol (SDP) offer is "active" 🎯 That UA is also on the hook for creating the MSRP transport connection towards the remote UA when a new connection is needed. the core spec allows for other ways to make MSRP transport connections too, but it doesn't define any of them πŸ€·β€β™€οΈ

[RFC4145] defines the connection-oriented media (COMEDIA) mechanism 🧚 Endpoints can use it to negotiate which one starts creating the media transport connection.

COMEDIA is especially useful when one endpoint sits behind a Network Address Translator (NAT) 🏠 That endpoint can use the mechanism to say it'll create the media transport connection, so the media can traverse the NAT without relays and without having to support fancier stuff (like "TCP Candidates with Interactive Connectivity Establishment (ICE)" [ICE-TCP]) πŸ’… On top of that, COMEDIA lets you use the exact same procedures for setting up Transmission Control Protocol (TCP) [RFC0793] connections for different kinds of media 🌈

here's an example: the Open Mobile Alliance (OMA)-defined "Instant Message using SIMPLE" [OMA-SIMPLE] πŸ“± In every MSRP transport connection, one MSRP UA is a media server that always lives in the carrier network. This media server has a globally reachable IP address and handles application-specific policy control as well as NAT traversal 🫧 The OMA IM (Instant Messenger) uses COMEDIA for NAT traversal, and all OMA IM MSRP clients support COMEDIA πŸ’–

this document defines how an MSRP UA uses COMEDIA to negotiate which UA creates the MSRP transport TCP connection towards the other UA πŸ¦‹ It also defines how an MSRP UA that uses COMEDIA can set up an MSRP transport connection with a remote UA that does NOT support COMEDIA πŸ‘€

2. Terminology

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 RFC 2119 [RFC2119]. πŸ“–

3. Applicability Statement

support for this spec is OPTIONAL for MSRP UAs in general 🌸 UAs that are likely to be deployed in networks with NATs SHOULD support this specification. it improves the odds that TCP connections make it through NATs, since UAs behind NATs can be asked to start establishing the TCP connections πŸƒβ€β™€οΈπŸ’¨

4. COMEDIA for MSRP

4.1. General

this section defines how an MSRP UA that supports this specification uses the COMEDIA SDP attributes defined in [RFC4145] 🧁

4.2. a=setup

4.2.1. General

an MSRP UA uses the SDP a=setup attribute [RFC4145] to negotiate which endpoint creates the MSRP transport connection towards the other UA 🀝

an MSRP UA MUST always include an explicit a=setup attribute in its SDP offers and answers 🫢 The reason is that it might be useful for the other endpoint, or for entities in the network, to know whether the UA supports COMEDIA or not πŸ”

an MSRP UA MUST support the a=setup "active", "actpass", and "passive" attribute values βœ… an MSRP UA MUST NOT send the "holdconn" attribute value 🚫 if an MSRP UA receives the "holdconn" attribute value, it MUST ignore it and process the message as if it did not contain an a=setup attribute πŸ™ˆ

4.2.2. Attribute Usage

when the a=setup attribute value is "actpass" or "passive", the IP address and port values in the MSRP URI of the SDP a=path attribute MUST contain the actual address and port values on which the UA can receive a TCP connection for the MSRP transport connection πŸ“

per [RFC4145], if the a=setup attribute value is "active", the port number value should be 9 πŸ”’

if an MSRP UA can provide a globally reachable IP address that the other endpoint can use as a destination for a TCP connection, the UA MUST use the a=setup "actpass" attribute value in SDP offers πŸ’« This lets the remote UA send an SDP answer with an a=setup "active" attribute value if the UA is behind a NAT, and it keeps things compatible with UAs that don't support COMEDIA (they always act as passive endpoints, so yeah) 🧚 If an MSRP UA cannot provide the actual transport address, the UA MUST use the a=setup "active" attribute value 🎯

the UA MUST NOT use the a=setup "passive" attribute value in an SDP offer πŸ™…β€β™€οΈ

the MSRP UA can determine that it provides a globally reachable IP address in these scenarios:

  • the UA can determine that it is not located behind a NAT;
  • the UA relays its MSRP transport connections via a relay (e.g., an MSRP relay or Traversal Using Relay NAT (TURN) server); or
  • the UA has used Session Traversal Utilities for NAT (STUN) [RFC5389] signaling to retrieve the NAT address and port through the local port to be used for the eventual transport connection, while also having determined that the NAT has endpoint-independent mapping and filtering behavior [RFC5382], e.g., using the mechanism defined in [RFC5780].

some UAs can figure out whether SIP [RFC3261] signaling has crossed a NAT πŸ•΅οΈβ€β™€οΈ They do this by inspecting the SIP Via header field in the 200 (OK) response to the initial SIP REGISTER request, then comparing the IP addresses in the Via sent-by and the received header field parameters. if the IP addresses are not the same, the UA can determine there's a NAT in the path. even though the media transport might not traverse the NAT, it's safe to assume that it will 🀞 This comparing mechanism doesn't work in every scenario though. for example, if a SIP request crosses a SIP proxy before crossing a NAT, the UA won't be able to detect the NAT by comparing the IP addresses 😭

if an SDP offer includes an a=setup "actpass" attribute value, the SDP answerer MAY include an a=setup "active" attribute value in the SDP answer πŸ’β€β™€οΈ but it SHOULD include an a=setup "passive" attribute value if it knows that it is not located behind a NAT 🌿

once the active UA has established the MSRP transport connection, the UA must immediately send an MSRP SEND request, as defined in [RFC4975] πŸš€

NOTE: According to [RFC4975], the initiating UA is always active, but when COMEDIA is used, the a=setup attribute is used to negotiate which UA becomes active. πŸŽ€

Part 2 coming next, bestie πŸ’œ (TLS, a=connection, the relay stuff, and everything after 🌈)

5. Interoperability with the Connection Model Defined in RFC 4975 🌸

okay so an MSRP UA that follows this doc can totally talk to a UA using the connection model from [RFC4975] 🫢 bestie, that's the vibe we want!!

BUT here's the tea 🍡. if your MSRP UA is sitting behind a NAT, it's NOT proxying its MSRP stuff through an MSRP relay, and it gets an SDP offer from a remote UA that uses the [RFC4975] connection model, then NAT traversal only works out if your UA supports ICE [ICE-TCP], or if the network has Session Border Controller (SBC)-assisted NAT traversal for TCP. no ICE and no SBC help means you're kinda stuck 😭

6. Security Considerations πŸ”

this section is giving serious "pay attention" energy, so let's get into it πŸ’€

under the connection model from [RFC4975], the MSRP UA that sends the SDP offer becomes the active party. it's also the one responsible for creating the MSRP transport connection toward the remote UA if a new connection is needed ✨

now with COMEDIA, either the sender or the receiver of the SDP offer can become the active party πŸ¦‹ that's the main plot twist!!

[RFC4975] requires that the active party immediately issue an MSRP SEND request once the connection is established. why? because this lets the passive party bind the inbound TCP connection to the message session identified by the session id part of its MSRP URI πŸ”₯ COMEDIA doesn't change this rule at all. the only difference is the sender of the SDP offer isn't always assumed to be the active party anymore πŸ™ˆ

and if TLS is used to protect the MSRP messages, the active party is the one that takes the role of the TLS client. there are no procedures in [RFC4975] that would break if the receiver of the SDP offer ends up being the TLS client instead, and the level of security TLS provides is not affected πŸ”’πŸ’…

7. Acknowledgements πŸŽ€

big thank you to Ben Campbell, Remi Denis-Courmont, Nancy Greene, Hadriel Kaplan, Adam Roach, Robert Sparks, Salvatore Loreto, and Shida Schubert for guidance and input while this doc was being made 🫢✨

8. References πŸ“š

8.1. Normative References

[RFC0793]     Postel, J., "Transmission Control Protocol", STD 7,
              RFC 793, September 1981.

[RFC2119]     Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC4145]     Yon, D. and G. Camarillo, "TCP-Based Media Transport in
              the Session Description Protocol (SDP)", RFC 4145,
              September 2005.

[RFC4975]     Campbell, B., Ed., Mahy, R., Ed., and C. Jennings, Ed.,
              "The Message Session Relay Protocol (MSRP)", RFC 4975,
              September 2007.

[RFC4976]     Jennings, C., Mahy, R., and A. Roach, "Relay Extensions
              for the Message Sessions Relay Protocol (MSRP)",
              RFC 4976, September 2007.

8.2. Informative References

[RFC3261]     Rosenberg, J., Schulzrinne, H., Camarillo, G.,
              Johnston, A., Peterson, J., Sparks, R., Handley, M.,
              and E. Schooler, "SIP: Session Initiation Protocol",
              RFC 3261, June 2002.

[RFC5382]     Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and
              P. Srisuresh, "NAT Behavioral Requirements for TCP",
              BCP 142, RFC 5382, October 2008.

[RFC5389]     Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
              "Session Traversal Utilities for NAT (STUN)", RFC 5389,
              October 2008.

[RFC5780]     MacDonald, D. and B. Lowekamp, "NAT Behavior Discovery
              Using Session Traversal Utilities for NAT (STUN)",
              RFC 5780, May 2010.

[ICE-TCP]     Rosenberg, J., Keranen, A., Lowekamp, B., and A. Roach,
              "TCP Candidates with Interactive Connectivity
              Establishment (ICE)", Work in Progress, February 2011.

[OMA-SIMPLE]  Open Mobile Alliance, "Instant Messaging using SIMPLE",
              OMA-TS-SIMPLE_IM-V1_0-20090901-D, September 2009.

Authors' Addresses 🧚

Christer Holmberg
Ericsson
Hirsalantie 11
Jorvas  02420
Finland

EMail: christer.holmberg@ericsson.com


Staffan Blau
Ericsson AB
PO Box 407
Sweden

EMail: staffan.blau@ericsson.com
πŸ“¦ where this page comes from