1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-25 10:42:19 -05:00
xeps/xep-0081.xml

271 lines
14 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM "xep.ent">
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Jabber MIME Type</title>
<abstract>This document 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.</abstract>
&LEGALNOTICE;
<number>0081</number>
<status>Retracted</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>RFC 2045</spec>
<spec>RFC 3023</spec>
<spec>XEP-0045</spec>
<spec>XEP-0077</spec>
</dependencies>
<supersedes>None</supersedes>
<supersededby>None</supersededby>
<shortname>mimetype</shortname>
&hildjj;
&stpeter;
<revision>
<version>0.5</version>
<date>2005-07-19</date>
<initials>psa</initials>
<remark>Retracted the proposal (again) in favor of draft-saintandre-xmpp-iri.</remark>
</revision>
<revision>
<version>0.4</version>
<date>2005-01-05</date>
<initials>psa</initials>
<remark>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.</remark>
</revision>
<revision>
<version>0.3</version>
<date>2004-07-26</date>
<initials>psa</initials>
<remark>Formally retracted this proposal in favor of the relevant Internet-Drafts.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-08-18</date>
<initials>psa</initials>
<remark>Added authentication example.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-04-21</date>
<initials>psa</initials>
<remark>Initial version.</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>The value of a URI scheme (see &rfc3986;) for Jabber/XMPP communications has long been recognized within the Jabber community, and such a scheme has been formally defined in &rfc4622; as a way of identifying entities that adhere to &xmppcore; 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 &lt;xmpp:user@domain&gt;.</p>
<p>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
<note>See, for instance, &lt;<link url='http://www.mozilla.org/docs/web-developer/mimetypes.html'>http://www.mozilla.org/docs/web-developer/mimetypes.html</link>&gt; for information about MIME support in the Mozilla family of web browsers.</note>
is to define a MIME type (in accordance with &rfc2045;) and then reconfigure the relevant server and client software to correctly handle the new MIME type.</p>
<p>Therefore, this document defines a MIME type of "application/jabber+xml" (in particular, an XML media type in accordance with &rfc3023;). 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.</p>
<p>Note: The "application/jabber+xml" MIME type defined herein is not to be confused with the "application/xmpp+xml" MIME type defined in &rfc3923;; the two MIME types address different requirements and do not overlap or conflict.</p>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<p>The solution MUST enable a user to complete the following use cases, support for which is REQUIRED:</p>
<ul>
<li>Send a single message to another user.</li>
<li>Initiate a one-to-one chat session with another user.</li>
<li>Subscribe to another user's presence.</li>
</ul>
<p>In addition, the solution SHOULD enable a user to complete the following use cases, support for which is RECOMMENDED:</p>
<ul>
<li>Join a groupchat room.</li>
<li>Register with a service.</li>
<!--
<li>Send a &xep0030; request.</li>
<li>Search a user directory (see &xep0055;).</li>
<li>Request another user's vCard.</li>
-->
</ul>
<p>These use cases are defined below.</p>
<section2 topic='Sending a Message' anchor='message'>
<p>In order to send a message to a contact, the user opens an XMPP file of the following form:</p>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<message jid='stpeter@jabber.org'/>
</jabber>
]]></code>
<p>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 &xmppim;, first authenticating with the user's Jabber/XMPP server if necessary.</p>
</section2>
<section2 topic='Starting a Chat' anchor='chat'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<chat jid='stpeter@jabber.org'/>
</jabber>
]]></code>
<p>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 <cite>XMPP IM</cite>, first authenticating with the user's Jabber/XMPP server if necessary.</p>
</section2>
<section2 topic='Subscribing to Presence' anchor='subscribe'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<subscribe jid='stpeter@jabber.org'/>
</jabber>
]]></code>
<p>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 <cite>XMPP IM</cite>, 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 <cite>XMPP IM</cite>.</p>
</section2>
<section2 topic='Joining a Groupchat Room' anchor='groupchat'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<groupchat jid='jdev@conference.jabber.org'/>
</jabber>
]]></code>
<p>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 &xep0045;, first authenticating with the user's Jabber/XMPP server if necessary.</p>
</section2>
<section2 topic='Registering with a Service' anchor='register'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<register jid='headlines.shakespeare.lit'/>
</jabber>
]]></code>
<p>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 &xep0077;. 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 <cite>XEP-0077</cite>.</p>
</section2>
<!--
<section2 topic='Making a Service Discovery Request' anchor='disco'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<disco jid='shakespeare.lit'>
<items/>
<info/>
</disco>
</jabber>
]]></code>
<p>The browser passes this file to the helper application, which shall instantiate an appropriate interface for sending a service discovery request to the JID defined in the file.</p>
</section2>
<section2 topic='Searching a Directory' anchor='search'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<search jid='users.jabber.org'>
<nick>stpeter</nick>
</search>
</jabber>
]]></code>
<p>The browser passes this file to the helper application, which shall instantiate an appropriate interface for searching the directory associated with the JID defined in the file, including pre-populated information as specified (e.g., nick, first name, last name).</p>
</section2>
<section2 topic='Requesting a vCard' anchor='vcard'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<jabber>
<vcard jid='stpeter@jabber.org'/>
</jabber>
]]></code>
<p>The browser passes this file to the helper application, which shall instantiate an appropriate interface for requesting the vCard of the JID defined in the file.</p>
</section2>
-->
</section1>
<!--
<section1 topic='Authentication' anchor='auth'>
<p>The solution should also enable a user to authenticate with a server using parameters defined in the file, e.g., for the purpose of single-sign-on (SSO).</p>
<code><![CDATA[
<connect>
<host>somehost</host>
<ip>10.1.1.1</ip>
<port>5222</port>
<ssl/>
<authenticate>
<username>foo</username>
<password>test</password>
<resource>Work</resource>
</authenticate>
</connect>
]]></code>
<p>The username, password, and resource are not required if there is some other extension inside authenticate, that, e.g. does SSO. Authenticate is mostly useful only for these SSO situations, anyway. If the user is already connected, the application SHOULD ignore the &lt;connect/&gt; block.</p>
</section1>
-->
<section1 topic='Security Considerations' anchor='security'>
<p>Detailed security considerations for instant messaging and presence protocols are given in &rfc2779; (Sections 5.1 through 5.4), and for XMPP in particular are given in <cite>RFC 3920</cite> (Sections 12.1 through 12.6). In addition, all of the security considerations specified in <cite>RFC 3023</cite> apply to the "application/jabber+xml" media type.</p>
<p>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.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires registration of the "application/jabber+xml" content type with &IANA;. The registration is as follows:</p>
<code><![CDATA[
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 XEP-0081.
Interoperability considerations: (none)
Specification: JSF XEP-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:
XMPP Registrar, <registrar@jabber.org>
Intended usage: COMMON
Author/Change controller: JSF, XMPP Registrar
]]></code>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/mimetype' in its registry of protocol namespaces.</p>
</section2>
<section2 topic='IANA Interaction' anchor='registrar-iana'>
<p>The XMPP Registrar shall interact with the IANA in order to register the media type defined herein.</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?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>
]]></code>
</section1>
<section1 topic='Open Issues'>
<ol>
<li>Add implementation notes for server MIME type registration and HTTP Content-Type output.</li>
<li>Add implementation notes for client handling on various platforms (e.g., DDE messages in Windows).</li>
</ol>
</section1>
</xep>