idnits 2.17.1 draft-ietf-stox-im-01.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 (August 20, 2013) is 3892 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-02 -- 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: February 21, 2014 IBM 6 J. Hildebrand 7 Cisco Systems, Inc. 8 August 20, 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-01 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 February 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. Security Considerations . . . . . . . . . . . . . . . . . . . 9 61 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 62 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 63 8.1. Normative References . . . . . . . . . . . . . . . . . . . 9 64 8.2. Informative References . . . . . . . . . . . . . . . . . . 10 65 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11 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 Shakespeare examples in XMPP documentation, we will say that the XMPP 139 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 either delivers it to a local recipient (if the hostname in 158 the 'to' attribute matches one of the hostnames serviced by the XMPP 159 server) or attempts to route it to the foreign domain that services 160 the hostname in the 'to' attribute. Naturally, in this document we 161 assume that the hostname in the 'to' attribute is an IM-aware SIP 162 service hosted by a separate server. As specified in [RFC6121], the 163 XMPP server needs to determine the identity of the foreign domain, 164 which it does by performing one or more DNS SRV lookups [RFC2782]. 165 For message stanzas, the order of lookups recommended by [RFC6121] is 166 to first try the "_xmpp-server" service as specified in [RFC6120] and 167 to then try the "_im" service as specified in [RFC3861]. Here we 168 assume that the first lookup will fail but that the second lookup 169 will succeed and return a resolution "_im._simple.example.net.", 170 since we have already assumed that the example.net hostname is 171 running a SIP instant messaging service. (Note: The XMPP server may 172 have previously determined that the foreign domain is a SIMPLE 173 server, in which case it would not need to perform the SRV lookups; 174 the caching of such information is a matter of implementation and 175 local service policy, and is therefore out of scope for this 176 document.) 178 Once the XMPP server has determined that the foreign domain is 179 serviced by a SIMPLE server, it must determine how to proceed. We 180 here assume that the XMPP server contains or has available to it an 181 XMPP-SIMPLE gateway (such an architecture is described in 182 [I-D.ietf-stox-core]). The XMPP server would then deliver the 183 message stanza to the XMPP-SIMPLE gateway. 185 The XMPP-SIMPLE gateway is then responsible for translating the XMPP 186 message stanza into a SIP MESSAGE request from the XMPP user to the 187 SIP user: 189 Example: XMPP user sends message (SIP transformation): 191 | MESSAGE sip:romeo@example.net SIP/2.0 192 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse 193 | Max-Forwards: 70 194 | To: sip:romeo@example.net 195 | From: sip:juliet@example.com;gr=balcony 196 | Call-ID: Hr0zny9l3@example.com 197 | CSeq: 1 MESSAGE 198 | Content-Type: text/plain 199 | Content-Length: 35 200 | 201 | Art thou not Romeo, and a Montague? 203 The mapping of XMPP syntax elements to SIP syntax elements SHOULD be 204 as shown in the following table. (Mappings for elements not 205 mentioned are undefined.) 206 Table 1: Message syntax mapping from XMPP to SIP 208 +-----------------------------+--------------------------+ 209 | XMPP Element or Attribute | SIP Header or Contents | 210 +-----------------------------+--------------------------+ 211 | | body of MESSAGE | 212 | | Subject | 213 | | Call-ID | 214 | from | From (1) | 215 | id | (no mapping) | 216 | to | To | 217 | type | (no mapping) | 218 | xml:lang | Content-Language | 219 +-----------------------------+--------------------------+ 221 1. As shown in the foregoing example and described in 222 [I-D.ietf-stox-core], the XMPP-SIMPLE gateway SHOULD map the full 223 JID (localpart@domainpart/resourcepart) of the XMPP sender to the 224 SIP From header and include the resourcepart to the GRUU portion 225 of the SIP URI [RFC5627]. 227 4. SIP to XMPP 229 As described in [RFC3428], a single instant message is a SIP MESSAGE 230 request sent from a SIP user agent to an intended recipient who is 231 most generally referenced by an Instant Message URI of the form 232 but who might be referenced by a SIP or SIPS URI of 233 the form or . Here again we 234 introduce the simplifying assumption that the user agent is 235 controlled by a human user, whom we shall dub . 237 When Romeo wants to send an instant message to Juliet, he interacts 238 with his SIP user agent, which generates a SIP MESSAGE request. The 239 syntax of the MESSAGE request is defined in [RFC3428]. The following 240 is an example of such a request: 242 Example: SIP user sends message: 244 | MESSAGE sip:juliet@example.com SIP/2.0 245 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677 246 | Max-Forwards: 70 247 | To: sip:juliet@example.com 248 | From: sip:romeo@example.net 249 | Call-ID: M4spr4vdu@example.net 250 | CSeq: 1 MESSAGE 251 | Content-Type: text/plain 252 | Content-Length: 44 253 | 254 | Neither, fair saint, if either thee dislike. 256 Section 5 of [RFC3428] stipulates that a SIP User Agent presented 257 with an im: URI should resolve it to a sip: or sips: URI. Therefore 258 we assume that the Request-URI of a request received by a SIMPLE-XMPP 259 gateway will contain a sip: or sips: URI. The gateway SHOULD resolve 260 that address to an im: URI for SIP MESSAGE requests, then follow the 261 rules in [RFC3861] regarding the "_im" SRV service for the target 262 domain contained in the Request-URI. If SRV address resolution fails 263 for the "_im" service, the gateway MUST either attempt a lookup for 264 the "_xmpp-server" service as specified in [RFC6120] or return an 265 error to the sender (the SIP "502 Bad Gateway" error seems most 266 appropriate; see [I-D.ietf-stox-core] for details). If SRV address 267 resolution succeeds, the gateway is responsible for translating the 268 request into an XMPP message stanza from the SIP user to the XMPP 269 user and returning a SIP "200 OK" message to the sender: 271 Example: SIP user sends message (XMPP transformation): 273 | 275 | Neither, fair saint, if either thee dislike. 276 | 278 The mapping of SIP syntax elements to XMPP syntax elements SHOULD be 279 as shown in the following table. (Mappings for elements not 280 mentioned in the foregoing table are undefined.) 281 Table 2: Message syntax mapping from SIP to XMPP 283 +--------------------------+-----------------------------+ 284 | SIP Header or Contents | XMPP Element or Attribute | 285 +--------------------------+-----------------------------+ 286 | Call-ID | | 287 | Content-Language | xml:lang | 288 | CSeq | (no mapping) | 289 | From | from (1) | 290 | Subject | | 291 | Request-URI | to | 292 | body of MESSAGE | | 293 +--------------------------+-----------------------------+ 295 1. As shown in the foregoing example and described in 296 [I-D.ietf-stox-core], if the SIMPLE-XMPP gateway has information 297 about the GRUU [RFC5627] of the particular endpoint that sent the 298 SIP message then it SHOULD map the sender's address to a full JID 299 (localpart@domainpart/resourcepart) in the 'from' attribute of 300 the XMPP stanza and include the GRUU as the resourcepart. 302 When transforming SIP pager-mode messages, a SIMPLE-XMPP gateway 303 SHOULD specify no XMPP 'type' attribute or, equivalently, a 'type' 304 attribute whose value is "normal" [RFC6121]. 306 See Section 5 of this document about the handling of SIP message 307 bodies that contain content types other than plain text. 309 5. Content Types 311 SIP requests of type MESSAGE are allowed to contain essentially any 312 content type. The recommended procedures for SIMPLE-to-XMPP gateways 313 to use in handling these content types are as follows. 315 A SIMPLE-to-XMPP gateway MUST process SIP messages that contain 316 message bodies of type "text/plain" and MUST encapsulate such message 317 bodies as the XML character data of the XMPP element. 319 A SIMPLE-to-XMPP gateway SHOULD process SIP messages that contain 320 message bodies of type "text/html"; if so, a gateway MUST transform 321 the "text/html" content into XHTML content that conforms to the XHTML 322 1.0 Integration Set specified in [XEP-0071]. 324 Although a SIMPLE-to-XMPP gateway MAY process SIP messages that 325 contain message bodies of types other than "text/plain" and "text/ 326 html", the handling of such content types is a matter of 327 implementation. 329 6. Security Considerations 331 Detailed security considerations for instant messaging protocols are 332 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see 333 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121] 334 (see also [RFC6120]). 336 This document specifies methods for exchanging instant messages 337 through a gateway that translates between SIP and XMPP. Such a 338 gateway MUST be compliant with the minimum security requirements of 339 the instant messaging protocols for which it translates (i.e., SIP 340 and XMPP). The addition of gateways to the security model of instant 341 messaging specified in [RFC2779] introduces some new risks. In 342 particular, end-to-end security properties (especially 343 confidentiality and integrity) between instant messaging user agents 344 that interface through a SIMPLE-XMPP gateway can be provided only if 345 common formats are supported. Specification of those common formats 346 is out of scope for this document, although it is preferred to use 347 [RFC3862] for instant messages. 349 7. IANA Considerations 351 This document requests no actions of IANA. 353 8. References 355 8.1. Normative References 357 [I-D.ietf-stox-core] 358 Saint-Andre, P., Houri, A., and J. Hildebrand, 359 "Interworking between the Session Initiation Protocol 360 (SIP) and the Extensible Messaging and Presence Protocol 361 (XMPP): Core", draft-ietf-stox-core-02 (work in progress), 362 August 2013. 364 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 365 Requirement Levels", BCP 14, RFC 2119, March 1997. 367 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 368 specifying the location of services (DNS SRV)", RFC 2782, 369 February 2000. 371 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 372 A., Peterson, J., Sparks, R., Handley, M., and E. 373 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 374 June 2002. 376 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., 377 and D. Gurle, "Session Initiation Protocol (SIP) Extension 378 for Instant Messaging", RFC 3428, December 2002. 380 [RFC3861] Peterson, J., "Address Resolution for Instant Messaging 381 and Presence", RFC 3861, August 2004. 383 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 384 Agent URIs (GRUUs) in the Session Initiation Protocol 385 (SIP)", RFC 5627, October 2009. 387 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 388 Protocol (XMPP): Core", RFC 6120, March 2011. 390 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 391 Protocol (XMPP): Instant Messaging and Presence", 392 RFC 6121, March 2011. 394 [XEP-0071] 395 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012. 397 8.2. Informative References 399 [I-D.ietf-simple-cpim-mapping] 400 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE 401 Presence and Instant Messaging", 402 draft-ietf-simple-cpim-mapping-01 (work in progress), 403 June 2002. 405 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging 406 / Presence Protocol Requirements", RFC 2779, 407 February 2000. 409 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 410 (CPIM)", RFC 3860, August 2004. 412 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 413 Messaging (CPIM): Message Format", RFC 3862, August 2004. 415 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 416 Presence Protocol (XMPP) to Common Presence and Instant 417 Messaging (CPIM)", RFC 3922, October 2004. 419 Appendix A. Acknowledgements 421 The authors wish to thank the following individuals for their 422 feedback: Adrian Georgescu, Christer Holmberg, Saul Ibarra Corretge, 423 Paul Kyzivat, Salvatore Loreto, and Tory Patnoe. 425 Authors' Addresses 427 Peter Saint-Andre 428 Cisco Systems, Inc. 429 1899 Wynkoop Street, Suite 600 430 Denver, CO 80202 431 USA 433 Phone: +1-303-308-3282 434 Email: psaintan@cisco.com 436 Avshalom Houri 437 IBM 438 Building 18/D, Kiryat Weizmann Science Park 439 Rehovot 76123 440 Israel 442 Email: avshalom@il.ibm.com 444 Joe Hildebrand 445 Cisco Systems, Inc. 446 1899 Wynkoop Street, Suite 600 447 Denver, CO 80202 448 USA 450 Email: jhildebr@cisco.com