idnits 2.17.1
draft-ietf-stox-im-12.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 (February 13, 2015) is 3353 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)
-- Possible downref: Non-RFC (?) normative reference: ref. 'XEP-0071'
== Outdated reference: A later version (-11) exists of
draft-ietf-stox-chat-10
== Outdated reference: A later version (-11) exists of
draft-ietf-stox-groupchat-10
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: August 17, 2015 IBM
6 J. Hildebrand
7 Cisco Systems, Inc.
8 February 13, 2015
10 Interworking between the Session Initiation Protocol (SIP) and the
11 Extensible Messaging and Presence Protocol (XMPP): Instant Messaging
12 draft-ietf-stox-im-12
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 August 17, 2015.
38 Copyright Notice
40 Copyright (c) 2015 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 . . . . . . . . . . . . . . . . . . . . . . . . . 4
59 5. SIP to XMPP . . . . . . . . . . . . . . . . . . . . . . . . . 6
60 6. Message Size . . . . . . . . . . . . . . . . . . . . . . . . 8
61 7. Content Types . . . . . . . . . . . . . . . . . . . . . . . . 8
62 8. Internationalization Considerations . . . . . . . . . . . . . 8
63 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
64 10. Security Considerations . . . . . . . . . . . . . . . . . . . 9
65 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 10
66 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11
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, in particular the MESSAGE method extension
79 [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),
93 since that is how existing systems solve the interworking problem.
95 Both XMPP and IM-capable 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 [RFC7247], including mapping of addresses and error
107 conditions. The mappings specified in this document cover basic
108 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. Intended Audience
116 The documents in this series are intended for use by software
117 developers who have an existing system based on one of these
118 technologies (e.g., SIP), and would like to enable communication from
119 that existing system to systems based on the other technology (e.g.,
120 XMPP). We assume that readers are familiar with the core
121 specifications for both SIP [RFC3261] and XMPP [RFC6120], with the
122 base document for this series [RFC7247], and with the following IM-
123 related specifications:
125 o Session Initiation Protocol (SIP) Extension for Instant Messaging
126 [RFC3428]
128 o Extensible Messaging and Presence Protocol: Instant Messaging and
129 Presence [RFC6121]
131 Note well that not all protocol-compliant messages are shown (such as
132 SIP 100 TRYING messages), in order to focus the reader on the
133 essential aspects of the protocol flows.
135 3. Terminology
137 A number of terms used here are explained in [RFC3261], [RFC3428],
138 [RFC6120], and [RFC6121].
140 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
141 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
142 "OPTIONAL" in this document are to be interpreted as described in
143 [RFC2119].
145 4. XMPP to SIP
147 As described in [RFC6121], a single instant message is an XML
148 stanza of type "normal" sent over an XML stream (since
149 "normal" is the default for the 'type' attribute of the
150 stanza, the attribute is often omitted).
152 When the XMPP user Juliet wants to send an
153 instant message to Romeo, she interacts with her XMPP client, which
154 generates an XMPP stanza. The syntax of the
155 stanza, including required and optional elements and attributes, is
156 defined in [RFC6121] (for single instant messages, the value of the
157 'to' address SHOULD be a "bare JID" of the form
158 "localpart@domainpart", as per [RFC6121]). The following is an
159 example of such a stanza:
161 Example 1: XMPP user sends message
163 |
165 | Art thou not Romeo, and a Montague?
166 |
168 Upon receiving such a message stanza, the XMPP server needs to
169 determine the identity of the domainpart in the 'to' address, which
170 it does by following the procedures explained in Section 5 of
171 [RFC7247]. If the domain is a SIP domain, the XMPP server will hand
172 off the message stanza to an XMPP-to-SIP gateway that natively
173 communicates with IM-aware SIP servers.
175 The XMPP-to-SIP gateway is then responsible for translating the XMPP
176 message stanza into a SIP MESSAGE request from the XMPP user to the
177 SIP user:
179 Example 2: XMPP user sends message (SIP transformation)
181 | MESSAGE sip:romeo@example.net SIP/2.0
182 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse
183 | Max-Forwards: 70
184 | To: sip:romeo@example.net
185 | From: ;tag=12345
186 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA
187 | CSeq: 1 MESSAGE
188 | Content-Type: text/plain
189 | Content-Length: 35
190 |
191 | Art thou not Romeo, and a Montague?
192 The destination SIP server is responsible for delivering the message
193 to the intended recipient, and the recipient is responsible for
194 generating a response (e.g., 200 OK).
196 Example 3: SIP user agent indicates receipt of message
198 | SIP/2.0 200 OK
199 | Via: SIP/2.0/TCP x2s.example.com;branch=z9hG4bK776sgdkse
200 | From: sip:juliet@example.com;tag=12345
201 | To: sip:romeo@example.net;tag=vwxyz
202 | Call-ID: D9AA95FD-2BD5-46E2-AF0F-6CFAA96BDDFA
203 | CSeq: 1 MESSAGE
204 | Content-Length: 0
206 As described in [RFC3428], a downstream proxy could fork a MESSAGE
207 request, but it would return only one 200 OK to the gateway.
209 Note: This document does not specify handling of the 200 OK by the
210 XMPP-to-SIP gateway (e.g., to enable message acknowledgements).
211 See [I-D.ietf-stox-chat] for a mapping of message acknowledgements
212 in the context of one-to-one chat sessions.
214 The mapping of XMPP syntax to SIP syntax MUST be as shown in the
215 following table.
217 Table 1: Message syntax mapping from XMPP to SIP
219 +-----------------------------+--------------------------+
220 | XMPP Element or Attribute | SIP Header or Contents |
221 +-----------------------------+--------------------------+
222 | | body of MESSAGE |
223 | | Subject |
224 | | Call-ID |
225 | from | From (1) |
226 | id | transaction identifer |
227 | to | To or Request-URI |
228 | type | (no mapping) (2) |
229 | xml:lang | Content-Language |
230 +-----------------------------+--------------------------+
232 1. As shown in the foregoing example and described in [RFC7247], the
233 XMPP-to-SIP gateway MUST map the bare JID
234 ("localpart@domainpart") of the XMPP sender to the SIP From
235 header and include the resourcepart of the full JID as the GRUU
236 portion [RFC5627] of the SIP URI.
238 2. Because there is no SIP header field that matches the meaning of
239 the XMPP message 'type' values ("normal", "chat", "groupchat",
240 "headline", "error"), no general mapping is possible here.
242 5. SIP to XMPP
244 As described in [RFC3428], a single instant message is a SIP MESSAGE
245 request sent from a SIP user agent to an intended recipient who is
246 most generally referenced by an Instant Message URI of the form
247 but who might be referenced by a SIP or SIPS URI of
248 the form or .
250 When the SIP user Romeo wants to send an
251 instant message to Juliet, he interacts with his SIP user agent,
252 which generates a SIP MESSAGE request. The syntax of the MESSAGE
253 request is defined in [RFC3428]. The following is an example of such
254 a request:
256 Example 4: SIP user sends message
258 | MESSAGE sip:juliet@example.com SIP/2.0
259 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677
260 | Max-Forwards: 70
261 | To: sip:juliet@example.com
262 | From: sip:romeo@example.net;tag=vwxyz
263 | Call-ID: 9E97FB43-85F4-4A00-8751-1124FD4C7B2E
264 | CSeq: 1 MESSAGE
265 | Content-Type: text/plain
266 | Content-Length: 44
267 |
268 | Neither, fair saint, if either thee dislike.
270 Section 5 of [RFC3428] stipulates that a SIP User Agent presented
271 with an im: URI should resolve it to a sip: or sips: URI. Therefore
272 we assume that the Request-URI of a request received by an IM-capable
273 SIP-to-XMPP gateway will contain a sip: or sips: URI. Upon receiving
274 the MESSAGE, the SIP server needs to determine the identity of the
275 domain portion of the Request-URI or To header, which it does by
276 following the procedures explained in Section 5 of [RFC7247]. If the
277 domain is an XMPP domain, the SIP server will hand off the MESSAGE to
278 an associated SIP-to-XMPP gateway that natively communicates with
279 XMPP servers.
281 The SIP-to-XMPP gateway is then responsible for translating the
282 request into an XMPP message stanza from the SIP user to the XMPP
283 user and returning a SIP "200 OK" message to the sender:
285 Example 5: SIP user sends message (XMPP transformation)
287 |
289 | Neither, fair saint, if either thee dislike.
290 |
292 Note that the stanza handling rules specified in [RFC6121] allow the
293 receiving XMPP server to deliver a message stanza whose 'to' address
294 is a bare JID ("localpart@domainpart") to multiple connected devices.
295 This is similar to the "forking" of messages in SIP.
297 The mapping of SIP syntax to XMPP syntax MUST be as shown in the
298 following table.
300 Table 2: Message syntax mapping from SIP to XMPP
302 +--------------------------+-----------------------------+
303 | SIP Header or Contents | XMPP Element or Attribute |
304 +--------------------------+-----------------------------+
305 | Call-ID | |
306 | Content-Language | xml:lang |
307 | CSeq | (no mapping) |
308 | From | from (1) |
309 | Subject | |
310 | Request-URI or To | to |
311 | body of MESSAGE | |
312 | transaction identifier | id |
313 +--------------------------+-----------------------------+
315 1. As shown in the foregoing example and described in [RFC7247], if
316 the IM-capable SIP-to-XMPP gateway has information about the GRUU
317 [RFC5627] of the particular endpoint that sent the SIP message
318 then it MUST map the sender's address to a full JID
319 ("localpart@domainpart/resourcepart") in the 'from' attribute of
320 the XMPP stanza and include the GRUU as the resourcepart.
322 When transforming SIP pager-mode messages, an IM-capable SIP-to-XMPP
323 gateway MUST specify no XMPP 'type' attribute or, equivalently, a
324 'type' attribute whose value is "normal" [RFC6121].
326 See Section 7 of this document about the handling of SIP message
327 bodies that contain content types other than plain text.
329 6. Message Size
331 [RFC3428] specifies that (outside of a media session) the size of a
332 MESSAGE request is not allowed to exceed 1300 bytes. Although in
333 practice XMPP instant messages do not often exceed that size, neither
334 [RFC6120] nor [RFC6121] sets an upper limit on the size of XMPP
335 stanzas. However, XMPP server deployments usually do limit the size
336 of stanzas in order to help prevent denial of service attacks, and
337 [RFC6120] states that if a server sets a maximum stanza size then the
338 limit is not allowed to be less than 10,000 bytes. Because of this
339 mismatch, an XMPP-to-SIP gateway SHOULD return a
340 stanza error if an XMPP user attempts to send an XMPP message stanza
341 that would result in a SIP MESSAGE greater than 1300 bytes. Although
342 such a gateway might decide to "upgrade" from page mode to session
343 mode using the Message Session Relay Protocol (MSRP) and thus
344 treating the instant message as part of a chat session as described
345 in [I-D.ietf-stox-chat], such behavior is application-specific and
346 this document provides no guidelines for how to complete such an
347 upgrade.
349 7. Content Types
351 SIP requests of type MESSAGE are allowed to contain essentially any
352 content type. The recommended procedures for SIP-to-XMPP gateways to
353 use in handling these content types are as follows.
355 An IM-aware SIP-to-XMPP gateway MUST process SIP messages that
356 contain message bodies of type "text/plain" and MUST encapsulate such
357 message bodies as the XML character data of the XMPP element.
359 An IM-aware SIP-to-XMPP gateway SHOULD process SIP messages that
360 contain message bodies of type "text/html"; if so, a gateway MUST
361 transform the "text/html" content into XHTML content that conforms to
362 the XHTML-IM Integration Set specified in [XEP-0071].
364 Although an IM-aware SIP-to-XMPP gateway MAY process SIP messages
365 that contain message bodies of types other than "text/plain" and
366 "text/html", the handling of such content types is a matter of
367 implementation.
369 8. Internationalization Considerations
371 Both XMPP and SIP support the UTF-8 encoding [RFC3629] of Unicode
372 characters [UNICODE] within messages, and signalling of the language
373 for a particular message (in XMPP via the 'xml:lang' attribute and in
374 SIP via the Content-Language header). Several examples follow, using
375 the "XML Notation" [RFC3987] for Unicode characters outside the ASCII
376 range.
378 Example 6: SIP user sends message
380 | MESSAGE sip:juliet@example.com SIP/2.0
381 | Via: SIP/2.0/TCP s2x.example.net;branch=z9hG4bKeskdgs677
382 | Max-Forwards: 70
383 | To: sip:juliet@example.com
384 | From: sip:romeo@example.net;tag=vwxyz
385 | Call-ID: 5A37A65D-304B-470A-B718-3F3E6770ACAF
386 | CSeq: 1 MESSAGE
387 | Content-Type: text/plain
388 | Content-Length: 45
389 | Content-Language: cs
390 |
391 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡,
392 | nenavid쎭얡-li jedno nebo druh쎩.
394 Example 7: SIP user sends message (XMPP transformation)
396 |
399 |
400 | Nic z ob쎩ho, m쎡 d쒛vo spanil쎡,
401 | nenavid쎭얡-li jedno nebo druh쎩.
402 |
403 |
405 9. IANA Considerations
407 This document requests no actions of IANA.
409 10. Security Considerations
411 Detailed security considerations for instant messaging protocols are
412 given in [RFC2779], for SIP-based instant messaging in [RFC3428] (see
413 also [RFC3261]), and for XMPP-based instant messaging in [RFC6121]
414 (see also [RFC6120]). The security considerations provided in
415 [RFC7247] also apply.
417 This document specifies methods for exchanging instant messages
418 through a gateway that translates between SIP and XMPP. Such a
419 gateway MUST be compliant with the minimum security requirements of
420 the instant messaging protocols for which it translates (i.e., SIP
421 and XMPP). The addition of gateways to the security model of instant
422 messaging specified in [RFC2779] introduces some new risks. In
423 particular, end-to-end security properties (especially
424 confidentiality and integrity) between instant messaging user agents
425 that interface through an IM-capable SIP-to-XMPP gateway can be
426 provided only if common formats are supported. Although
427 specification of those common formats is out of scope for this
428 document, for instant messages it is possible to use [RFC3862] (see
429 also [RFC3923]).
431 11. References
433 11.1. Normative References
435 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
436 Requirement Levels", BCP 14, RFC 2119, March 1997.
438 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
439 A., Peterson, J., Sparks, R., Handley, M., and E.
440 Schooler, "SIP: Session Initiation Protocol", RFC 3261,
441 June 2002.
443 [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C.,
444 and D. Gurle, "Session Initiation Protocol (SIP) Extension
445 for Instant Messaging", RFC 3428, December 2002.
447 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User
448 Agent URIs (GRUUs) in the Session Initiation Protocol
449 (SIP)", RFC 5627, October 2009.
451 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence
452 Protocol (XMPP): Core", RFC 6120, March 2011.
454 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence
455 Protocol (XMPP): Instant Messaging and Presence", RFC
456 6121, March 2011.
458 [RFC7247] Saint-Andre, P., Houri, A., and J. Hildebrand,
459 "Interworking between the Session Initiation Protocol
460 (SIP) and the Extensible Messaging and Presence Protocol
461 (XMPP): Architecture, Addresses, and Error Handling", RFC
462 7247, May 2014.
464 [XEP-0071]
465 Saint-Andre, P., "XHTML-IM", XSF XEP 0071, November 2012.
467 11.2. Informative References
469 [I-D.ietf-simple-cpim-mapping]
470 Rosenberg, J. and B. Campbell, "CPIM Mapping of SIMPLE
471 Presence and Instant Messaging", draft-ietf-simple-cpim-
472 mapping-01 (work in progress), June 2002.
474 [I-D.ietf-stox-chat]
475 Saint-Andre, P. and S. Loreto, "Interworking between the
476 Session Initiation Protocol (SIP) and the Extensible
477 Messaging and Presence Protocol (XMPP): One-to-One Text
478 Chat Sessions", draft-ietf-stox-chat-10 (work in
479 progress), February 2015.
481 [I-D.ietf-stox-groupchat]
482 Saint-Andre, P., Corretge, S., and S. Loreto,
483 "Interworking between the Session Initiation Protocol
484 (SIP) and the Extensible Messaging and Presence Protocol
485 (XMPP): Groupchat", draft-ietf-stox-groupchat-10 (work in
486 progress), February 2015.
488 [RFC2779] Day, M., Aggarwal, S., and J. Vincent, "Instant Messaging
489 / Presence Protocol Requirements", RFC 2779, February
490 2000.
492 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
493 10646", STD 63, RFC 3629, November 2003.
495 [RFC3860] Peterson, J., "Common Profile for Instant Messaging
496 (CPIM)", RFC 3860, August 2004.
498 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant
499 Messaging (CPIM): Message Format", RFC 3862, August 2004.
501 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and
502 Presence Protocol (XMPP) to Common Presence and Instant
503 Messaging (CPIM)", RFC 3922, October 2004.
505 [RFC3923] Saint-Andre, P., "End-to-End Signing and Object Encryption
506 for the Extensible Messaging and Presence Protocol
507 (XMPP)", RFC 3923, October 2004.
509 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
510 Identifiers (IRIs)", RFC 3987, January 2005.
512 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version
513 7.0.0", 2014,
514 .
516 Appendix A. Acknowledgements
518 The authors wish to thank the following individuals for their
519 feedback: Mary Barnes, Dave Cridland, Dave Crocker, Adrian Georgescu,
520 Christer Holmberg, Saul Ibarra Corretge, Olle Johansson, Paul
521 Kyzivat, Salvatore Loreto, Daniel-Constantin Mierla, and Tory Patnoe.
523 Special thanks to Ben Campbell for his detailed and insightful
524 reviews.
526 The authors gratefully acknowledge the assistance of Markus Isomaki
527 and Yana Stamcheva as the working group chairs and Gonzalo Camarillo
528 and Alissa Cooper as the sponsoring Area Directors.
530 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for
531 employing him during his work on earlier versions of this document.
533 Authors' Addresses
535 Peter Saint-Andre
536 &yet
538 Email: peter@andyet.com
539 URI: https://andyet.com/
541 Avshalom Houri
542 IBM
543 Rorberg Building, Pekris 3
544 Rehovot 76123
545 Israel
547 Email: avshalom@il.ibm.com
549 Joe Hildebrand
550 Cisco Systems, Inc.
551 1899 Wynkoop Street, Suite 600
552 Denver, CO 80202
553 USA
555 Email: jhildebr@cisco.com