JEP-0066: Out of Band Data

This JEP provides canonical documentation of the jabber:iq:oob and jabber:x:oob namespaces currently in use within the Jabber community.


NOTICE: This Historical JEP provides canonical documentation of a protocol that is in use within the Jabber/XMPP community. This JEP is not a standards-track specification within the Jabber Software Foundation's standards process; however, it may be converted to standards-track in the future or may be obsoleted by a more modern protocol.


JEP Information

Status: Active
Type: Historical
Number: 0066
Version: 1.4
Last Updated: 2006-01-11
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: oob
Schema for jabber:iq:oob: <http://jabber.org/protocol/oob/iq-oob.xsd>
Schema for jabber:x:oob: <http://jabber.org/protocol/oob/x-oob.xsd>
Wiki Page: <http://wiki.jabber.org/index.php/Out of Band Data (JEP-0066)>

Author Information

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 Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

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

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 protocol defined in this JEP has been developed outside the Internet Standards Process and is to be understood as an extension 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. jabber:iq:oob
3. jabber:x:oob
4. Use With Non-HTTP URI Schemes
5. Integration With Stream Initiation
6. Security Considerations
7. IANA Considerations
8. Jabber Registrar Considerations
9. XML Schemas
9.1. jabber:iq:oob
9.2. jabber:x:oob
Notes
Revision History


1. Introduction

This JEP documents the original mechanisms for out-of-band (OOB) data transfer as codified in the 'jabber:iq:oob' and 'jabber:x:oob' namespaces. This JEP is informational only and does not purport to recommend a Jabber standard.

2. jabber:iq:oob

The intent of the 'jabber:iq:oob' was to provide a "least common denominator" mechanism for basic file transfers in the early days of the Jabber open-source projects. The more advanced mechanisms defined in File Transfer [1] SHOULD be used, although the 'jabber:iq:oob' namespace can be included as one option during the file transfer negotiation since many older clients do not yet support other file transfer options such as those defined in SOCKS5 Bytestreams [2] and In-Band Bytestreams [3].

To initiate an out-of-band file transfer with an intended recipient using the 'jabber:iq:oob' namespace (whether or not negotiated via JEP-0096), the sending application sends an <iq/> of type 'set' to the recipient containing a <query/> child element qualified by the 'jabber:iq:oob' namespace; the <query/> MUST in turn contain a <url/> child specifying the URL of the file to be transferred, and MAY contain an optional <desc/> child describing the file. This usage is shown in the following example.

Example 1. Sender Initiates Request-Response

<iq type='set'
    from='stpeter@jabber.org/work'
    to='MaineBoy@jabber.org/home'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
</iq>
    

The expected result is for the recipient to retrieve the file via an HTTP GET request and to then inform the sender of successful receipt of the file. The receiving application MUST NOT send the IQ result until it has retrieved the complete file (e.g., it MUST NOT send the IQ result if it has merely attempted to retrieve the file or the URL provided seems to be valid):

Example 2. Recipient Informs Sender of Success

<iq type='result'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'/>
    

If the recipient attempts to retrieve the file but is unable to do so, the receiving application MUST return an <iq/> of type 'error' to the sender specifying a Not Found condition:

Example 3. Recipient Informs Sender of Failure

<iq type='error'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
  <error code='404' type='cancel'>
    <not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
    

If the recipient rejects the request outright, the receiving application MUST return an <iq/> of type 'error' to the sender specifying a Not Acceptable condition:

Example 4. Recipient Rejects Request

<iq type='error'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
  <error code='406' type='modify'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
    

3. jabber:x:oob

The 'jabber:x:oob' namespace was not intended for use in file transfers, since the lack of a request-response semantic prevents the recipient from programatically confirming receipt of the file or communicating errors (if these features are needed, an application should use the 'jabber:iq:oob' namespace and/or the stream initiation profile defined in JEP-0096). However, the 'jabber:x:oob' namespace is useful for communicating a URL to other users or applications. This is done by including an <x/> child element qualified by the 'jabber:x:oob' namespace in either a <message/> and <presence/> stanza; the <x/> child MUST contain a <url/> child specifying the URL of the resource, and MAY contain an optional <desc/> child describing the resource.

Example 5. Sender Communicates a URI

<message from='stpeter@jabber.org/work'
         to='MaineBoy@jabber.org/home'>
  <body>Yeah, but do you have a license to Jabber?</body>
  <x xmlns='jabber:x:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
  </x>
</message>
    

4. Use With Non-HTTP URI Schemes

The value of the <url/> element is not limited to URIs that conform to the http: URI scheme (as specified by RFC 2616 [4]). For example, file transfers could also be effected using ftp: URIs as (specified by RFC 959 [5]). Going further afield, several existing Jabber clients use the callto: URI scheme to initiate voice conferencing via NetMeeting or GnomeMeeting. Other out-of-band communications could be initiated in a similar way via URI schemes such as sip: (as specified by RFC 3261 [6]). All of these usages are allowed by the existing OOB namespaces, as long as the value of the <url/> element is a valid URI (as specified by RFC 3986 [7]).

5. Integration With Stream Initiation

This section is non-normative.

