TOC 
Network Working GroupP. Saint-Andre
Internet-DraftJabber Software Foundation
Expires: September 16, 2004March 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).



 TOC 

Table of Contents




 TOC 

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 <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 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 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 <xmpp:[node@]domain[/resource]>. 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 <xmpp:user@host?message>.

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 <body/>, <subject/>, and <thread/> children of the XML <message/> stanza as defined in [XMPP-IM]:

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 <xmpp:user@host?presence>.

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 <show/>, <status/>, and <priority/> children of the <presence/> stanza as defined in [XMPP-IM]:

The following example illustrates the use of these parameters:

Sending Presence Information

   xmpp:user@host?presence&show=dnd&status=taking%20a%20nap
            


 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]. 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 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.

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.



 TOC 

4. IANA Considerations

This entire document addresses IANA considerations.



 TOC 

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.



 TOC 

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 

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 (TXT, HTML, XML).


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

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



 TOC 

Intellectual Property Statement

Full Copyright Statement

Acknowledgment