1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@133 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2006-10-30 22:18:25 +00:00
parent c482e74ffd
commit 6bdc208181

View File

@ -10,7 +10,7 @@
<abstract>This document defines a Jingle transport method that results in sending data over a raw User Datagram Protocol (UDP) connection.</abstract>
&LEGALNOTICE;
<number>0177</number>
<status>Proposed</status>
<status>Experimental</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<approver>Council</approver>
@ -26,6 +26,12 @@
&scottlu;
&hildjj;
&seanegan;
<revision>
<version>0.3</version>
<date>2006-10-30</date>
<initials>psa</initials>
<remark>Added informational messages; mentioned that the Raw UDP candidate is conceptually equivalent to the concept of an in-use candidate from the ICE specification; added reference to RFC 4347.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2006-07-12</date>
@ -40,7 +46,7 @@
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0166; defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor content (session) types, leaving that up to separate specifications. The current document defines a transport method for establishing and managing data between XMPP entities using a raw User Datagram Protocol (UDP) connection (see &rfc0768;).</p>
<p>&xep0166; defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor content formats, leaving that up to separate specifications. The current document defines a transport method for establishing and managing data between XMPP entities using a raw User Datagram Protocol (UDP) connection (see &rfc0768;).</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
@ -49,14 +55,15 @@
<li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
<li>Where communication with non-XMPP entities is needed, push as much complexity as possible onto server-side gateways between the XMPP network and the non-XMPP network.</li>
</ol>
<p>Note: The Raw UDP transport does not provide traversal of Network Address Translators (NATs) and is provided only for the purpose of specifying the IP address and port that an entity considers most likely to succeed without the need for NAT traversal. If NAT traversal is needed, &xep0176; SHOULD be used.</p>
</section1>
<section1 topic='Protocol Description' anchor='protocol'>
<section2 topic='Transport Initiation' anchor='protocol-initiate'>
<p>In order for the initiating entity in a Jingle exchange to start the negotiation, it MUST send a Jingle "session-initiate" stanza as described in <cite>XEP-0166</cite>. This stanza MUST include at least one transport methods. If the initiating entity wishes to negotiate the Raw UDP transport, it MUST include an empty &TRANSPORT; child element qualified by the 'http://jabber.org/protocol/jingle/transport/raw-udp' namespace.</p>
<example caption="Initiation Example"><![CDATA[
<iq to='juliet@capulet.com/balcony' from='romeo@montague.net/orchard' id='jingle1' type='set'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='session-initiate'
<jingle xmlns='http://jabber.org/protocol/jingle'
action='session-initiate'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<description ...>
@ -65,18 +72,19 @@
</iq>
]]></example>
</section2>
<section2 topic='Target Entity Response' anchor='protocol-response'>
<p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the target entity returns an IQ-result:</p>
<example caption="Target Entity Provisionally Accepts the Session Request"><![CDATA[
<iq type='result' from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' id='jingle1'/>
<section2 topic='Receiver Response' anchor='protocol-response'>
<p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the receiver returns an IQ-result:</p>
<example caption="Receiver Provisionally Accepts the Session Request"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='result' id='jingle1'/>
]]></example>
</section2>
<section2 topic='Exchanging Address Information' anchor='protocol-addresses'>
<p>Once the session is provisionally accepted, each entity should send one &TRANSPORT; element in a transport-info meessage, containing exactly one &CANDIDATE; element per channel, whose 'ip' and 'port' attributes specify the IP address and port number of the candidate that the initiator has reason to believe will be most likely to succeed for that channel. (Note: In older versions of XEP-0166, this was referrred to as the "default candidate".) This is not necessarily the initiator's preferred address for communication, but instead is the "address most likely to succeed", i.e., the address that is assumed to be reachable by the vast majority of target entities. To determine reachability, the client needs classify ahead of time the permissiveness of the firewall or network address translator (NAT) it is behind, if any. If the NAT is symmetric (not permissive), the candidate SHOULD specify a relay address. Otherwise it SHOULD be an address derived via prior discovery using &rfc3489;, which will be an address on the outside of the firewall or NAT.</p>
<p>Once the session is provisionally accepted, each entity should send one &TRANSPORT; element in a transport-info meessage, containing exactly one &CANDIDATE; element per channel, whose 'ip' and 'port' attributes specify the IP address and port number of the candidate that the initiator has reason to believe will be most likely to succeed for that channel. This is not necessarily the initiator's preferred address for communication, but instead is the "address most likely to succeed", i.e., the address that is assumed to be reachable by the vast majority of target entities. To determine reachability, the client needs classify ahead of time the permissiveness of the NAT or firewall it is behind, if any. If the NAT is symmetric (not permissive), the candidate SHOULD specify a relay address. Otherwise it SHOULD be an address derived via prior discovery using &rfc3489;, which will be an address on the outside of the firewall or NAT.</p>
<p>Note: The Raw UDP candidate is equivalent to the "in-use" candidate as described in &ice;. (In older versions of XEP-0166, this was referrred to as the "default candidate".)</p>
<example caption="Address Exchange Example"><![CDATA[
<iq to='juliet@capulet.com/balcony' from='romeo@montague.net/orchard' id='jingle2' type='set'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='transport-info'
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jingle2' type='set'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='transport-info'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
@ -85,18 +93,62 @@
</jingle>
</iq>
]]></example>
<p>Note: The 'name' attribute specifies the name of the channel and the 'generation' attribute provides a tracking mechanism for determining which version of this candidate is in force (this is useful if the candidate is redefined mid-stream, for example if the port is changed).</p>
<p>Either entity may send this transport-info message at any time, after which the recipient should send and receive data to and from the new address.</p>
<p>The 'generation', 'ip', 'name', and 'port' attributes are REQUIRED. The 'name' attribute specifies the name of the channel and the 'generation' attribute provides a tracking mechanism for determining which version of this candidate is in force (this is useful if the candidate is redefined mid-stream, for example if the port is changed).</p>
<p>Either entity may send this transport-info message at any time, after which the recipient should attempt to send data to the specified address. If the data can be delivered, the recipient MUST send a Jingle transport-accept, content-accept, or session-accept action to the initiator.</p>
<example caption="Responder Returns Transport-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept1'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='transport-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'/>
</iq>
]]></example>
<example caption="Responder Returns Content-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept2'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='content-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'/>
</iq>
]]></example>
<example caption="Responder Returns Session-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept3'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='session-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'/>
</iq>
]]></example>
<p>The initiator MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).</p>
</section2>
<section2 topic='Informational Messages' anchor='protocol-info'>
<p>The syntax and semantics informational message payloads specific to the Raw UDP transport method will be defined in a future version of this specification.</p>
<p>Informational messages may be sent by the receiver within the context of the Raw UDP transport to communicate the status of transport checking. The informational message MUST be an IQ-set containing a &JINGLE; element of type "transport-info", where the informational message is a payload element qualified by the 'http://jabber.org/protocol/jingle/info/raw-udp' namespace; the following payload elements are defined:</p>
<table caption='Information Payload Elements'>
<tr>
<th>Element</th>
<th>Meaning</th>
</tr>
<tr>
<td>&lt;failed/&gt;</td>
<td>Connectivity checks failed.</td>
</tr>
<tr>
<td>&lt;succeeded/&gt;</td>
<td>Connectivity checks succeeded.</td>
</tr>
<tr>
<td>&lt;trying/&gt;</td>
<td>Connectivity checks are underway.</td>
</tr>
</table>
<p>Note: Because the informational message is sent in an IQ-set, the receiving party MUST return either an IQ-result or an IQ-error (normally only an IQ-result to acknowledge receipt; no error flows are defined or envisioned at this time).</p>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<section2 topic='End-to-End Data Encryption' anchor='security-e2e'>
<p>In order to secure the end-to-end data stream, implementations SHOULD use encryption methods appropriate to the transport method in use.</p>
<p>In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method; in the case of UDP, that would include Datagram Transport Layer Security (DTLS) as specified in &rfc4347;.</p>
</section2>
</section1>