idnits 2.17.1 draft-ietf-stox-im-03.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 (September 6, 2013) is 3882 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-core-04 -- Possible downref: Non-RFC (?) normative reference: ref. 'XEP-0071' Summary: 0 errors (**), 0 flaws (~~), 2 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: March 10, 2014 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 September 6, 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-03 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 March 10, 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 . . . . . . . . . . . . . . . . . . . . . . . . 7 60 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 61 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 62 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 63 8.1. Normative References . . . . . . . . . . . . . . . . . . . 8 64 8.2. Informative References . . . . . . . . . . . . . . . . . . 9 65 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 10 68 1. Introduction 70 In order to help ensure interworking between instant messaging 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, as developed within the SIP for Instant 78 Messaging and Presence Leveraging Extensions (SIMPLE) Working 79 Group; the relevant specification for instant messaging is 80 [RFC3428] 81 o The Extensible Messaging and Presence Protocol (XMPP), which 82 consists of a formalization of the core XML streaming protocols 83 developed originally by the Jabber open-source community; the 84 relevant specifications are [RFC6120] for the XML streaming layer 85 and [RFC6121] for basic presence and instant messaging extensions 87 One approach to helping ensure interworking between these protocols 88 is to map each protocol to the abstract semantics described in 89 [RFC3860]; that is the approach taken by 90 [I-D.ietf-simple-cpim-mapping] and [RFC3922]. By contrast, the 91 approach taken in this document is to directly map semantics from one 92 protocol to another (i.e., from SIP/SIMPLE to XMPP and vice-versa). 94 Both XMPP and IM-aware SIP systems enable entities to exchange 95 "instant messages". The term "instant message" usually refers to 96 messages sent between two entities for delivery in close to real time 97 (rather than messages that are 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 instant messaging. One-to-one chat sessions 101 and multi-party groupchat are covered in separate documents. 103 The architectural assumptions underlying such direct mappings are 104 provided in [I-D.ietf-stox-core], including mapping of addresses and 105 error condisions. The mappings specified in this document cover 106 basic instant messaging functionality, i.e., the exchange of a single 107 instant message between a SIP user and an XMPP user in either 108 direction. Mapping of more advanced functionality is out of scope 109 for this document, but other documents in this "series" cover such 110 topics. 112 The discussion venue for this document is the mailing list of the 113 STOX WG; visit https://www.ietf.org/mailman/listinfo/stox for 114 subscription information and discussion archives. 116 2. Terminology 118 A number of terms used here are explained in [RFC3261], [RFC3428], 119 [RFC6120], and [RFC6121]. 121 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 122 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 123 "OPTIONAL" in this document are to be interpreted as described in 124 [RFC2119]. 126 3. XMPP to SIP 128 As described in [RFC6121], a single instant message is an XML 129 stanza of type "normal" sent over an XML stream (since 130 "normal" is the default for the 'type' attribute of the 131 stanza, the attribute is often omitted). In this document we will 132 assume that such a message is sent from an XMPP client to an XMPP 133 server over an XML stream negotiated between the client and the 134 server, and that the client is controlled by a human user (this is a 135 simplifying assumption introduced for explanatory purposes only; the 136 XMPP sender could be a bot-controlled client, a component such as a 137 workflow application, a server, etc.). Continuing the tradition of 138 Shakespearean examples in XMPP documentation, we will say that the 139 XMPP user has an XMPP address of . 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/resourcepart"). The following is an 147 example of such a stanza: 149 Example: XMPP user sends message: 151 | 153 | Art thou not Romeo, and a Montague? 154 | 156 Upon receiving such a stanza, the XMPP server to which Juliet has 157 connected needs to determine the identity of the foreign domain, 158 which 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 foreign 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: Hr0zny9l3@example.com 177 | CSeq: 1 MESSAGE 178 | Content-Type: text/plain 179 | Content-Length: 35 180 | 181 | Art thou not Romeo, and a Montague? 183 The mapping of XMPP syntax elements to SIP syntax elements SHOULD be 184 as shown in the following table. (Mappings for elements not 185 mentioned are undefined.) 187 Table 1: Message syntax mapping from XMPP to SIP 189 +-----------------------------+--------------------------+ 190 | XMPP Element or Attribute | SIP Header or Contents | 191 +-----------------------------+--------------------------+ 192 | | body of MESSAGE | 193 | | Subject | 194 | | Call-ID | 195 | from | From (1) | 196 | id | (no mapping) | 197 | to | To | 198 | type | (no mapping) | 199 | xml:lang | Content-Language | 200 +-----------------------------+--------------------------+ 202 1. As shown in the foregoing example and described in 203 [I-D.ietf-stox-core], the XMPP-SIMPLE gateway SHOULD map the full 204 JID (localpart@domainpart/resourcepart) of the XMPP sender to the 205 SIP From header and include the resourcepart to the GRUU portion 206 of the SIP URI [RFC5627]. 208 4. SIP to XMPP 210 As described in [RFC3428], a single instant message is a SIP MESSAGE 211 request sent from a SIP user agent to an intended recipient who is 212 most generally referenced by an Instant Message URI of the form 213 but who might be referenced by a SIP or SIPS URI of 214 the form or . Here again we 215 introduce the simplifying assumption that the user agent is 216 controlled by a human user, whom we shall dub . 218 When Romeo wants to send an instant message to Juliet, he interacts 219 with his SIP user agent, which generates a SIP MESSAGE request. The 220 syntax of the MESSAGE request is defined in [RFC3428]. The following 221 is an example of such a request: 223 Example: SIP user sends message: 225 | MESSAGE sip:juliet@example.com SIP/2.0 226 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 227 | Max-Forwards: 70 228 | To: sip:juliet@example.com 229 | From: sip:romeo@example.net 230 | Call-ID: M4spr4vdu@example.net 231 | CSeq: 1 MESSAGE 232 | Content-Type: text/plain 233 | Content-Length: 44 234 | 235 | Neither, fair saint, if either thee dislike. 237 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 238 with an im: URI should resolve it to a sip: or sips: URI. Therefore 239 we assume that the Request-URI of a request received by a SIMPLE-XMPP 240 gateway will contain a sip: or sips: URI. The gateway SHOULD resolve 241 that address to an im: URI for SIP MESSAGE requests, then follow the 242 rules in [RFC3861] regarding the "_im" SRV service for the target 243 domain contained in the Request-URI. If SRV address resolution fails 244 for the "_im" service, the gateway MUST either attempt a lookup for 245 the "_xmpp-server" service as specified in [RFC6120] or return an 246 error to the sender (the SIP "502 Bad Gateway" error seems most 247 appropriate; see [I-D.ietf-stox-core] for details). If SRV address 248 resolution succeeds, the gateway is responsible for translating the 249 request into an XMPP message stanza from the SIP user to the XMPP 250 user and returning a SIP "200 OK" message to the sender: 252 Example: SIP user sends message (XMPP transformation): 254 | 256 | Neither, fair saint, if either thee dislike. 257 | 259 The mapping of SIP syntax elements to XMPP syntax elements SHOULD be 260 as shown in the following table. (Mappings for elements not 261 mentioned in the foregoing table are undefined.) 263 Table 2: Message syntax mapping from SIP to XMPP 265 +--------------------------+-----------------------------+ 266 | SIP Header or Contents | XMPP Element or Attribute | 267 +--------------------------+-----------------------------+ 268 | Call-ID | | 269 | Content-Language | xml:lang | 270 | CSeq | (no mapping) | 271 | From | from (1) | 272 | Subject | | 273 | Request-URI | to | 274 | body of MESSAGE | | 275 +--------------------------+-----------------------------+ 277 1. As shown in the foregoing example and described in 278 [I-D.ietf-stox-core], if the SIMPLE-XMPP gateway has information 279 about the GRUU [RFC5627] of the particular endpoint that sent the 280 SIP message then it SHOULD map the sender's address to a full JID 281 (localpart@domainpart/resourcepart) in the 'from' attribute of 282 the XMPP stanza and include the GRUU as the resourcepart. 284 When transforming SIP pager-mode messages, a SIMPLE-XMPP gateway 285 SHOULD specify no XMPP 'type' attribute or, equivalently, a 'type' 286 attribute whose value is "normal" [RFC6121]. 288 See Section 5 of this document about the handling of SIP message 289 bodies that contain content types other than plain text. 291 5. Content Types 293 SIP requests of type MESSAGE are allowed to contain essentially any 294 content type. The recommended procedures for SIMPLE-to-XMPP gateways 295 to use in handling these content types are as follows. 297 A SIMPLE-to-XMPP gateway MUST process SIP messages that contain 298 message bodies of type "text/plain" and MUST encapsulate such message 299 bodies as the XML character data of the XMPP element. 301 A SIMPLE-to-XMPP gateway SHOULD process SIP messages that contain 302 message bodies of type "text/html"; if so, a gateway MUST transform 303 the "text/html" content into XHTML content that conforms to the XHTML 304 1.0 Integration Set specified in [XEP-0071]. 306 Although a SIMPLE-to-XMPP gateway MAY process SIP messages that 307 contain message bodies of types other than "text/plain" and "text/ 308 html", the handling of such content types is a matter of 309 implementation. 311 6. Security Considerations 313 Detailed security considerations for instant messaging protocols are 314 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 315 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 316 (see also [RFC6120]). 318 This document specifies methods for exchanging instant messages 319 through a gateway that translates between SIP and XMPP. Such a 320 gateway MUST be compliant with the minimum security requirements of 321 the instant messaging protocols for which it translates (i.e., SIP 322 and XMPP). The addition of gateways to the security model of instant 323 messaging specified in [RFC2779] introduces some new risks. In 324 particular, end-to-end security properties (especially 325 confidentiality and integrity) between instant messaging user agents 326 that interface through a SIMPLE-XMPP gateway can be provided only if 327 common formats are supported. Specification of those common formats 328 is out of scope for this document, although it is preferred to use 329 [RFC3862] for instant messages. 331 7. IANA Considerations 333 This document requests no actions of IANA. 335 8. References 337 8.1. Normative References 339 [I-D.ietf-stox-core] 340 Saint-Andre, P., Houri, A., and J. Hildebrand, 341 "Interworking between the Session Initiation Protocol 342 (SIP) and the Extensible Messaging and Presence Protocol 343 (XMPP): Core", draft-ietf-stox-core-04 (work in progress), 344 September 2013. 346 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 347 Requirement Levels", BCP 14, RFC 2119, March 1997. 349 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 350 A., Peterson, J., Sparks, R., Handley, M., and E. 351 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 352 June 2002. 354 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., 355 and D. Gurle, "Session Initiation Protocol (SIP) Extension 356 for Instant Messaging", RFC 3428, December 2002. 358 [RFC3861] Peterson, J., "Address Resolution for Instant Messaging 359 and Presence", RFC 3861, August 2004. 361 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 362 Agent URIs (GRUUs) in the Session Initiation Protocol 363 (SIP)", RFC 5627, October 2009. 365 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 366 Protocol (XMPP): Core", RFC 6120, March 2011. 368 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 369 Protocol (XMPP): Instant Messaging and Presence", 370 RFC 6121, March 2011. 372 [XEP-0071] 373 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 375 8.2. Informative References 377 [I-D.ietf-simple-cpim-mapping] 378 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 379 Presence and Instant Messaging", 380 draft-ietf-simple-cpim-mapping-01 (work in progress), 381 June 2002. 383 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 384 / Presence Protocol Requirements", RFC 2779, 385 February 2000. 387 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 388 (CPIM)", RFC 3860, August 2004. 390 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 391 Messaging (CPIM): Message Format", RFC 3862, August 2004. 393 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 394 Presence Protocol (XMPP) to Common Presence and Instant 395 Messaging (CPIM)", RFC 3922, October 2004. 397 Appendix A. Acknowledgements 399 The authors wish to thank the following individuals for their 400 feedback: Adrian Georgescu, Christer Holmberg, Saul Ibarra Corretge, 401 Paul Kyzivat, Salvatore Loreto, and Tory Patnoe. 403 Authors' Addresses 405 Peter Saint-Andre 406 Cisco Systems, Inc. 407 1899 Wynkoop Street, Suite 600 408 Denver, CO 80202 409 USA 411 Phone: +1-303-308-3282 412 Email: psaintan@cisco.com 414 Avshalom Houri 415 IBM 416 Rorberg Building, Pekris 3 417 Rehovot 76123 418 Israel 420 Email: avshalom@il.ibm.com 422 Joe Hildebrand 423 Cisco Systems, Inc. 424 1899 Wynkoop Street, Suite 600 425 Denver, CO 80202 426 USA 428 Email: jhildebr@cisco.com