JEP-0081: Jabber MIME Type

This JEP specifies a MIME type for launching a Jabber client as a helper application from most modern web browsers, and for completing basic use cases once the client is launched.


WARNING: This Standards-Track JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.


JEP Information

Status: Experimental
Type: Standards Track
Number: 0081
Version: 0.4
Last Updated: 2005-01-05
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, XMPP IM, RFC 2045, RFC 3023, JEP-0045, JEP-0077
Supersedes: None
Superseded By: None
Short Name: mimetype

Author Information

Joe Hildebrand

Email: jhildebrand@jabber.com
JID: hildjj@jabber.org

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2005 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <http://www.opencontent.org/openpub/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Given that this JEP normatively references IETF technologies, discussion on the JSF-IETF list may also be appropriate (see <http://mail.jabber.org/mailman/listinfo/jsf-ietf> for details).

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocols defined in this JEP have been developed outside the Internet Standards Process and are to be understood as extensions to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.


Table of Contents

1. Introduction
2. Use Cases
2.1. Sending a Message
2.2. Starting a Chat
2.3. Subscribing to Presence
2.4. Joining a Groupchat Room
2.5. Registering with a Service
3. Security Considerations
4. IANA Considerations
5. Jabber Registrar Considerations
5.1. Protocol Namespaces
5.2. IANA Interaction
6. XML Schema
7. Open Issues
Notes
Revision History


1. Introduction

The value of a URI scheme (see RFC 3986 [1]) for Jabber/XMPP communications has long been recognized within the Jabber community, and such a scheme has been formally defined in XMPP URI [2] as a way of identifying entities that adhere to XMPP Core [3] or its antecedents. Unfortunately, URI schemes are slow to be accepted on the Internet, such that it might be years (if ever) before widely deployed software such as web browsers will support addresses of the form <xmpp:user@domain>.

Thankfully, it is not necessary for the large existing base of deployed software to support the xmpp: URI scheme in order to integrate Jabber/XMPP support. A well-accepted alternative approach [4] is to define a MIME type (in accordance with RFC 2045 [5]) and then reconfigure the relevant server and client software to correctly handle the new MIME type.

Therefore, this JEP defines a MIME type of "application/jabber+xml" (in particular, an XML media type in accordance with RFC 3023 [6]). Files of this MIME type would commonly be accessed with a web browser via HTTP, although other access methods are possible (e.g., attachment of the MIME type to an email message). On opening a file of this type, a browser would (by configuration) invoke an appropriate "helper" application (i.e., an external Jabber client, plugin, or internal module) that would enable the user to interact with a Jabber/XMPP server. If the user is not currently connected to a server, the invoked program would be responsible for connecting the user with appropriate prompting for authentication credentials. The file passed to the helper application would define parameters needed to complete a certain use case, such as sending a message to another user.

Note: The "application/jabber+xml" MIME type defined herein is not to be confused with the "application/xmpp+xml" MIME type defined in RFC 3923 [7]; the two MIME types address different requirements and do not overlap or conflict.

2. Use Cases

The solution MUST enable a user to complete the following use cases, support for which is REQUIRED:

In addition, the solution SHOULD enable a user to complete the following use cases, support for which is RECOMMENDED:

These use cases are defined below.

2.1 Sending a Message

In order to send a message to a contact, the user opens an XMPP file of the following form:

<?xml version='1.0' encoding='UTF-8'?>
<jabber>
  <message jid='stpeter@jabber.org'/>
</jabber>
    

The browser passes this file to the helper application, which shall instantiate an appropriate interface for sending a single message to the JID defined in the file. If the user completes the interface, the helper application shall then send a message stanza of type='normal' as specified in XMPP IM [8], first authenticating with the user's Jabber/XMPP server if necessary.

2.2 Starting a Chat

<?xml version='1.0' encoding='UTF-8'?>
<jabber>
  <chat jid='stpeter@jabber.org'/>
</jabber>
    

The browser passes this file to the helper application, which shall instantiate an appropriate interface for chatting with the JID defined in the file. If the user completes the interface, the helper application shall then send a message stanza of type='chat' as specified in XMPP IM, first authenticating with the user's Jabber/XMPP server if necessary.

2.3 Subscribing to Presence

<?xml version='1.0' encoding='UTF-8'?>
<jabber>
  <subscribe jid='stpeter@jabber.org'/>
</jabber>
    

The browser passes this file to the helper application, which shall instantiate an appropriate interface for sending a presence subscription request to the JID defined in the file (e.g., specifying a name and/or group for the contact). If the user completes the interface, the helper application shall then send a presence stanza of type='subscribe' as specified in XMPP IM, first authenticating with the user's Jabber/XMPP server if necessary. The helper application SHOULD perform a "roster set" before sending the presence subscription request, as described in XMPP IM.

2.4 Joining a Groupchat Room

<?xml version='1.0' encoding='UTF-8'?>
<jabber>
  <groupchat jid='jdev@conference.jabber.org'/>
</jabber>
    

The browser passes this file to the helper application, which shall instantiate an appropriate interface for joining the conference room associated with the JID defined in the file. If the user completes the interface, the helper application shall then send a directed presence stanza to the JID (appending a room nickname to the JID as the resource identifier) as described in Multi-User Chat [9], first authenticating with the user's Jabber/XMPP server if necessary.

2.5 Registering with a Service

