TOC 
Network Working GroupP. Saint-Andre
Internet-DraftJabber Software Foundation
Expires: February 11, 2005August 13, 2004

A Uniform Resource Identifier (URI) Scheme for the Extensible Messaging and Presence Protocol (XMPP)

draft-saintandre-xmpp-uri-04

Status of this Memo

By submitting this Internet-Draft, I certify that any applicable patent or other IPR claims of which I am aware have been disclosed, and any of which I become aware will be disclosed, in accordance with RFC 3668.

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 February 11, 2005.

Copyright Notice

Copyright (C) The Internet Society (2004). All Rights Reserved.

Abstract

This document defines a Uniform Resource Identifier (URI) scheme for use in addressing entities that can communicate via the Extensible Messaging and Presence Protocol (XMPP).



Table of Contents

1.  Introduction
    1.1  Terminology
    1.2  Discussion Venue
2.  Narrative
    2.1  Rationale
    2.2  Form
    2.3  Generation of XMPP URIs
    2.4  Processing of XMPP URIs
    2.5  Internationalization
3.  xmpp: URI IANA Registration
    3.1  URI scheme name
    3.2  URI scheme syntax
    3.3  Character encoding considerations
    3.4  Intended usage
    3.5  Security considerations
    3.6  Relevant publications
    3.7  Person and email address to contact for further information
    3.8  Author/change controller
    3.9  Applications and/or protocols which use this URI scheme name
4.  IANA Considerations
5.  Security Considerations
§.  Normative References
§.  Informative References
§  Author's Address
A.  Revision History
    A.1  Changes from draft-saintandre-xmpp-uri-03
    A.2  Changes from draft-saintandre-xmpp-uri-02
    A.3  Changes from draft-saintandre-xmpp-uri-01
    A.4  Changes from draft-saintandre-xmpp-uri-00
§  Intellectual Property and Copyright Statements




 TOC 

1. Introduction

