idnits 2.17.1 draft-ietf-stox-im-09.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 (June 10, 2014) is 3605 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-07 -- Possible downref: Non-RFC (?) normative reference: ref. 'XEP-0071' == Outdated reference: A later version (-11) exists of draft-ietf-stox-groupchat-04 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: December 12, 2014 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 June 10, 2014 10 Interworking between the Session Initiation Protocol (SIP) and the 11 Extensible Messaging and Presence Protocol (XMPP): Instant Messaging 12 draft-ietf-stox-im-09 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 December 12, 2014. 38 Copyright Notice 40 Copyright (c) 2014 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 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 3. Terminology 132 A number of terms used here are explained in [RFC3261], [RFC3428], 133 [RFC6120], and [RFC6121]. 135 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 136 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 137 "OPTIONAL" in this document are to be interpreted as described in 138 [RFC2119]. 140 4. XMPP to SIP 142 As described in [RFC6121], a single instant message is an XML 143 stanza of type "normal" sent over an XML stream (since 144 "normal" is the default for the 'type' attribute of the 145 stanza, the attribute is often omitted). 147 When the XMPP user Juliet wants to send an 148 instant message to Romeo, she interacts with her XMPP client, which 149 generates an XMPP stanza. The syntax of the 150 stanza, including required and optional elements and attributes, is 151 defined in [RFC6121] (for single instant messages, the value of the 152 'to' address SHOULD be a "bare JID" of the form 153 "localpart@domainpart"). The following is an example of such a 154 stanza: 156 Example 1: XMPP user sends message 158 | 160 | Art thou not Romeo, and a Montague? 161 | 163 Upon receiving such a message stanza, the XMPP server needs to 164 determine the identity of the domainpart in the 'to' address, which 165 it does by following the procedures explained in Section 5 of 166 [RFC7247]. If the domain is a SIP domain, the XMPP server will hand 167 off the message stanza to an XMPP-to-SIP gateway that natively 168 communicates with IM-aware SIP servers. 170 The XMPP-to-SIP gateway is then responsible for translating the XMPP 171 message stanza into a SIP MESSAGE request from the XMPP user to the 172 SIP user: 174 Example 2: XMPP user sends message (SIP transformation) 176 | MESSAGE sip:romeo@example.net SIP/2.0 177 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 178 | Max-Forwards: 70 179 | To: sip:romeo@example.net 180 | From: ;tag=12345 181 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 182 | CSeq: 1 MESSAGE 183 | Content-Type: text/plain 184 | Content-Length: 35 185 | 186 | Art thou not Romeo, and a Montague? 188 The destination SIP server is responsible for delivering the message 189 to the intended recipient, and the recipient is responsible for 190 generating a response (e.g., 200 OK). 192 Example 3: SIP user agent indicates receipt of message 194 | SIP/2.0 200 OK 195 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 196 | From: sip:romeo@example.net;tag=vwxyz 197 | To: sip:juliet@example.com;tag=12345 198 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 199 | CSeq: 1 MESSAGE 200 | Content-Length: 0 202 As described in [RFC3428], a downstream proxy could fork a MESSAGE 203 request, but it would return only one 200 OK to the gateway. 205 Note: This document does not specify handling of the 200 OK by the 206 XMPP-to-SIP gateway (e.g., to enable message acknowledgements). 207 See [I-D.ietf-stox-chat] for a mapping of message acknowledgements 208 in the context of one-to-one chat sessions. 210 The mapping of XMPP syntax to SIP syntax SHOULD be as shown in the 211 following table. (Mappings for several aspects not mentioned here 212 are specified in [I-D.ietf-stox-chat].) 214 Table 1: Message syntax mapping from XMPP to SIP 216 +-----------------------------+--------------------------+ 217 | XMPP Element or Attribute | SIP Header or Contents | 218 +-----------------------------+--------------------------+ 219 | | body of MESSAGE | 220 | | Subject | 221 | | Call-ID | 222 | from | From (1) | 223 | id | (no mapping) | 224 | to | To or Request-URI | 225 | type | (no mapping) (2) | 226 | xml:lang | Content-Language | 227 +-----------------------------+--------------------------+ 229 1. As shown in the foregoing example and described in [RFC7247], the 230 XMPP-to-SIP gateway SHOULD map the bare JID 231 ("localpart@domainpart") of the XMPP sender to the SIP From 232 header and include the resourcepart of the full JID as the GRUU 233 portion [RFC5627] of the SIP URI. 235 2. Because there is no SIP header field that matches the meaning of 236 the XMPP message 'type' values ("normal", "chat", "groupchat", 237 "headline", "error"), no general mapping is possible here. 239 5. SIP to XMPP 241 As described in [RFC3428], a single instant message is a SIP MESSAGE 242 request sent from a SIP user agent to an intended recipient who is 243 most generally referenced by an Instant Message URI of the form 244 but who might be referenced by a SIP or SIPS URI of 245 the form or . 247 When the SIP user Romeo wants to send an 248 instant message to Juliet, he interacts with his SIP user agent, 249 which generates a SIP MESSAGE request. The syntax of the MESSAGE 250 request is defined in [RFC3428]. The following is an example of such 251 a request: 253 Example 4: SIP user sends message 255 | MESSAGE sip:juliet@example.com SIP/2.0 256 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 257 | Max-Forwards: 70 258 | To: sip:juliet@example.com 259 | From: sip:romeo@example.net;tag=vwxyz 260 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 261 | CSeq: 1 MESSAGE 262 | Content-Type: text/plain 263 | Content-Length: 44 264 | 265 | Neither, fair saint, if either thee dislike. 267 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 268 with an im: URI should resolve it to a sip: or sips: URI. Therefore 269 we assume that the Request-URI of a request received by an IM-capable 270 SIP-to-XMPP gateway will contain a sip: or sips: URI. Upon receiving 271 the MESSAGE, the SIP server needs to determine the identity of the 272 domain portion of the Request-URI or To header, which it does by 273 following the procedures explained in Section 5 of [RFC7247]. If the 274 domain is an XMPP domain, the SIP server will hand off the MESSAGE to 275 an associated SIP-to-XMPP gateway that natively communicates with 276 XMPP servers. 278 The SIP-to-XMPP gateway is then responsible for translating the 279 request into an XMPP message stanza from the SIP user to the XMPP 280 user and returning a SIP "200 OK" message to the sender: 282 Example 5: SIP user sends message (XMPP transformation) 284 | 286 | Neither, fair saint, if either thee dislike. 287 | 289 Note that the stanza handling rules specified in [RFC6121] allow the 290 receiving XMPP server to deliver a message stanza whose 'to' address 291 is a bare JID ("localpart@domainpart") to multiple connected devices. 292 This is similar to the "forking" of messages in SIP. 294 The mapping of SIP syntax to XMPP syntax SHOULD be as shown in the 295 following table. (Mappings for several aspects not mentioned here 296 are specified in [I-D.ietf-stox-chat].) 298 Table 2: Message syntax mapping from SIP to XMPP 300 +--------------------------+-----------------------------+ 301 | SIP Header or Contents | XMPP Element or Attribute | 302 +--------------------------+-----------------------------+ 303 | Call-ID | | 304 | Content-Language | xml:lang | 305 | CSeq | (no mapping) | 306 | From | from (1) | 307 | Subject | | 308 | Request-URI or To | to | 309 | body of MESSAGE | | 310 +--------------------------+-----------------------------+ 312 1. As shown in the foregoing example and described in [RFC7247], if 313 the IM-capable SIP-to-XMPP gateway has information about the GRUU 314 [RFC5627] of the particular endpoint that sent the SIP message 315 then it SHOULD map the sender's address to a full JID 316 ("localpart@domainpart/resourcepart") in the 'from' attribute of 317 the XMPP stanza and include the GRUU as the resourcepart. 319 When transforming SIP pager-mode messages, an IM-capable SIP-to-XMPP 320 gateway SHOULD specify no XMPP 'type' attribute or, equivalently, a 321 'type' attribute whose value is "normal" [RFC6121]. 323 See Section 6 of this document about the handling of SIP message 324 bodies that contain content types other than plain text. 326 6. Content Types 328 SIP requests of type MESSAGE are allowed to contain essentially any 329 content type. The recommended procedures for SIP-to-XMPP gateways to 330 use in handling these content types are as follows. 332 An IM-aware SIP-to-XMPP gateway MUST process SIP messages that 333 contain message bodies of type "text/plain" and MUST encapsulate such 334 message bodies as the XML character data of the XMPP element. 336 An IM-aware SIP-to-XMPP gateway SHOULD process SIP messages that 337 contain message bodies of type "text/html"; if so, a gateway MUST 338 transform the "text/html" content into XHTML content that conforms to 339 the XHTML-IM Integration Set specified in [XEP-0071]. 341 Although an IM-aware SIP-to-XMPP gateway MAY process SIP messages 342 that contain message bodies of types other than "text/plain" and 343 "text/html", the handling of such content types is a matter of 344 implementation. 346 7. Internationalization Considerations 348 Both XMPP and SIP support the UTF-8 encoding [RFC3629] of Unicode 349 characters [UNICODE] within messages, and signalling of the language 350 for a particular message (in XMPP via the 'xml:lang' attribute and in 351 SIP via the Content-Language header). Several examples follow, using 352 the "XML Notation" [RFC3987] for Unicode characters outside the ASCII 353 range. 355 Example 6: SIP user sends message 357 | MESSAGE sip:juliet@example.com SIP/2.0 358 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 359 | Max-Forwards: 70 360 | To: sip:juliet@example.com 361 | From: sip:romeo@example.net;tag=vwxyz 362 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 363 | CSeq: 1 MESSAGE 364 | Content-Type: text/plain 365 | Content-Length: 45 366 | Content-Language: cs 367 | 368 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 369 | nenavid쎭얡-li jedno nebo druh쎩. 371 Example 7: SIP user sends message (XMPP transformation) 373 | 376 | 377 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 378 | nenavid쎭얡-li jedno nebo druh쎩. 379 | 380 | 382 8. IANA Considerations 384 This document requests no actions of IANA. 386 9. Security Considerations 388 Detailed security considerations for instant messaging protocols are 389 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 390 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 391 (see also [RFC6120]). The security considerations provided in 392 [RFC7247] also apply. 394 This document specifies methods for exchanging instant messages 395 through a gateway that translates between SIP and XMPP. Such a 396 gateway MUST be compliant with the minimum security requirements of 397 the instant messaging protocols for which it translates (i.e., SIP 398 and XMPP). The addition of gateways to the security model of instant 399 messaging specified in [RFC2779] introduces some new risks. In 400 particular, end-to-end security properties (especially 401 confidentiality and integrity) between instant messaging user agents 402 that interface through an IM-capable SIP-to-XMPP gateway can be 403 provided only if common formats are supported. Specification of 404 those common formats is out of scope for this document, although it 405 is preferred to use [RFC3862] for instant messages. 407 10. References 409 10.1. Normative References 411 [I-D.ietf-stox-chat] 412 Saint-Andre, P. and S. Loreto, "Interworking between the 413 Session Initiation Protocol (SIP) and the Extensible 414 Messaging and Presence Protocol (XMPP): One-to-One Text 415 Chat Sessions", draft-ietf-stox-chat-07 (work in 416 progress), June 2014. 418 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 419 Requirement Levels", BCP 14, RFC 2119, March 1997. 421 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 422 A., Peterson, J., Sparks, R., Handley, M., and E. 423 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 424 June 2002. 426 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., 427 and D. Gurle, "Session Initiation Protocol (SIP) Extension 428 for Instant Messaging", RFC 3428, December 2002. 430 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 431 Agent URIs (GRUUs) in the Session Initiation Protocol 432 (SIP)", RFC 5627, October 2009. 434 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 435 Protocol (XMPP): Core", RFC 6120, March 2011. 437 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 438 Protocol (XMPP): Instant Messaging and Presence", RFC 439 6121, March 2011. 441 [RFC7247] Saint-Andre, P., Houri, A., and J. Hildebrand, 442 "Interworking between the Session Initiation Protocol 443 (SIP) and the Extensible Messaging and Presence Protocol 444 (XMPP): Architecture, Addresses, and Error Handling", RFC 445 7247, May 2014. 447 [XEP-0071] 448 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 450 10.2. Informative References 452 [I-D.ietf-simple-cpim-mapping] 453 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 454 Presence and Instant Messaging", draft-ietf-simple-cpim- 455 mapping-01 (work in progress), June 2002. 457 [I-D.ietf-stox-groupchat] 458 Saint-Andre, P., Corretge, S., and S. Loreto, 459 "Interworking between the Session Initiation Protocol 460 (SIP) and the Extensible Messaging and Presence Protocol 461 (XMPP): Groupchat", draft-ietf-stox-groupchat-04 (work in 462 progress), March 2014. 464 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 465 / Presence Protocol Requirements", RFC 2779, February 466 2000. 468 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 469 10646", STD 63, RFC 3629, November 2003. 471 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 472 (CPIM)", RFC 3860, August 2004. 474 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 475 Messaging (CPIM): Message Format", RFC 3862, August 2004. 477 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 478 Presence Protocol (XMPP) to Common Presence and Instant 479 Messaging (CPIM)", RFC 3922, October 2004. 481 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 482 Identifiers (IRIs)", RFC 3987, January 2005. 484 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 485 6.3", 2013, 486 . 488 Appendix A. Acknowledgements 490 The authors wish to thank the following individuals for their 491 feedback: Mary Barnes, Dave Cridland, Dave Crocker, Adrian Georgescu, 492 Christer Holmberg, Saul Ibarra Corretge, Olle Johansson, Paul 493 Kyzivat, Salvatore Loreto, Daniel-Constantin Mierla, and Tory Patnoe. 495 The authors gratefully acknowledge the assistance of Markus Isomaki 496 and Yana Stamcheva as the working group chairs and Gonzalo Camarillo 497 and Alissa Cooper as the sponsoring Area Directors. 499 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for 500 employing him during his work on earlier versions of this document. 502 Authors' Addresses 504 Peter Saint-Andre 505 &yet 506 P.O. Box 787 507 Parker, CO 80134 508 USA 510 Email: peter@andyet.com 511 Avshalom Houri 512 IBM 513 Rorberg Building, Pekris 3 514 Rehovot 76123 515 Israel 517 Email: avshalom@il.ibm.com 519 Joe Hildebrand 520 Cisco Systems, Inc. 521 1899 Wynkoop Street, Suite 600 522 Denver, CO 80202 523 USA 525 Email: jhildebr@cisco.com