Stream Initiation [8] defines methods for negotiating content streams between any two entities, and JEP-0096 defines a profile of stream initiation for file transfer. Although the use of jabber:iq:oob is not recommended by JEP-0096, it could be offered as one option (e.g., a fallback if SOCKS5 Bytestreams and In-Band Bytestreams are not available). If so, the value of the feature negotiation option MUST be "jabber:iq:oob" and the <query/> element within the <iq/> stanza qualified by the 'jabber:iq:oob' namespace MUST possess a 'sid' attribute whose value is the StreamID negotiated by stream initiation.

A sample protocol flow is shown below.

Example 6. Stream Initiation Offer

    
<iq type='set' 
    from='romeo@montague.net/orchard'
    to='juliet@capulet.com/chamber'
    id='offer1'>
  <si xmlns='http://jabber.org/protocol/si' 
      id='a0'
      mime-type='text/plain'
      profile='http://jabber.org/protocol/si/profile/file-transfer'>
    <file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
          name='test.txt'
          size='1022'/>
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='form'>
        <field var='stream-method' type='list-single'>
          <option><value>http://jabber.org/protocol/bytestreams</value></option>
          <option><value>http://jabber.org/protocol/ibb</value></option>
          <option><value>jabber:iq:oob</value></option>
        </field>
      </x>
    </feature>
  </si>
</iq>
    
  

Example 7. Stream Initiation Result

    
<iq type='result' 
    from='juliet@capulet.com/chamber'>
    to='romeo@montague.net/orchard'
    id='offer1'>
  <si xmlns='http://jabber.org/protocol/si'
      id='a0'
      profile='http://jabber.org/protocol/si/profile/file-transfer'>
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='submit'>
        <field var='stream-method'>
          <value>jabber:iq:oob</value>
        </field>
      </x>
    </feature>
  </si>
</iq>
    
  

Example 8. Sender Initiates Request-Response

<iq type='set'
    from='romeo@montague.net/orchard'
    to='juliet@capulet.com/chamber'>
    id='send1'>
  <query xmlns='jabber:iq:oob'
         sid='a0'>
    <url>http://www.shakespeare.lit/files/letter.txt</url>
  </query>
</iq>
  

Example 9. Recipient Informs Sender of Success

<iq type='result'
    from='juliet@capulet.com/chamber'>
    to='romeo@montague.net/orchard'
    id='send1'/>
  

6. Security Considerations

As with any mechanism that communicates a URI, care must be taken by the receiving application to ensure that the resource retrieved does not contain harmful or malicious data (e.g., a virus-infected file).

7. IANA Considerations

This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [9].

8. Jabber Registrar Considerations

The 'jabber:iq:oob' and 'jabber:x:oob' namespaces are included in the protocol namespaces registry maintained by the Jabber Registrar [10].

9. XML Schemas

9.1 jabber:iq:oob

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

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

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      JEP-0066: http://www.jabber.org/jeps/jep-0066.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='query'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='url' type='xs:string' minOccurs='1'/>
        <xs:element name='desc' type='xs:string' minOccurs='0'/>
      </xs:sequence>
      <xs:attribute name='sid' type='xs:string' use='optional'/>
    </xs:complexType>
  </xs:element>

</xs:schema>
    

9.2 jabber:x:oob

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

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

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      JEP-0066: http://www.jabber.org/jeps/jep-0066.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='x'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='url' type='xs:string' minOccurs='1'/>
        <xs:element name='desc' type='xs:string' minOccurs='0'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
    


Notes

1. JEP-0096: File Transfer <http://www.jabber.org/jeps/jep-0096.html>.

2. JEP-0065: SOCKS5 Bytestreams <http://www.jabber.org/jeps/jep-0065.html>.

3. JEP-0047: In-Band Bytestreams <http://www.jabber.org/jeps/jep-0047.html>.

4. RFC 2616: Hypertext Transport Protocol -- HTTP/1.1 <http://www.ietf.org/rfc/rfc2616.txt>.

5. RFC 959: File Transfer Protocol <http://www.ietf.org/rfc/rfc0959.txt>.

6. RFC 3261: Session Initiation Protocol (SIP) <http://www.ietf.org/rfc/rfc3261.txt>.

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

8. JEP-0095: Stream Initiation <http://www.jabber.org/jeps/jep-0095.html>.

9. 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/>.

10. 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 1.4 (2006-01-11)

Removed example of including URL in presence stanza. (psa)

Version 1.3 (2004-10-18)

Added non-normative section on integration with stream initiation (JEP-0095); added optional sid attribute to jabber:iq:oob schema. (psa)

Version 1.2 (2004-04-13)

Clarified that IQ use is for basic file transfer whereas message and presence use is for communication of URIs; added presence example; added references to file transfer JEPs as well as related open issue. (psa)

Version 1.1 (2004-02-10)

Editorial adjustments and clarifications; added references to relevant RFCs. (psa)

Version 1.0 (2003-10-08)

Per a vote of the Jabber Council, changed status to Active. (psa)

Version 0.3 (2003-06-22)

Made several small editorial changes; added XML schemas. (psa)

Version 0.2 (2003-01-08)

Added information about non-HTTP URIs. (psa)

Version 0.1 (2002-12-16)

Initial version. (psa)


END