idnits 2.17.1 draft-ietf-stox-im-05.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 (October 18, 2013) is 3815 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-02 == Outdated reference: A later version (-11) exists of draft-ietf-stox-core-06 -- Possible downref: Non-RFC (?) normative reference: ref. 'XEP-0071' == Outdated reference: A later version (-11) exists of draft-ietf-stox-groupchat-01 Summary: 0 errors (**), 0 flaws (~~), 4 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 Cisco Systems, Inc. 4 Intended status: Standards Track A. Houri 5 Expires: April 21, 2014 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 October 18, 2013 10 Interworking between the Session Initiation Protocol (SIP) and the 11 Extensible Messaging and Presence Protocol (XMPP): Instant Messaging 12 draft-ietf-stox-im-05 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 April 21, 2014. 38 Copyright Notice 40 Copyright (c) 2013 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. XMPP to SIP . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 4. SIP to XMPP . . . . . . . . . . . . . . . . . . . . . . . . . 6 59 5. Content Types . . . . . . . . . . . . . . . . . . . . . . . . 8 60 6. Internationalization Considerations . . . . . . . . . . . . . 9 61 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 62 8. Security Considerations . . . . . . . . . . . . . . . . . . . 9 63 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 64 9.1. Normative References . . . . . . . . . . . . . . . . . . . 10 65 9.2. Informative References . . . . . . . . . . . . . . . . . . 11 66 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 12 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12 69 1. Introduction 71 In order to help ensure interworking between instant messaging (IM) 72 systems that conform to the instant messaging / presence requirements 73 [RFC2779], it is important to clearly define protocol mappings 74 between such systems. Within the IETF, work has proceeded on two 75 instant messaging technologies: 77 o Various extensions to the Session Initiation Protocol ([RFC3261]) 78 for instant messaging, as developed within the SIP for Instant 79 Messaging and Presence Leveraging Extensions (SIMPLE) Working 80 Group; the relevant specification for instant messaging is 81 [RFC3428] 82 o The Extensible Messaging and Presence Protocol (XMPP), which 83 consists of a formalization of the core XML streaming protocols 84 developed originally by the Jabber open-source community; the 85 relevant specifications are [RFC6120] for the XML streaming layer 86 and [RFC6121] for basic presence and instant messaging extensions 88 One approach to helping ensure interworking between these protocols 89 is to map each protocol to the abstract semantics described in 90 [RFC3860]; that is the approach taken by 91 [I-D.ietf-simple-cpim-mapping] and [RFC3922]. By contrast, the 92 approach taken in this document is to directly map semantics from one 93 protocol to another (i.e., from SIP/SIMPLE to XMPP and vice-versa). 95 Both XMPP and IM-aware SIP systems enable entities to exchange 96 "instant messages". The term "instant message" usually refers to a 97 message sent between two entities for delivery in close to real time 98 (rather than a message that is stored and forwarded to the intended 99 recipient upon request). This document covers single messages only 100 (sometimes called "pager-mode" messaging), since they form the lowest 101 common denominator for IM. Separate documents cover one-to-one chat 102 sessions [I-D.ietf-stox-chat] and multi-party groupchat 103 [I-D.ietf-stox-groupchat]. 105 The architectural assumptions underlying such direct mappings are 106 provided in [I-D.ietf-stox-core], including mapping of addresses and 107 error conditions. The mappings specified in this document cover 108 basic instant messaging functionality, i.e., the exchange of a single 109 instant message between a SIP user and an XMPP user in either 110 direction. Mapping of more advanced functionality is out of scope 111 for this document, but other documents in this "series" cover such 112 topics. 114 2. Terminology 116 A number of terms used here are explained in [RFC3261], [RFC3428], 117 [RFC6120], and [RFC6121]. 119 Continuing the tradition of Shakespearean examples in XMPP 120 documentation, the actors in this document are an XMPP user 121 and a SIP user . 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 125 "OPTIONAL" in this document are to be interpreted as described in 126 [RFC2119]. 128 3. XMPP to SIP 130 As described in [RFC6121], a single instant message is an XML 131 stanza of type "normal" sent over an XML stream (since 132 "normal" is the default for the 'type' attribute of the 133 stanza, the attribute is often omitted). In this document we will 134 assume that such a message is sent from an XMPP client to an XMPP 135 server over an XML stream negotiated between the client and the 136 server, and that the client is controlled by a human user (this is a 137 simplifying assumption introduced for explanatory purposes only; the 138 XMPP sender could be an automated client, a component such as a 139 workflow application, a server, etc.). 141 When Juliet wants to send an instant message to Romeo, she interacts 142 with her XMPP client, which generates an XMPP stanza. The 143 syntax of the stanza, including required and optional 144 elements and attributes, is defined in [RFC6121] (for single instant 145 messages, the value of the 'to' address SHOULD be a "bare JID" of the 146 form "localpart@domainpart"). The following is an example of such a 147 stanza: 149 Example: XMPP user sends message: 151 | 153 | Art thou not Romeo, and a Montague? 154 | 156 Upon receiving such a message stanza, the XMPP server needs to 157 determine the identity of the domainpart in the 'to' address, which 158 it does by following the procedures discussed in 159 [I-D.ietf-stox-core]. Here we assume that the XMPP server has 160 determined the domain is serviced by a SIMPLE server, that it 161 contains or has available to it an XMPP-SIMPLE gateway or connection 162 manager (which enables it to speak natively to SIMPLE servers), and 163 that it hands off the message stanza to the XMPP-SIMPLE gateway. 165 The XMPP-SIMPLE gateway is then responsible for translating the XMPP 166 message stanza into a SIP MESSAGE request from the XMPP user to the 167 SIP user: 169 Example: XMPP user sends message (SIP transformation): 171 | MESSAGE sip:romeo@example.net SIP/2.0 172 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 173 | Max-Forwards: 70 174 | To: sip:romeo@example.net 175 | From: ;tag=12345 176 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 177 | CSeq: 1 MESSAGE 178 | Content-Type: text/plain 179 | Content-Length: 35 180 | 181 | Art thou not Romeo, and a Montague? 183 The destination SIP server is responsible for delivering the message 184 to the intended recipient, and the recipient is responsible for 185 generating a response (e.g., 200 OK). 187 Example: SIP user agent indicates receipt of message: 189 | SIP/2.0 200 OK 190 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 191 | From: sip:romeo@example.net;tag=vwxyz 192 | To: sip:juliet@example.com;tag=12345 193 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA 194 | CSeq: 1 MESSAGE 195 | Content-Length: 0 197 As described in [RFC3428], a downstream proxy could fork a MESSAGE 198 request, but it would return only one 200 OK to the gateway. 200 Informational Note: This document does not specify handling of the 201 200 OK by the XMPP-SIMPLE gateway (e.g., to enable message 202 acknowledgements). See [I-D.ietf-stox-chat] for a mapping of 203 message acknowledgements in the context of one-to-one chat 204 sessions. 206 The mapping of XMPP syntax to SIP syntax SHOULD be as shown in the 207 following table. (Mappings for several aspects not mentioned here 208 are specified in [I-D.ietf-stox-chat].) 209 Table 1: Message syntax mapping from XMPP to SIP 211 +-----------------------------+--------------------------+ 212 | XMPP Element or Attribute | SIP Header or Contents | 213 +-----------------------------+--------------------------+ 214 | | body of MESSAGE | 215 | | Subject | 216 | | Call-ID | 217 | from | From (1) | 218 | id | (no mapping) | 219 | to | To | 220 | type | (no mapping) | 221 | xml:lang | Content-Language | 222 +-----------------------------+--------------------------+ 224 1. As shown in the foregoing example and described in 225 [I-D.ietf-stox-core], the XMPP-SIMPLE gateway SHOULD map the full 226 JID (localpart@domainpart/resourcepart) of the XMPP sender to the 227 SIP From header and include the resourcepart as the GRUU portion 228 [RFC5627] of the SIP URI. 230 4. SIP to XMPP 232 As described in [RFC3428], a single instant message is a SIP MESSAGE 233 request sent from a SIP user agent to an intended recipient who is 234 most generally referenced by an Instant Message URI of the form 235 but who might be referenced by a SIP or SIPS URI of 236 the form or . Here again we 237 introduce the simplifying assumption that the user agent is 238 controlled by a human user, whom we shall dub . 240 When Romeo wants to send an instant message to Juliet, he interacts 241 with his SIP user agent, which generates a SIP MESSAGE request. The 242 syntax of the MESSAGE request is defined in [RFC3428]. The following 243 is an example of such a request: 245 Example: SIP user sends message: 247 | MESSAGE sip:juliet@example.com SIP/2.0 248 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 249 | Max-Forwards: 70 250 | To: sip:juliet@example.com 251 | From: sip:romeo@example.net;tag=vwxyz 252 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 253 | CSeq: 1 MESSAGE 254 | Content-Type: text/plain 255 | Content-Length: 44 256 | 257 | Neither, fair saint, if either thee dislike. 259 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 260 with an im: URI should resolve it to a sip: or sips: URI. Therefore 261 we assume that the Request-URI of a request received by a SIMPLE-XMPP 262 gateway will contain a sip: or sips: URI. The SIP server needs to 263 determine the identity of the domain portion of the Request-URI or To 264 header, which it does by following the procedures discussed in 265 [I-D.ietf-stox-core]. Here we assume that the SIP server has 266 determined that the domain is serviced by an XMPP server, that it 267 contains or has available to it a SIP-to-XMPP gateway or connection 268 manager (which enables it to speak natively to XMPP servers), and 269 that it hands off the message to the gateway. 271 The SIP-to-XMPP gateway is then responsible for translating the 272 request into an XMPP message stanza from the SIP user to the XMPP 273 user and returning a SIP "200 OK" message to the sender: 275 Example: SIP user sends message (XMPP transformation): 277 | 279 | Neither, fair saint, if either thee dislike. 280 | 282 Note that the stanza handling rules specified in [RFC6121] allow the 283 receiving XMPP server to deliver a message stanza whose 'to' address 284 is a bare JID ("localpart@domainpart") to multiple connected devices. 285 This is similar to the "forking" of messages in SIP. 287 The mapping of SIP syntax to XMPP syntax SHOULD be as shown in the 288 following table. (Mappings for several aspects not mentioned here 289 are specified in [I-D.ietf-stox-chat].) 290 Table 2: Message syntax mapping from SIP to XMPP 292 +--------------------------+-----------------------------+ 293 | SIP Header or Contents | XMPP Element or Attribute | 294 +--------------------------+-----------------------------+ 295 | Call-ID | | 296 | Content-Language | xml:lang | 297 | CSeq | (no mapping) | 298 | From | from (1) | 299 | Subject | | 300 | Request-URI | to | 301 | body of MESSAGE | | 302 +--------------------------+-----------------------------+ 304 1. As shown in the foregoing example and described in 305 [I-D.ietf-stox-core], if the SIMPLE-XMPP gateway has information 306 about the GRUU [RFC5627] of the particular endpoint that sent the 307 SIP message then it SHOULD map the sender's address to a full JID 308 (localpart@domainpart/resourcepart) in the 'from' attribute of 309 the XMPP stanza and include the GRUU as the resourcepart. 311 When transforming SIP pager-mode messages, a SIMPLE-XMPP gateway 312 SHOULD specify no XMPP 'type' attribute or, equivalently, a 'type' 313 attribute whose value is "normal" [RFC6121]. 315 See Section 5 of this document about the handling of SIP message 316 bodies that contain content types other than plain text. 318 5. Content Types 320 SIP requests of type MESSAGE are allowed to contain essentially any 321 content type. The recommended procedures for SIMPLE-to-XMPP gateways 322 to use in handling these content types are as follows. 324 A SIMPLE-to-XMPP gateway MUST process SIP messages that contain 325 message bodies of type "text/plain" and MUST encapsulate such message 326 bodies as the XML character data of the XMPP element. 328 A SIMPLE-to-XMPP gateway SHOULD process SIP messages that contain 329 message bodies of type "text/html"; if so, a gateway MUST transform 330 the "text/html" content into XHTML content that conforms to the 331 XHTML-IM Integration Set specified in [XEP-0071]. 333 Although a SIMPLE-to-XMPP gateway MAY process SIP messages that 334 contain message bodies of types other than "text/plain" and "text/ 335 html", the handling of such content types is a matter of 336 implementation. 338 6. Internationalization Considerations 340 Both XMPP and SIP support the UTF-8 encoding [RFC3629] of Unicode 341 characters [UNICODE] within messages, and signalling of the language 342 for a particular message (in XMPP via the 'xml:lang' attribute and in 343 SIP via the Content-Language header). Several examples follow, using 344 the "XML Notation" for Unicode characters outside the ASCII range 345 described in [RFC3987]. 347 Example: SIP user sends message: 349 | MESSAGE sip:juliet@example.com SIP/2.0 350 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 351 | Max-Forwards: 70 352 | To: sip:juliet@example.com 353 | From: sip:romeo@example.net;tag=vwxyz 354 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 355 | CSeq: 1 MESSAGE 356 | Content-Type: text/plain 357 | Content-Length: 45 358 | Content-Language: cs 359 | 360 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 361 | nenavid쎭얡-li jedno nebo druh쎩. 363 Example: SIP user sends message (XMPP transformation): 365 | 368 | 369 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 370 | nenavid쎭얡-li jedno nebo druh쎩. 371 | 372 | 374 7. IANA Considerations 376 This document requests no actions of IANA. 378 8. Security Considerations 380 Detailed security considerations for instant messaging protocols are 381 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 382 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 383 (see also [RFC6120]). 385 This document specifies methods for exchanging instant messages 386 through a gateway that translates between SIP and XMPP. Such a 387 gateway MUST be compliant with the minimum security requirements of 388 the instant messaging protocols for which it translates (i.e., SIP 389 and XMPP). The addition of gateways to the security model of instant 390 messaging specified in [RFC2779] introduces some new risks. In 391 particular, end-to-end security properties (especially 392 confidentiality and integrity) between instant messaging user agents 393 that interface through a SIMPLE-XMPP gateway can be provided only if 394 common formats are supported. Specification of those common formats 395 is out of scope for this document, although it is preferred to use 396 [RFC3862] for instant messages. 398 9. References 400 9.1. Normative References 402 [I-D.ietf-stox-chat] 403 Saint-Andre, P., Loreto, S., Gavita, E., and N. Hossain, 404 "Interworking between the Session Initiation Protocol 405 (SIP) and the Extensible Messaging and Presence Protocol 406 (XMPP): One-to-One Text Chat Sessions", 407 draft-ietf-stox-chat-02 (work in progress), 408 September 2013. 410 [I-D.ietf-stox-core] 411 Saint-Andre, P., Houri, A., and J. Hildebrand, 412 "Interworking between the Session Initiation Protocol 413 (SIP) and the Extensible Messaging and Presence Protocol 414 (XMPP): Core", draft-ietf-stox-core-06 (work in progress), 415 September 2013. 417 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 418 Requirement Levels", BCP 14, RFC 2119, March 1997. 420 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 421 A., Peterson, J., Sparks, R., Handley, M., and E. 422 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 423 June 2002. 425 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., 426 and D. Gurle, "Session Initiation Protocol (SIP) Extension 427 for Instant Messaging", RFC 3428, December 2002. 429 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 430 Agent URIs (GRUUs) in the Session Initiation Protocol 431 (SIP)", RFC 5627, October 2009. 433 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 434 Protocol (XMPP): Core", RFC 6120, March 2011. 436 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 437 Protocol (XMPP): Instant Messaging and Presence", 438 RFC 6121, March 2011. 440 [XEP-0071] 441 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 443 9.2. Informative References 445 [I-D.ietf-simple-cpim-mapping] 446 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 447 Presence and Instant Messaging", 448 draft-ietf-simple-cpim-mapping-01 (work in progress), 449 June 2002. 451 [I-D.ietf-stox-groupchat] 452 Saint-Andre, P., Corretge, S., and S. Loreto, 453 "Interworking between the Session Initiation Protocol 454 (SIP) and the Extensible Messaging and Presence Protocol 455 (XMPP): Groupchat", draft-ietf-stox-groupchat-01 (work in 456 progress), September 2013. 458 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 459 / Presence Protocol Requirements", RFC 2779, 460 February 2000. 462 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 463 10646", STD 63, RFC 3629, November 2003. 465 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 466 (CPIM)", RFC 3860, August 2004. 468 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 469 Messaging (CPIM): Message Format", RFC 3862, August 2004. 471 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 472 Presence Protocol (XMPP) to Common Presence and Instant 473 Messaging (CPIM)", RFC 3922, October 2004. 475 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 476 Identifiers (IRIs)", RFC 3987, January 2005. 478 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 479 6.2", 2012, 480 . 482 Appendix A. Acknowledgements 484 The authors wish to thank the following individuals for their 485 feedback: Adrian Georgescu, Christer Holmberg, Saul Ibarra Corretge, 486 Olle Johansson, Paul Kyzivat, Salvatore Loreto, Daniel-Constantin 487 Mierla, and Tory Patnoe. 489 The authors gratefully acknowledge the assistance of Markus Isomaki 490 and Yana Stamcheva as the working group chairs and Gonzalo Camarillo 491 as the sponsoring Area Director. 493 Authors' Addresses 495 Peter Saint-Andre 496 Cisco Systems, Inc. 497 1899 Wynkoop Street, Suite 600 498 Denver, CO 80202 499 USA 501 Phone: +1-303-308-3282 502 Email: psaintan@cisco.com 504 Avshalom Houri 505 IBM 506 Rorberg Building, Pekris 3 507 Rehovot 76123 508 Israel 510 Email: avshalom@il.ibm.com 512 Joe Hildebrand 513 Cisco Systems, Inc. 514 1899 Wynkoop Street, Suite 600 515 Denver, CO 80202 516 USA 518 Email: jhildebr@cisco.com