The Extensible Messaging and Presence Protocol (XMPP) is a streaming XML technology that enables near-real-time communications between any two entities on a network. [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004. specifies that on an XMPP network itself, the address of an XMPP entity is not to be prepended with a Uniform Resource Identifier (URI) scheme (as defined in RFC 2396Berners-Lee, T., Fielding, R. and L. Masinter, Uniform Resource Identifiers (URI): Generic Syntax, August 1998.[URI]). However, many applications external to an XMPP network may need to address XMPP entities as full URIs; examples are databases that need to store XMPP addresses and non-native user agents (e.g., a web browser or calendaring application) 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 NamesPetke, R. and I. King, Registration Procedures for URL Scheme Names, November 1999.[URL-REG] and the recommendations in Guidelines for new URL SchemesMasinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999.[URL-GUIDE].

1.1 Terminology

This document inherits terminology described in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004..

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 2119Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, March 1997.[TERMS].

1.2 Discussion Venue

The author welcomes discussion and comments related to the topics presented in this document. The preferred forum is the <xmppwg@jabber.org> mailing list, for which archives and subscription information are available at <http://www.jabber.org/cgi-bin/mailman/listinfo/xmppwg/>.



 TOC 

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 these are described in [IMP-MODEL]Day, M., Rosenberg, J. and H. Sugano, A Model for Presence and Instant Messaging, February 2000. and [IMP-REQS]Day, M., Aggarwal, S. and J. Vincent, Instant Messaging / Presence Protocol Requirements, February 2000. and defined for XMPP in [XMPP-IM]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence, January 2004.). Therefore it might seem appropriate to use the im: and pres: URI schemes specified by Common Profile for Instant Messaging (CPIM)Peterson, J., Common Profile for Instant Messaging (CPIM), August 2004.[CPIM] and Common Profile for Presence (CPP)Peterson, J., Common Profile for Presence (CPP), August 2004.[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]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence, January 2004., 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 applications may conform to [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004. but not [XMPP-IM]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence, January 2004. 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 an XMPP network, entities are to be addressed as <[node@]domain[/resource]> (i.e., without a URI scheme) rather than as <xmpp:[node@]domain[/resource]>. The xmpp: URI format is provided for the sake of non-native interfaces and applications only; native applications are strongly encouraged not to prepend XMPP addresses with the xmpp: URI scheme when addressing XML stanzas sent over an XMPP network.

2.2 Form

The syntax for an xmpp: URI is as follows (where the jid rule is defined in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004. and the query rule is defined in [URI]Berners-Lee, T., Fielding, R. and L. Masinter, Uniform Resource Identifiers (URI): Generic Syntax, August 1998.).

      "xmpp:" jid [ "?" query ]
          

An xmpp: URI is opaque rather than hierarchical, and thus is similar to a mailto: URI as specified in RFC 2368Hoffman, P., Masinter, L. and J. Zawinski, The mailto URL scheme, July 1998.[MAILTO]. Because an xmpp: URI is opaque, the XMPP address (or "JID") contained therein SHOULD include only a node identifier (OPTIONAL) and domain identifier (REQUIRED) as defined in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004.; while an xmpp: URI MAY include the resource identifier portion of a JID if the XMPP entity must be addressed as such, as a general rule this is not encouraged since the delimiter used before a resource identifier in XMPP addresses is the slash character ("/"), which is discouraged by [URI]Berners-Lee, T., Fielding, R. and L. Masinter, Uniform Resource Identifiers (URI): Generic Syntax, August 1998. for opaque URIs. While the "?" character is allowed in the resource identifier portion of an XMPP address (according to [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004.), that character can be used as a delimiter between the jid and the query parts of an xmpp: URI; therefore, any instances of the "?" character in the resource identifier portion of an XMPP address that is generated or processed as an xmpp: URI MUST be escaped as "%3F" (as described in Section 2.2.5 of [URL-GUIDE]Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999.).

2.3 Generation of XMPP URIs

When generating an XMPP URI, the generating application SHOULD follow these steps:

  1. Obtain XMPP address (JID).
  2. Perform [IDNA]Faltstrom, P., Hoffman, P. and A. Costello, Internationalizing Domain Names in Applications (IDNA), March 2003. translation against the JID (in the form of a UTF-8 string).
  3. Verify that the UTF-8 string conforms to the format defined in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004., including all appropriate [STRINGPREP]Hoffman, P. and M. Blanchet, Preparation of Internationalized Strings ("STRINGPREP"), December 2002. profiles.
  4. Convert any bytes that are not US-ASCII (see [US-ASCII]American National Standards Institute, Coded Character Set - 7-bit American Standard Code for Information Interchange, 1986.) to %hexhex format as described in Section 2.2.5 of [URL-GUIDE]Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999..
  5. Prepend the 'xmpp:' scheme.
  6. Append the query component, if any.

2.4 Processing of XMPP URIs

When processing an XMPP URI, the processing application SHOULD follow these steps:

  1. Obtain URI.
  2. Convert any parts in %hexhex format to UTF-8 as described in Section 2.2.5 of [URL-GUIDE]Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999..
  3. Verify that the UTF-8 string conforms to the format defined in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004., including all appropriate [STRINGPREP]Hoffman, P. and M. Blanchet, Preparation of Internationalized Strings ("STRINGPREP"), December 2002. profiles.
  4. Perform [IDNA]Faltstrom, P., Hoffman, P. and A. Costello, Internationalizing Domain Names in Applications (IDNA), March 2003. translation against the UTF-8 string.
  5. Extract the XMPP address by removing the 'xmpp:' scheme and the query component (if any).

At this point, the processing application would either (1) complete further XMPP handling itself or (2) invoke a helper application to complete XMPP handling; such XMPP handling would most likely consist of the following steps:

  1. Authenticating with an appropriate XMPP server (e.g., a server that a user has configured as his or her registered service provider) if not already authenticated.
  2. Optionally determining the nature of the intended recipient (e.g., via [DISCO]Hildebrand, J., Millard, P., Eatmon, R. and P. Saint-Andre, Service Discovery, July 2004.).
  3. Optionally presenting an appropriate interface to a user based on the nature of the intended recipient and/or the contents of the query component (however, if the application does not understand the query component, it MUST ignore the query component and treat the URI as consisting of "xmpp:jid" rather than "xmpp:jid?query").
  4. Generating an XMPP stanza that translates any user or application inputs into their corresponding XMPP equivalents.
  5. Sending the XMPP stanza via the authenticated server connection for delivery to the intended recipient.

2.5 Internationalization

By definition, an XMPP URI is also an Internationalized Resource Identifier (see [IRI]Duerst, M. and M. Suignard, Internationalized Resource Identifiers (IRI), February 2004.). As specified in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004., each portion of a JID (node identifier, domain identifier, resource identifier) is allowed to be a fully internationalized string in accordance with various profiles of [STRINGPREP]Hoffman, P. and M. Blanchet, Preparation of Internationalized Strings ("STRINGPREP"), December 2002.; any non-US-ASCII characters in such strings (as well as any byte that is not in the set a-zA-Z0-9!$*.?_~+=) MUST be properly transformed to %hexhex format as described in Section 2.2.5 of [URL-GUIDE]Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999..



 TOC 

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]Crocker, D. and P. Overell, Augmented BNF for Syntax Specifications: ABNF, November 1997.. The jid rule is defined in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004..

XMPP-URI = "xmpp:" jid [ "?" query ]
          

3.3 Character encoding considerations

Representation of non-US-ASCII character sets in local-part strings is limited to the standard methods provided as extensions to RFC 2822Resnick, P., Internet Message Format, April 2001.[IMF]. Specifically, for each byte, if the byte is not in the set a-zA-Z0-9!$*.?_~+= then transform the byte to %hexhex format as described in Section 2.2.5 of [URL-GUIDE]Masinter, L., Alvestrand, H., Zigmond, D. and R. Petke, Guidelines for new URL Schemes, November 1999..

3.4 Intended usage

The xmpp: URI is intended to be used by interfaces to an XMPP network from non-native user agents such as web browsers, as well as by non-native applications that need to address XMPP entities as full URIs.

3.5 Security considerations

See Security ConsiderationsSecurity Considerations of XXXX.

3.6 Relevant publications

[XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004.

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.

3.9 Applications and/or protocols which use this URI scheme name

Applications (other than native native XMPP applications) that provide an interface to XMPP services or that need to address XMPP entities as full URIs.



 TOC 

4. IANA Considerations

This entire document addresses IANA considerations.



 TOC 

5. Security Considerations

Detailed security considerations for XMPP are given in [XMPP-CORE]Saint-Andre, P., Extensible Messaging and Presence Protocol (XMPP): Core, January 2004.. 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.



 TOC 

6. References



 TOC 

6.1 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 Protocol (XMPP): Instant Messaging and Presence", draft-ietf-xmpp-im-21 (work in progress), January 2004.


 TOC 

6.2 Informative References

[US-ASCII] American National Standards Institute, "Coded Character Set - 7-bit American Standard Code for Information Interchange", ANSI X3.4, 1986.
[CPIM] Peterson, J., "Common Profile for Instant Messaging (CPIM)", RFC 3860, August 2004.
[CPP] Peterson, J., "Common Profile for Presence (CPP)", RFC 3859, August 2004.
[DISCO] Hildebrand, J., Millard, P., Eatmon, R. and P. Saint-Andre, "Service Discovery", JSF JEP 0030, July 2004.
[IDNA] Faltstrom, P., Hoffman, P. and A. Costello, "Internationalizing Domain Names in Applications (IDNA)", RFC 3490, March 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.
[IRI] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRI)", draft-duerst-i18n-iri-06 (work in progress), February 2004.
[MAILTO] Hoffman, P., Masinter, L. and J. Zawinski, "The mailto URL scheme", RFC 2368, July 1998 (TXT, HTML, XML).
[STRINGPREP] Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("STRINGPREP")", RFC 3454, December 2002.


 TOC 

Author's Address

  Peter Saint-Andre
  Jabber Software Foundation
EMail:  stpeter@jabber.org


 TOC 

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-03

A.2 Changes from draft-saintandre-xmpp-uri-02

A.3 Changes from draft-saintandre-xmpp-uri-01

A.4 Changes from draft-saintandre-xmpp-uri-00



 TOC 

Intellectual Property Statement

Disclaimer of Validity

Copyright Statement

Acknowledgment