<?xml version='1.0' encoding='UTF-8'?>
<jabber>
  <register jid='headlines.shakespeare.lit'/>
</jabber>
    

The browser passes this file to the helper application, which shall send an IQ stanza of type='get' to the service associated with the JID defined in the file in order to determine the registration requirements (first authenticating with the user's Jabber/XMPP server if necessary), as described in In-Band Registration [10]. The helper application shall then instantiate an appropriate interface for registering with the service. If the user completes the interface, the helper application shall then send an IQ stanza of type='set' to the JID as described in JEP-0077.

3. Security Considerations

Detailed security considerations for instant messaging and presence protocols are given in RFC 2779 [11] (Sections 5.1 through 5.4), and for XMPP in particular are given in RFC 3920 (Sections 12.1 through 12.6). In addition, all of the security considerations specified in RFC 3023 apply to the "application/jabber+xml" media type.

When a helper application has finished processing a file of type "application/jabber+xml", it SHOULD discard the file; this helps to prevent security-related problems that may result from HTTP caching.

4. IANA Considerations

This JEP requires registration of the "application/jabber+xml" content type with the Internet Assigned Numbers Authority (IANA) [12]. The registration is as follows:

To: ietf-types@iana.org

Subject: Registration of MIME media type application/jabber+xml

MIME media type name: application
MIME subtype name: jabber+xml
Required parameters: (none)
Optional parameters: (charset) Same as charset parameter of
   application/xml as specified in RFC 3023; per Section 11.5
   of RFC 3920, the charset must be UTF-8.
Encoding considerations: Same as encoding considerations of
   application/xml as specified in RFC 3023; per Section 11.5
   of RFC 3920, the encoding must be UTF-8.
Security considerations: All of the security considerations 
   specified in RFC 3023 and RFC 3920 apply to this XML media 
   type.  Refer to Section 11 of JSF JEP-0081.
Interoperability considerations: (none)
Specification: JSF JEP-0081
Applications which use this media type: non-XMPP applications
   (e.g., web browsers or email clients) that wish to invoke
   XMPP-compliant applications for instant messaging and 
   presence functionality.
Additional information: This media type is not to be confused 
   with the "application/xmpp+xml" media type, which is for 
   use by native XMPP applications.
Person and email address to contact for further information: 
   Jabber Registrar, <registrar@jabber.org>
Intended usage: COMMON
Author/Change controller: JSF, Jabber Registrar
  

5. Jabber Registrar Considerations

5.1 Protocol Namespaces

The Jabber Registrar [13] shall include 'http://jabber.org/protocol/mimetype' in its registry of protocol namespaces.

5.2 IANA Interaction

The Jabber Registrar shall interact with the IANA in order to register the media type defined herein.

6. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/protocol/mimetype'
    xmlns='http://jabber.org/protocol/mimetype'
    elementFormDefault='qualified'>

  <xs:element name='jabber'>
    <xs:complexType>
      <xs:choice>
        <xs:element name='chat' type='JabberAction'/>
        <xs:element name='groupchat' type='JabberAction'/>
        <xs:element name='message' type='JabberAction'/>
        <xs:element name='register' type='JabberAction'/>
        <xs:element name='subscribe' type='JabberAction'/>
      </xs:choice>
    </xs:complexType>
  </xs:element>

  <xs:complexType name='JabberAction'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
    <xs:attribute name='jid' use='required'>
  </xs:complexType>

</xs:schema>
  

7. Open Issues

  1. Add implementation notes for server MIME type registration and HTTP Content-Type output.
  2. Add implementation notes for client handling on various platforms (e.g., DDE messages in Windows).


Notes

1. RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax <http://www.ietf.org/rfc/rfc3986.txt>.

2. A Uniform Resource Identifier (URI) Scheme for the Extensible Messaging and Presence Protocol (XMPP) <http://www.ietf.org/internet-drafts/draft-saintandre-xmpp-uri-08.txt> (work in progress).

3. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://www.ietf.org/rfc/rfc3920.txt>.

4. See, for instance, <http://www.mozilla.org/docs/web-developer/mimetypes.html> for information about MIME support in the Mozilla family of web browsers.

5. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies <http://www.ietf.org/rfc/rfc2045.txt>.

6. RFC 3023: XML Media Types <http://www.ietf.org/rfc/rfc3023.txt>.

7. RFC 3923: End-to-End Signing and Object Encryption for the Extensible Messaging and Presence Protocol (XMPP) <http://www.ietf.org/rfc/rfc3923.txt>.

8. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.

9. JEP-0045: Multi-User Chat <http://www.jabber.org/jeps/jep-0045.html>.

10. JEP-0077: In-Band Registration <http://www.jabber.org/jeps/jep-0077.html>.

11. RFC 2779: A Model for Presence and Instant Messaging <http://www.ietf.org/rfc/rfc2779.txt>.

12. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

13. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.4 (2005-01-05)

Reinstated the proposal since it fills a need not met by RFC 3923 and draft-saintandre-xmpp-uri; specified XML schema; specified IANA considerations, including content-type registration; further specified security considerations; removed use cases for service discovery, directory search, vCard lookup, and authentication; added more detailed descriptive text to remaining use cases. (psa)

Version 0.3 (2004-07-26)

Formally retracted this proposal in favor of the relevant Internet-Drafts. (psa)

Version 0.2 (2003-08-18)

Added authentication example. (psa)

Version 0.1 (2003-04-21)

Initial version. (psa)


END