idnits 2.17.1 draft-ietf-stox-im-06.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 (December 10, 2013) is 3783 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-03 == Outdated reference: A later version (-11) exists of draft-ietf-stox-core-07 -- 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: June 13, 2014 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 December 10, 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-06 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 June 13, 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 1: 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 2: 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 3: 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 or Request-URI | 220 | type | (no mapping) (2) | 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. 229 2. Because there is no SIP header field that matches the meaning of 230 the XMPP message 'type' values ("normal", "chat", "groupchat", 231 "headline", "error"), no general mapping is possible here. 233 4. SIP to XMPP 235 As described in [RFC3428], a single instant message is a SIP MESSAGE 236 request sent from a SIP user agent to an intended recipient who is 237 most generally referenced by an Instant Message URI of the form 238 but who might be referenced by a SIP or SIPS URI of 239 the form or . Here again we 240 introduce the simplifying assumption that the user agent is 241 controlled by a human user, whom we shall dub . 243 When Romeo wants to send an instant message to Juliet, he interacts 244 with his SIP user agent, which generates a SIP MESSAGE request. The 245 syntax of the MESSAGE request is defined in [RFC3428]. The following 246 is an example of such a request: 248 Example 4: SIP user sends message: 250 | MESSAGE sip:juliet@example.com SIP/2.0 251 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 252 | Max-Forwards: 70 253 | To: sip:juliet@example.com 254 | From: sip:romeo@example.net;tag=vwxyz 255 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 256 | CSeq: 1 MESSAGE 257 | Content-Type: text/plain 258 | Content-Length: 44 259 | 260 | Neither, fair saint, if either thee dislike. 262 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 263 with an im: URI should resolve it to a sip: or sips: URI. Therefore 264 we assume that the Request-URI of a request received by a SIMPLE-XMPP 265 gateway will contain a sip: or sips: URI. The SIP server needs to 266 determine the identity of the domain portion of the Request-URI or To 267 header, which it does by following the procedures discussed in 268 [I-D.ietf-stox-core]. Here we assume that the SIP server has 269 determined that the domain is serviced by an XMPP server, that it 270 contains or has available to it a SIP-to-XMPP gateway or connection 271 manager (which enables it to speak natively to XMPP servers), and 272 that it hands off the message to the gateway. 274 The SIP-to-XMPP gateway is then responsible for translating the 275 request into an XMPP message stanza from the SIP user to the XMPP 276 user and returning a SIP "200 OK" message to the sender: 278 Example 5: SIP user sends message (XMPP transformation): 280 | 282 | Neither, fair saint, if either thee dislike. 283 | 285 Note that the stanza handling rules specified in [RFC6121] allow the 286 receiving XMPP server to deliver a message stanza whose 'to' address 287 is a bare JID ("localpart@domainpart") to multiple connected devices. 288 This is similar to the "forking" of messages in SIP. 290 The mapping of SIP syntax to XMPP syntax SHOULD be as shown in the 291 following table. (Mappings for several aspects not mentioned here 292 are specified in [I-D.ietf-stox-chat].) 293 Table 2: Message syntax mapping from SIP to XMPP 295 +--------------------------+-----------------------------+ 296 | SIP Header or Contents | XMPP Element or Attribute | 297 +--------------------------+-----------------------------+ 298 | Call-ID | | 299 | Content-Language | xml:lang | 300 | CSeq | (no mapping) | 301 | From | from (1) | 302 | Subject | | 303 | Request-URI or To | to | 304 | body of MESSAGE | | 305 +--------------------------+-----------------------------+ 307 1. As shown in the foregoing example and described in 308 [I-D.ietf-stox-core], if the SIMPLE-XMPP gateway has information 309 about the GRUU [RFC5627] of the particular endpoint that sent the 310 SIP message then it SHOULD map the sender's address to a full JID 311 (localpart@domainpart/resourcepart) in the 'from' attribute of 312 the XMPP stanza and include the GRUU as the resourcepart. 314 When transforming SIP pager-mode messages, a SIMPLE-XMPP gateway 315 SHOULD specify no XMPP 'type' attribute or, equivalently, a 'type' 316 attribute whose value is "normal" [RFC6121]. 318 See Section 5 of this document about the handling of SIP message 319 bodies that contain content types other than plain text. 321 5. Content Types 323 SIP requests of type MESSAGE are allowed to contain essentially any 324 content type. The recommended procedures for SIMPLE-to-XMPP gateways 325 to use in handling these content types are as follows. 327 A SIMPLE-to-XMPP gateway MUST process SIP messages that contain 328 message bodies of type "text/plain" and MUST encapsulate such message 329 bodies as the XML character data of the XMPP element. 331 A SIMPLE-to-XMPP gateway SHOULD process SIP messages that contain 332 message bodies of type "text/html"; if so, a gateway MUST transform 333 the "text/html" content into XHTML content that conforms to the 334 XHTML-IM Integration Set specified in [XEP-0071]. 336 Although a SIMPLE-to-XMPP gateway MAY process SIP messages that 337 contain message bodies of types other than "text/plain" and "text/ 338 html", the handling of such content types is a matter of 339 implementation. 341 6. Internationalization Considerations 343 Both XMPP and SIP support the UTF-8 encoding [RFC3629] of Unicode 344 characters [UNICODE] within messages, and signalling of the language 345 for a particular message (in XMPP via the 'xml:lang' attribute and in 346 SIP via the Content-Language header). Several examples follow, using 347 the "XML Notation" for Unicode characters outside the ASCII range 348 described in [RFC3987]. 350 Example 6: SIP user sends message: 352 | MESSAGE sip:juliet@example.com SIP/2.0 353 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 354 | Max-Forwards: 70 355 | To: sip:juliet@example.com 356 | From: sip:romeo@example.net;tag=vwxyz 357 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E 358 | CSeq: 1 MESSAGE 359 | Content-Type: text/plain 360 | Content-Length: 45 361 | Content-Language: cs 362 | 363 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 364 | nenavid쎭얡-li jedno nebo druh쎩. 366 Example 7: SIP user sends message (XMPP transformation): 368 | 371 | 372 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡, 373 | nenavid쎭얡-li jedno nebo druh쎩. 374 | 375 | 377 7. IANA Considerations 379 This document requests no actions of IANA. 381 8. Security Considerations 383 Detailed security considerations for instant messaging protocols are 384 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 385 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 386 (see also [RFC6120]). The security considerations provided in 388 [I-D.ietf-stox-core] also apply. 390 This document specifies methods for exchanging instant messages 391 through a gateway that translates between SIP and XMPP. Such a 392 gateway MUST be compliant with the minimum security requirements of 393 the instant messaging protocols for which it translates (i.e., SIP 394 and XMPP). The addition of gateways to the security model of instant 395 messaging specified in [RFC2779] introduces some new risks. In 396 particular, end-to-end security properties (especially 397 confidentiality and integrity) between instant messaging user agents 398 that interface through a SIMPLE-XMPP gateway can be provided only if 399 common formats are supported. Specification of those common formats 400 is out of scope for this document, although it is preferred to use 401 [RFC3862] for instant messages. 403 9. References 405 9.1. Normative References 407 [I-D.ietf-stox-chat] 408 Saint-Andre, P., Loreto, S., Gavita, E., and N. Hossain, 409 "Interworking between the Session Initiation Protocol 410 (SIP) and the Extensible Messaging and Presence Protocol 411 (XMPP): One-to-One Text Chat Sessions", 412 draft-ietf-stox-chat-03 (work in progress), October 2013. 414 [I-D.ietf-stox-core] 415 Saint-Andre, P., Houri, A., and J. Hildebrand, 416 "Interworking between the Session Initiation Protocol 417 (SIP) and the Extensible Messaging and Presence Protocol 418 (XMPP): Core", draft-ietf-stox-core-07 (work in progress), 419 October 2013. 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", 442 RFC 6121, March 2011. 444 [XEP-0071] 445 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 447 9.2. Informative References 449 [I-D.ietf-simple-cpim-mapping] 450 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 451 Presence and Instant Messaging", 452 draft-ietf-simple-cpim-mapping-01 (work in progress), 453 June 2002. 455 [I-D.ietf-stox-groupchat] 456 Saint-Andre, P., Corretge, S., and S. Loreto, 457 "Interworking between the Session Initiation Protocol 458 (SIP) and the Extensible Messaging and Presence Protocol 459 (XMPP): Groupchat", draft-ietf-stox-groupchat-01 (work in 460 progress), September 2013. 462 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 463 / Presence Protocol Requirements", RFC 2779, 464 February 2000. 466 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 467 10646", STD 63, RFC 3629, November 2003. 469 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 470 (CPIM)", RFC 3860, August 2004. 472 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 473 Messaging (CPIM): Message Format", RFC 3862, August 2004. 475 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 476 Presence Protocol (XMPP) to Common Presence and Instant 477 Messaging (CPIM)", RFC 3922, October 2004. 479 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 480 Identifiers (IRIs)", RFC 3987, January 2005. 482 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 483 6.2", 2012, 484 . 486 Appendix A. Acknowledgements 488 The authors wish to thank the following individuals for their 489 feedback: Dave Cridland, Adrian Georgescu, Christer Holmberg, Saul 490 Ibarra Corretge, Olle Johansson, Paul Kyzivat, Salvatore Loreto, 491 Daniel-Constantin Mierla, and Tory Patnoe. 493 The authors gratefully acknowledge the assistance of Markus Isomaki 494 and Yana Stamcheva as the working group chairs and Gonzalo Camarillo 495 as the sponsoring Area Director. 497 Authors' Addresses 499 Peter Saint-Andre 500 Cisco Systems, Inc. 501 1899 Wynkoop Street, Suite 600 502 Denver, CO 80202 503 USA 505 Phone: +1-303-308-3282 506 Email: psaintan@cisco.com 508 Avshalom Houri 509 IBM 510 Rorberg Building, Pekris 3 511 Rehovot 76123 512 Israel 514 Email: avshalom@il.ibm.com 516 Joe Hildebrand 517 Cisco Systems, Inc. 518 1899 Wynkoop Street, Suite 600 519 Denver, CO 80202 520 USA 522 Email: jhildebr@cisco.com