Network Working Group P. Saint-Andre Internet-Draft Jabber Software Foundation Expires: September 16, 2004 March 18, 2004 XMPP URI Format draft-saintandre-xmpp-uri-02 Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http:// www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on September 16, 2004. Copyright Notice Copyright (C) The Internet Society (2004). All Rights Reserved. Abstract This document defines a URI scheme for use in addressing entities that can communicate via the Extensible Messaging and Presence Protocol (XMPP). Saint-Andre Expires September 16, 2004 [Page 1] Internet-Draft XMPP URI Format March 2004 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Discussion Venue . . . . . . . . . . . . . . . . . . . . . . . 3 2. Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Query Component . . . . . . . . . . . . . . . . . . . . . . . 4 3. xmpp: URI IANA Registration . . . . . . . . . . . . . . . . . 6 3.1 URI Scheme Name . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 URI Scheme Syntax . . . . . . . . . . . . . . . . . . . . . . 6 3.3 Character Encoding Considerations . . . . . . . . . . . . . . 6 3.4 Intended usage . . . . . . . . . . . . . . . . . . . . . . . . 6 3.5 Security considerations . . . . . . . . . . . . . . . . . . . 6 3.6 Relevant publications . . . . . . . . . . . . . . . . . . . . 6 3.7 Person and email address to contact for further information . 6 3.8 Author/Change controller . . . . . . . . . . . . . . . . . . . 6 3.9 Applications and/or protocols which use this URI scheme name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 Normative References . . . . . . . . . . . . . . . . . . . . . 7 Informative References . . . . . . . . . . . . . . . . . . . . 8 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 8 A. Revision History . . . . . . . . . . . . . . . . . . . . . . . 8 A.1 Changes from draft-saintandre-xmpp-uri-01 . . . . . . . . . . 8 A.2 Changes from draft-saintandre-xmpp-uri-00 . . . . . . . . . . 8 Intellectual Property and Copyright Statements . . . . . . . . 9 Saint-Andre Expires September 16, 2004 [Page 2] Internet-Draft XMPP URI Format March 2004 1. Introduction The Extensible Messaging and Presence Protocol (XMPP) [XMPP-CORE] specifies that within the context of the streaming XML technology that forms the foundation of XMPP, the addresses of XMPP entities MUST NOT be prepended with a URI scheme (as defined in RFC 2396 [URI]). However, many applications external to the existing network would like to address XMPP entities as full URIs; examples are databases that need to store XMPP addresses as URIs and non-native user agents (such as web browsers) that provide an interface to XMPP services. This memo defines an xmpp: URI scheme for use by such applications, and conforms to both the requirements in Registration Procedures for URL Scheme Names [URL-REG] and the recommendations in Guidelines for new URL Schemes [URL-GUIDE]. 1.1 Terminology This document inherits terminology described in [XMPP-CORE]. The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [TERMS]. 1.2 Discussion Venue The author welcomes discussion and comments related to the topics presented in this document. The preferred forum is the mailing list, for which archives and subscription information are available at . 2. Narrative 2.1 Rationale Many types of application can be built using XMPP. The best-known such application is instant messaging (IM) and presence (as described in [IMP-MODEL] and [IMP-REQS] and defined for XMPP in [XMPP-IM]). Therefore it might seem appropriate to use the im: and pres: URI schemes specified by Common Profile for Instant Messaging (CPIM) [CPIM] and Common Profile for Presence (CPP) [CPP], rather than to define an XMPP-specific URI scheme. However, while the im: and pres: URI schemes are appropriate for instant messaging and presence applications and are therefore mentioned normatively in [XMPP-IM], they are not necessarily appropriate for all XMPP applications. Because XMPP is fundamentally an XML streaming technology rather than an instant messaging and presence technology per se, XMPP Saint-Andre Expires September 16, 2004 [Page 3] Internet-Draft XMPP URI Format March 2004 applications may conform to [XMPP-CORE] but not [XMPP-IM] and thus not implement instant messaging and presence semantics. Indeed, XMPP is already used in applications such as network management, workflow applications, generic publish-subscribe, remote procedure calls, content syndication, gaming, and middleware. These applications require an addressing scheme that is not tied to the particular semantics of the im: and pres: URI schemes. Therefore, this document defines a generic URI scheme that will enable applications to address as a URI any entity that can communicate via XMPP. Note well that on the XMPP network itself, entities MUST be addressed as <[node@]domain[/resource]> (i.e., without a URI scheme) rather than as . The xmpp: URI format is provided for the sake of non-native interfaces and applications only, and MUST NOT be used by native applications when addressing XML stanzas sent over the XMPP network. 2.2 Form The syntax for an xmpp: URI is as follows (where the jid rule is defined in [XMPP-CORE]). "xmpp:" jid [ "?" query ] An xmpp: URI is opaque rather than hierarchical, and thus is similar to a mailto: URI specified in RFC 2368 [MAILTO]. Because an xmpp: URI is opaque, the JID contained therein SHOULD include only a node identifier (OPTIONAL) and domain identifier (REQUIRED) as defined in [XMPP-CORE]. An xmpp: URI MAY include the resource identifier portion of a JID if the XMPP entity must be addressed as such, but this is not recommended since the delimiter used before a resource identifier in XMPP addresses is the slash character ("/"), which is discouraged by [URI] in opaque URIs. 2.3 Query Component If an xmpp: URI is presented in an end-user application that provides a non-native interface to an XMPP service (e.g., a web browser), interacting with such a URI SHOULD trigger the application to present a user with an appropriate interface to complete an action such as sending a message or sending presence. In order to specify the possible actions, two "header" values of the query component are defined: "presence" and "message", as described below. 2.3.1 Messages In order to invoke an interace for sending a message, the URI SHOULD be of the form . Saint-Andre Expires September 16, 2004 [Page 4] Internet-Draft XMPP URI Format March 2004 The query component MAY include parameters that further specify the message to be sent to the intended recipient. The following parameters are OPTIONAL for messages, corresponding to the , , and children of the XML stanza as defined in [XMPP-IM]: o body o subject o thread (for conversation tracking) The following example illustrates the use of these parameters: Sending a message xmpp:user@host?message&subject=hi&body=Hello%20World&thread=abc123 2.3.2 Presence In order to invoke an interace for sending presence information, the URI SHOULD be of the form . The query component MAY include parameters that further specify the presence information to be sent to the intended recipient. The following parameters are OPTIONAL for presence, corresponding to the 'type' attribute and the , , and children of the stanza as defined in [XMPP-IM]: o type ('unavailable' only; if not specified, the sender is defined to be online and available) o show (one of 'away', 'xa', 'dnd', or 'chat') o status (user-defined status message) o priority (an integer specifying rough likelihood of receiving messages at this resource) The following example illustrates the use of these parameters: Sending Presence Information xmpp:user@host?presence&show=dnd&status=taking%20a%20nap Saint-Andre Expires September 16, 2004 [Page 5] Internet-Draft XMPP URI Format March 2004 3. xmpp: URI IANA Registration This section provides the information required to register the xmpp: URI scheme. 3.1 URI Scheme Name xmpp 3.2 URI Scheme Syntax The syntax for an xmpp: URI is defined below using Augmented Backus-Naur Form as specified by [ABNF]. The jid rule is defined in [XMPP-CORE]. XMPP-URI = "xmpp:" jid [ "?" query ] 3.3 Character Encoding Considerations Representation of non-ASCII character sets in local-part strings is limited to the standard methods provided as extensions to RFC 2822 [IMF]. Specifically, for each byte, if the byte is not in the set A-Za-z0-9!$*.?_~+= then transform the byte to %hexhex as described in Section 2.2.5 of [URL-GUIDE]. 3.4 Intended usage The xmpp: URI is intended to be used by interfaces to the XMPP network from non-native user agents such as web browsers, as well as by applications that need to address XMPP entities as full URIs. 3.5 Security considerations See Security Considerations (Section 5) of this document. 3.6 Relevant publications [XMPP-CORE], [XMPP-IM] 3.7 Person and email address to contact for further information Peter Saint-Andre [mailto:stpeter@jabber.org] 3.8 Author/Change controller This scheme is registered under the IETF tree. As such, the IETF maintains change control. Saint-Andre Expires September 16, 2004 [Page 6] Internet-Draft XMPP URI Format March 2004 3.9 Applications and/or protocols which use this URI scheme name Applications that provide an interface to XMPP services or that need to address XMPP entities as full URIs. 4. IANA Considerations This entire document addresses IANA considerations. 5. Security Considerations Detailed security considerations for XMPP are given in [XMPP-CORE]. Providing an interface to XMPP services from non-native applications introduces new security concerns. For example, the ability to interact with XMPP entities via a web browser may expose sensitive information to attacks that are not possible or that are unlikely on a native XMPP network. Due care must be taken in deciding what information is appropriate for representing in xmpp: URIs; in particular, passwords MUST NOT be represented. Normative References [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [IMF] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [TERMS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998, . [URL-GUIDE] Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, "Guidelines for new URL Schemes", RFC 2718, November 1999. [URL-REG] Petke, R. and I. King, "Registration Procedures for URL Scheme Names", BCP 35, RFC 2717, November 1999. [XMPP-CORE] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Core", draft-ietf-xmpp-core-22 (work in progress), January 2004. [XMPP-IM] Saint-Andre, P., "Extensible Messaging and Presence Saint-Andre Expires September 16, 2004 [Page 7] Internet-Draft XMPP URI Format March 2004 Protocol (XMPP): Instant Messaging and Presence", draft-ietf-xmpp-im-21 (work in progress), January 2004. Informative References [CPIM] Peterson, J., "Common Profile for Instant Messaging (CPIM)", draft-ietf-impp-im-04 (work in progress), August 2003. [CPP] Peterson, J., "Common Profile for Presence (CPP)", draft-ietf-impp-pres-04 (work in progress), August 2003. [IMP-MODEL] Day, M., Rosenberg, J. and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000. [IMP-REQS] Day, M., Aggarwal, S. and J. Vincent, "Instant Messaging / Presence Protocol Requirements", RFC 2779, February 2000. [MAILTO] Hoffman, P., Masinter, L. and J. Zawinski, "The mailto URL scheme", RFC 2368, July 1998. Author's Address Peter Saint-Andre Jabber Software Foundation EMail: stpeter@jabber.org Appendix A. Revision History Note to RFC Editor: please remove this entire appendix, and the corresponding entries in the table of contents, prior to publication. A.1 Changes from draft-saintandre-xmpp-uri-01 o Clarified guidelines for escaping of UTF-8 characters. o Specified usage of query component. A.2 Changes from draft-saintandre-xmpp-uri-00 o Modified ABNF to track changes to XMPP Core. o Clarified a few matters in the text. Saint-Andre Expires September 16, 2004 [Page 8] Internet-Draft XMPP URI Format March 2004 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director. Full Copyright Statement Copyright (C) The Internet Society (2004). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION Saint-Andre Expires September 16, 2004 [Page 9] Internet-Draft XMPP URI Format March 2004 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Saint-Andre Expires September 16, 2004 [Page 10]