idnits 2.17.1 draft-ietf-stox-im-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 2, 2015) is 3364 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-ietf-stox-chat-08 -- Possible downref: Non-RFC (?) normative reference: ref. 'XEP-0071' == Outdated reference: A later version (-11) exists of draft-ietf-stox-groupchat-08 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Saint-Andre 3 Internet-Draft &yet 4 Intended status: Standards Track A. Houri 5 Expires: August 6, 2015 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 February 2, 2015 10 Interworking between the Session Initiation Protocol (SIP) and the 11 Extensible Messaging and Presence Protocol (XMPP): Instant Messaging 12 draft-ietf-stox-im-11 14 Abstract 16 This document defines a bidirectional protocol mapping for the 17 exchange of single instant messages between the Session Initiation 18 Protocol (SIP) and the Extensible Messaging and Presence Protocol 19 (XMPP). 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on August 6, 2015. 38 Copyright Notice 40 Copyright (c) 2015 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Intended Audience . . . . . . . . . . . . . . . . . . . . . . 3 57 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 4. XMPP to SIP . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 5. SIP to XMPP . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 6. Content Types . . . . . . . . . . . . . . . . . . . . . . . . 8 61 7. Internationalization Considerations . . . . . . . . . . . . . 8 62 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 63 9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 64 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 65 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 68 1. Introduction 70 In order to help ensure interworking between instant messaging (IM) 71 systems that conform to the instant messaging / presence requirements 72 [RFC2779], it is important to clearly define protocol mappings 73 between such systems. Within the IETF, work has proceeded on two 74 instant messaging technologies: 76 o Various extensions to the Session Initiation Protocol ([RFC3261]) 77 for instant messaging, in particular the MESSAGE method extension 78 [RFC3428]. 80 o The Extensible Messaging and Presence Protocol (XMPP), which 81 consists of a formalization of the core XML streaming protocols 82 developed originally by the Jabber open-source community; the 83 relevant specifications are [RFC6120] for the XML streaming layer 84 and [RFC6121] for basic presence and instant messaging extensions. 86 One approach to helping ensure interworking between these protocols 87 is to map each protocol to the abstract semantics described in 88 [RFC3860]; that is the approach taken by 89 [I-D.ietf-simple-cpim-mapping] and [RFC3922]. By contrast, the 90 approach taken in this document is to directly map semantics from one 91 protocol to another (i.e., from SIP/SIMPLE to XMPP and vice-versa), 92 since that is how existing systems solve the interworking problem. 94 Both XMPP and IM-capable SIP systems enable entities to exchange 95 "instant messages". The term "instant message" usually refers to a 96 message sent between two entities for delivery in close to real time 97 (rather than a message that is stored and forwarded to the intended 98 recipient upon request). This document covers single messages only 99 (sometimes called "pager-mode" messaging), since they form the lowest 100 common denominator for IM. Separate documents cover one-to-one chat 101 sessions [I-D.ietf-stox-chat] and multi-party groupchat 102 [I-D.ietf-stox-groupchat]. 104 The architectural assumptions underlying such direct mappings are 105 provided in [RFC7247], including mapping of addresses and error 106 conditions. The mappings specified in this document cover basic 107 instant messaging functionality, i.e., the exchange of a single 108 instant message between a SIP user and an XMPP user in either 109 direction. Mapping of more advanced functionality is out of scope 110 for this document, but other documents in this "series" cover such 111 topics. 113 2. Intended Audience 115 The documents in this series are intended for use by software 116 developers who have an existing system based on one of these 117 technologies (e.g., SIP), and would like to enable communication from 118 that existing system to systems based on the other technology (e.g., 119 XMPP). We assume that readers are familiar with the core 120 specifications for both SIP [RFC3261] and XMPP [RFC6120], with the 121 base document for this series [RFC7247], and with the following IM- 122 related specifications: 124 o Session Initiation Protocol (SIP) Extension for Instant Messaging 125 [RFC3428] 127 o Extensible Messaging and Presence Protocol: Instant Messaging and 128 Presence [RFC6121] 130 Note well that not all protocol-compliant messages are shown (such as 131 SIP 100 TRYING messages), in order to focus the reader on the 132 essential aspects of the protocol flows. 134 3. Terminology 136 A number of terms used here are explained in [RFC3261], [RFC3428], 137 [RFC6120], and [RFC6121]. 139 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 140 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 141 "OPTIONAL" in this document are to be interpreted as described in 142 [RFC2119]. 144 4. XMPP to SIP 146 As described in [RFC6121], a single instant message is an XML 147 stanza of type "normal" sent over an XML stream (since 148 "normal" is the default for the 'type' attribute of the 149 stanza, the attribute is often omitted). 151 When the XMPP user Juliet wants to send an 152 instant message to Romeo, she interacts with her XMPP client, which 153 generates an XMPP stanza. The syntax of the 154 stanza, including required and optional elements and attributes, is 155 defined in [RFC6121] (for single instant messages, the value of the 156 'to' address SHOULD be a "bare JID" of the form 157 "localpart@domainpart", as per [RFC6121]). The following is an 158 example of such a stanza: 160 Example 1: XMPP user sends message 162 | 164 | Art thou not Romeo, and a Montague? 165 | 167 Upon receiving such a message stanza, the XMPP server needs to 168 determine the identity of the domainpart in the 'to' address, which 169 it does by following the procedures explained in Section 5 of 170 [RFC7247]. If the domain is a SIP domain, the XMPP server will hand 171 off the message stanza to an XMPP-to-SIP gateway that natively 172 communicates with IM-aware SIP servers. 174 The XMPP-to-SIP gateway is then responsible for translating the XMPP 175 message stanza into a SIP MESSAGE request from the XMPP user to the 176 SIP user: 178 Example 2: XMPP user sends message (SIP transformation) 180 | MESSAGE sip:romeo@example.net SIP/2.0 181 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 182 | Max-Forwards: 70 183 | To: sip:romeo@example.net 184 | From: ;tag=12345 185 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 186 | CSeq: 1 MESSAGE 187 | Content-Type: text/plain 188 | Content-Length: 35 189 | 190 | Art thou not Romeo, and a Montague? 191 The destination SIP server is responsible for delivering the message 192 to the intended recipient, and the recipient is responsible for 193 generating a response (e.g., 200 OK). 195 Example 3: SIP user agent indicates receipt of message 197 | SIP/2.0 200 OK 198 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 199 | From: sip:romeo@example.net;tag=vwxyz 200 | To: sip:juliet@example.com;tag=12345 201 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 202 | CSeq: 1 MESSAGE 203 | Content-Length: 0 205 As described in [RFC3428], a downstream proxy could fork a MESSAGE 206 request, but it would return only one 200 OK to the gateway. 208 Note: This document does not specify handling of the 200 OK by the 209 XMPP-to-SIP gateway (e.g., to enable message acknowledgements). 210 See [I-D.ietf-stox-chat] for a mapping of message acknowledgements 211 in the context of one-to-one chat sessions. 213 The mapping of XMPP syntax to SIP syntax MUST be as shown in the 214 following table. (Mappings for several aspects not mentioned here 215 are specified in [I-D.ietf-stox-chat].) 217 Table 1: Message syntax mapping from XMPP to SIP 219 +-----------------------------+--------------------------+ 220 | XMPP Element or Attribute | SIP Header or Contents | 221 +-----------------------------+--------------------------+ 222 | | body of MESSAGE | 223 | | Subject | 224 | | Call-ID | 225 | from | From (1) | 226 | id | (no mapping) | 227 | to | To or Request-URI | 228 | type | (no mapping) (2) | 229 | xml:lang | Content-Language | 230 +-----------------------------+--------------------------+ 232 1. As shown in the foregoing example and described in [RFC7247], the 233 XMPP-to-SIP gateway MUST map the bare JID 234 ("localpart@domainpart") of the XMPP sender to the SIP From 235 header and include the resourcepart of the full JID as the GRUU 236 portion [RFC5627] of the SIP URI. 238 2. Because there is no SIP header field that matches the meaning of 239 the XMPP message 'type' values ("normal", "chat", "groupchat", 240 "headline", "error"), no general mapping is possible here. 242 5. SIP to XMPP 244 As described in [RFC3428], a single instant message is a SIP MESSAGE 245 request sent from a SIP user agent to an intended recipient who is 246 most generally referenced by an Instant Message URI of the form 247 but who might be referenced by a SIP or SIPS URI of 248 the form or . 250 When the SIP user Romeo wants to send an 251 instant message to Juliet, he interacts with his SIP user agent, 252 which generates a SIP MESSAGE request. The syntax of the MESSAGE 253 request is defined in [RFC3428]. The following is an example of such 254 a request: 256 Example 4: SIP user sends message 258 | MESSAGE sip:juliet@example.com SIP/2.0 259 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 260 | Max-Forwards: 70 261 | To: sip:juliet@example.com 262 | From: sip:romeo@example.net;tag=vwxyz 263 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 264 | CSeq: 1 MESSAGE 265 | Content-Type: text/plain 266 | Content-Length: 44 267 | 268 | Neither, fair saint, if either thee dislike. 270 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 271 with an im: URI should resolve it to a sip: or sips: URI. Therefore 272 we assume that the Request-URI of a request received by an IM-capable 273 SIP-to-XMPP gateway will contain a sip: or sips: URI. Upon receiving 274 the MESSAGE, the SIP server needs to determine the identity of the 275 domain portion of the Request-URI or To header, which it does by 276 following the procedures explained in Section 5 of [RFC7247]. If the 277 domain is an XMPP domain, the SIP server will hand off the MESSAGE to 278 an associated SIP-to-XMPP gateway that natively communicates with 279 XMPP servers. 281 The SIP-to-XMPP gateway is then responsible for translating the 282 request into an XMPP message stanza from the SIP user to the XMPP 283 user and returning a SIP "200 OK" message to the sender: 285 Example 5: SIP user sends message (XMPP transformation) 287 | 289 | Neither, fair saint, if either thee dislike. 290 | 292 Note that the stanza handling rules specified in [RFC6121] allow the 293 receiving XMPP server to deliver a message stanza whose 'to' address 294 is a bare JID ("localpart@domainpart") to multiple connected devices. 295 This is similar to the "forking" of messages in SIP. 297 The mapping of SIP syntax to XMPP syntax MUST be as shown in the 298 following table. (Mappings for several aspects not mentioned here 299 are specified in [I-D.ietf-stox-chat].) 301 Table 2: Message syntax mapping from SIP to XMPP 303 +--------------------------+-----------------------------+ 304 | SIP Header or Contents | XMPP Element or Attribute | 305 +--------------------------+-----------------------------+ 306 | Call-ID | | 307 | Content-Language | xml:lang | 308 | CSeq | (no mapping) | 309 | From | from (1) | 310 | Subject | | 311 | Request-URI or To | to | 312 | body of MESSAGE | | 313 +--------------------------+-----------------------------+ 315 1. As shown in the foregoing example and described in [RFC7247], if 316 the IM-capable SIP-to-XMPP gateway has information about the GRUU 317 [RFC5627] of the particular endpoint that sent the SIP message 318 then it MUST map the sender's address to a full JID 319 ("localpart@domainpart/resourcepart") in the 'from' attribute of 320 the XMPP stanza and include the GRUU as the resourcepart. 322 When transforming SIP pager-mode messages, an IM-capable SIP-to-XMPP 323 gateway MUST specify no XMPP 'type' attribute or, equivalently, a 324 'type' attribute whose value is "normal" [RFC6121]. 326 See Section 6 of this document about the handling of SIP message 327 bodies that contain content types other than plain text. 329 6. Content Types 331 SIP requests of type MESSAGE are allowed to contain essentially any 332 content type. The recommended procedures for SIP-to-XMPP gateways to 333 use in handling these content types are as follows. 335 An IM-aware SIP-to-XMPP gateway MUST process SIP messages that 336 contain message bodies of type "text/plain" and MUST encapsulate such 337 message bodies as the XML character data of the XMPP element. 339 An IM-aware SIP-to-XMPP gateway SHOULD process SIP messages that 340 contain message bodies of type "text/html"; if so, a gateway MUST 341 transform the "text/html" content into XHTML content that conforms to 342 the XHTML-IM Integration Set specified in [XEP-0071]. 344 Although an IM-aware SIP-to-XMPP gateway MAY process SIP messages 345 that contain message bodies of types other than "text/plain" and 346 "text/html", the handling of such content types is a matter of 347 implementation. 349 7. Internationalization Considerations 351 Both XMPP and SIP support the UTF-8 encoding [RFC3629] of Unicode 352 characters [UNICODE] within messages, and signalling of the language 353 for a particular message (in XMPP via the 'xml:lang' attribute and in 354 SIP via the Content-Language header). Several examples follow, using 355 the "XML Notation" [RFC3987] for Unicode characters outside the ASCII 356 range. 358 Example 6: SIP user sends message 360 | MESSAGE sip:juliet@example.com SIP/2.0 361 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 362 | Max-Forwards: 70 363 | To: sip:juliet@example.com 364 | From: sip:romeo@example.net;tag=vwxyz 365 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 366 | CSeq: 1 MESSAGE 367 | Content-Type: text/plain 368 | Content-Length: 45 369 | Content-Language: cs 370 | 371 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 372 | nenavid쎭얡-li jedno nebo druh쎩. 374 Example 7: SIP user sends message (XMPP transformation) 376 | 379 | 380 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 381 | nenavid쎭얡-li jedno nebo druh쎩. 382 | 383 | 385 8. IANA Considerations 387 This document requests no actions of IANA. 389 9. Security Considerations 391 Detailed security considerations for instant messaging protocols are 392 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 393 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 394 (see also [RFC6120]). The security considerations provided in 395 [RFC7247] also apply. 397 This document specifies methods for exchanging instant messages 398 through a gateway that translates between SIP and XMPP. Such a 399 gateway MUST be compliant with the minimum security requirements of 400 the instant messaging protocols for which it translates (i.e., SIP 401 and XMPP). The addition of gateways to the security model of instant 402 messaging specified in [RFC2779] introduces some new risks. In 403 particular, end-to-end security properties (especially 404 confidentiality and integrity) between instant messaging user agents 405 that interface through an IM-capable SIP-to-XMPP gateway can be 406 provided only if common formats are supported. Specification of 407 those common formats is out of scope for this document, although it 408 is preferred to use [RFC3862] for instant messages. 410 10. References 412 10.1. Normative References 414 [I-D.ietf-stox-chat] 415 Saint-Andre, P. and S. Loreto, "Interworking between the 416 Session Initiation Protocol (SIP) and the Extensible 417 Messaging and Presence Protocol (XMPP): One-to-One Text 418 Chat Sessions", draft-ietf-stox-chat-08 (work in 419 progress), August 2014. 421 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 422 Requirement Levels", BCP 14, RFC 2119, March 1997. 424 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 425 A., Peterson, J., Sparks, R., Handley, M., and E. 426 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 427 June 2002. 429 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., 430 and D. Gurle, "Session Initiation Protocol (SIP) Extension 431 for Instant Messaging", RFC 3428, December 2002. 433 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 434 Agent URIs (GRUUs) in the Session Initiation Protocol 435 (SIP)", RFC 5627, October 2009. 437 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 438 Protocol (XMPP): Core", RFC 6120, March 2011. 440 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 441 Protocol (XMPP): Instant Messaging and Presence", RFC 442 6121, March 2011. 444 [RFC7247] Saint-Andre, P., Houri, A., and J. Hildebrand, 445 "Interworking between the Session Initiation Protocol 446 (SIP) and the Extensible Messaging and Presence Protocol 447 (XMPP): Architecture, Addresses, and Error Handling", RFC 448 7247, May 2014. 450 [XEP-0071] 451 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 453 10.2. Informative References 455 [I-D.ietf-simple-cpim-mapping] 456 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 457 Presence and Instant Messaging", draft-ietf-simple-cpim- 458 mapping-01 (work in progress), June 2002. 460 [I-D.ietf-stox-groupchat] 461 Saint-Andre, P., Corretge, S., and S. Loreto, 462 "Interworking between the Session Initiation Protocol 463 (SIP) and the Extensible Messaging and Presence Protocol 464 (XMPP): Groupchat", draft-ietf-stox-groupchat-08 (work in 465 progress), November 2014. 467 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 468 / Presence Protocol Requirements", RFC 2779, February 469 2000. 471 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 472 10646", STD 63, RFC 3629, November 2003. 474 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 475 (CPIM)", RFC 3860, August 2004. 477 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 478 Messaging (CPIM): Message Format", RFC 3862, August 2004. 480 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 481 Presence Protocol (XMPP) to Common Presence and Instant 482 Messaging (CPIM)", RFC 3922, October 2004. 484 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 485 Identifiers (IRIs)", RFC 3987, January 2005. 487 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 488 6.3", 2013, 489 . 491 Appendix A. Acknowledgements 493 The authors wish to thank the following individuals for their 494 feedback: Mary Barnes, Dave Cridland, Dave Crocker, Adrian Georgescu, 495 Christer Holmberg, Saul Ibarra Corretge, Olle Johansson, Paul 496 Kyzivat, Salvatore Loreto, Daniel-Constantin Mierla, and Tory Patnoe. 498 The authors gratefully acknowledge the assistance of Markus Isomaki 499 and Yana Stamcheva as the working group chairs and Gonzalo Camarillo 500 and Alissa Cooper as the sponsoring Area Directors. 502 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for 503 employing him during his work on earlier versions of this document. 505 Authors' Addresses 507 Peter Saint-Andre 508 &yet 510 Email: peter@andyet.com 511 URI: https://andyet.com/ 512 Avshalom Houri 513 IBM 514 Rorberg Building, Pekris 3 515 Rehovot 76123 516 Israel 518 Email: avshalom@il.ibm.com 520 Joe Hildebrand 521 Cisco Systems, Inc. 522 1899 Wynkoop Street, Suite 600 523 Denver, CO 80202 524 USA 526 Email: jhildebr@cisco.com