git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4236 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2010-06-11 15:48:23 +00:00
parent 953ad5ea61
commit fb758fbca1
1 changed files with 31 additions and 15 deletions

View File

@ -11,6 +11,7 @@
&LEGALNOTICE;
<number>0206</number>
<status>Draft</status>
<interim/>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
@ -26,6 +27,12 @@
</schemaloc>
&ianpaterson;
&stpeter;
<revision>
<version>1.3rc1</version>
<date>in progress, last updated 2010-06-10</date>
<initials>psa</initials>
<remark><p>Added 'restartlogic' attribute per XSF ticket SPEC-8; added note about use of the 'from' and 'to' attributes from XEP-0124 in relation to XML stream headers as specified in rfc3920bis.</p></remark>
</revision>
<revision>
<version>1.2</version>
<date>2008-10-29</date>
@ -47,7 +54,7 @@
</header>
<section1 topic='Introduction' anchor='intro'>
<p>The &xep0124; protocol defines how arbitrary XML elements can be transported efficiently and reliably over HTTP in both directions between a client and server. This document defines some minor extensions to BOSH that enable XMPP streams (as specified in &rfc3920; and &rfc3921;) to be bound to HTTP.</p>
<p>The &xep0124; protocol defines how arbitrary XML elements can be transported efficiently and reliably over HTTP in both directions between a client and server. This document defines some minor extensions to BOSH that enable XMPP streams (as specified in &xmppcore;) to be bound to HTTP.</p>
</section1>
<section1 topic="&lt;body/&gt; Wrapper Element" anchor='wrapper'>
@ -63,7 +70,7 @@
</section1>
<section1 topic="Session Creation Request" anchor='initiate'>
<p>The client SHOULD include a 'version' attribute qualified by the 'urn:xmpp:xbosh' namespace in its session creation request. This attribute corresponds to the 'version' attribute of the XMPP &lt;stream:stream/&gt; element as defined in <cite>RFC 3920</cite>. The connection manager SHOULD forward the value to the XMPP server accordingly.</p>
<p>The client SHOULD include a 'version' attribute qualified by the 'urn:xmpp:xbosh' namespace in its session creation request. This attribute corresponds to the 'version' attribute of the XMPP &lt;stream:stream/&gt; element as defined in <cite>RFC 3920</cite> and &rfc3920bis;. The connection manager SHOULD forward the value to the XMPP server accordingly.</p>
<example caption="Requesting a session with a version attribute">
<![CDATA[POST /webclient HTTP/1.1
Host: httpcm.jabber.org
@ -72,21 +79,24 @@ Content-Type: text/xml; charset=utf-8
Content-Length: 104
<body content='text/xml; charset=utf-8'
from='user@example.com'
hold='1'
rid='1573741820'
to='jabber.org'
route='xmpp:jabber.org:9999'
to='example.com'
route='xmpp:example.com:9999'
secure='true'
wait='60'
xml:lang='en'
xmpp:version='1.0'
xmlns='http://jabber.org/protocol/httpbind'
xmlns:xmpp='urn:xmpp:xbosh'/>]]></example>
<p>The connection manager can use the 'from' and 'to' attributes to populate the same attributes on the stream header sent from the connection manager to the XMPP server, or can use them for session management purposes specific to the connection manager implementation.</p>
<p>Note: Unlike the protocol defined in &xep0025;, an opening &lt;stream:stream&gt; tag is not sent to the connection manager (since BOSH &lt;body/&gt; elements MUST not contain partial XML elements). Any XML streams between the connection manager and an XMPP server are the responsibility of the connection manager (and beyond the scope of this document).</p>
</section1>
<section1 topic="Session Creation Response" anchor='create'>
<p>The connection manager SHOULD include a 'version' attribute (qualified by the 'urn:xmpp:xbosh' namespace) and a &lt;stream:features/&gt; element (qualified by the 'http://etherx.jabber.org/streams' namespace) in a response as soon as they are available, either in its session creation response, or (if it has not yet received them from the XMPP server) in any subsequent response.</p>
<p>If the connection manager supports stream restarts, it MUST advertise that fact by including a 'restartlogic' attribute (qualified by the 'urn:xmpp:xbosh' namespace) whose value is set to "true" &BOOLEANNOTE;. It is STRONGLY RECOMMENDED for all XMPP connection managers to support stream restarts, since they are an integral aspect of stream negotiation in XMPP. However, note that some older BOSH implementations do not explicitly advertise support for stream restarts.</p>
<p>Note: The same procedure applies to the <em>obsolete</em> XMPP-specific 'authid' attribute of the BOSH &lt;body/&gt; element, which contains the value of the XMPP stream ID generated by the XMPP server. This value is needed only by legacy XMPP clients in order to complete digest authentication using the <em>obsolete</em>&#32;&xep0078; protocol. <note>Separate 'sid' and 'authid' attributes are required because the connection manager is not necessarily part of a single XMPP server (e.g., it may handle HTTP connections on behalf of multiple XMPP servers).</note></p>
<example caption="Session creation response with stream features">
<![CDATA[HTTP/1.1 200 OK
@ -98,10 +108,12 @@ Content-Length: 674
polling='5'
requests='2'
hold='1'
from='example.com'
accept='deflate,gzip'
sid='SomeSID'
secure='true'
charsets='ISO_8859-1 ISO-2022-JP'
xmpp:restartlogic='true'
xmpp:version='1.0'
authid='ServerStreamID'
xmlns='http://jabber.org/protocol/httpbind'
@ -109,7 +121,7 @@ Content-Length: 674
xmlns:stream='http://etherx.jabber.org/streams'>
<stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>SCRAM</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
</stream:features>
@ -128,7 +140,7 @@ Content-Length: 483
xmlns:stream='http://etherx.jabber.org/streams'>
<stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>SCRAM</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
</stream:features>
@ -139,11 +151,11 @@ Content-Length: 483
<p>Note: The 'version' attribute qualified by the 'urn:xmpp:xbosh' namespace SHOULD also be included on the request and response when adding new streams to a session.</p>
</section1>
<section1 topic="Authentication, Resource Binding, and IM Session Establishment" anchor='preconditions-sasl'>
<p>A success case for authentication and resource binding using the XMPP protocols is shown below. For detailed specification of these protocols (including error cases), refer to <cite>RFC 3920</cite>.</p>
<section1 topic="Authentication and Resource Binding" anchor='preconditions-sasl'>
<p>A success case for authentication and resource binding using the XMPP protocols is shown below. For detailed specification of these protocols (including error cases), refer to <cite>RFC 3920</cite> and draft-ietf-xmpp-3920bis.</p>
<example caption="SASL authentication step 1">
<![CDATA[POST /webclient HTTP/1.1
Host: httpcm.jabber.org
Host: httpcm.example.com
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
Content-Length: 172
@ -151,7 +163,7 @@ Content-Length: 172
<body rid='1573741821'
sid='SomeSID'
xmlns='http://jabber.org/protocol/httpbind'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='SCRAM'/>
</body>
]]></example>
<example caption="SASL authentication step 2">
@ -168,7 +180,7 @@ Content-Length: 250
]]></example>
<example caption="SASL authentication step 3">
<![CDATA[POST /webclient HTTP/1.1
Host: httpcm.jabber.org
Host: httpcm.example.com
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
Content-Length: 418
@ -198,7 +210,7 @@ Content-Length: 190
]]></example>
<example caption="SASL authentication step 5">
<![CDATA[POST /webclient HTTP/1.1
Host: httpcm.jabber.org
Host: httpcm.example.com
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
Content-Length: 152
@ -220,7 +232,7 @@ Content-Length: 121
]]></example>
<p>Upon receiving the &lt;success/&gt; element, the client MUST then ask the connection manager to restart the stream by sending a "restart request" that is structured as follows:</p>
<ul>
<li>The BOSH &lt;body/&gt; element MUST include a boolean 'restart' attribute (qualified by the 'urn:xmpp:xbosh' namespace) whose value is "true" &BOOLEANNOTE;.</li>
<li>The BOSH &lt;body/&gt; element MUST include a boolean 'restart' attribute (qualified by the 'urn:xmpp:xbosh' namespace) whose value is set to "true" &BOOLEANNOTE;.</li>
<li>The BOSH &lt;body/&gt; element SHOULD include the 'to' attribute.</li>
<li>The BOSH &lt;body/&gt; element SHOULD include the 'xml:lang' attribute.</li>
<li>The BOSH &lt;body/&gt; element SHOULD be empty (i.e., not contain an XML stanza). However, if the client includes an XML stanza in the body, the connection manager SHOULD ignore it. <note>It is known that some connection manager implementations accept an XML stanza in the body of the restart request and send that stanza to the server when the stream is restarted; however there is no guarantee that a connection manager will send the stanza so a client cannot rely on this behavior.</note></li>
@ -233,7 +245,7 @@ Content-Length: 240
<body rid='1573741824'
sid='SomeSID'
to='jabber.org'
to='example.com'
xml:lang='en'
xmpp:restart='true'
xmlns='http://jabber.org/protocol/httpbind'
@ -280,7 +292,7 @@ Content-Length: 221
type='result'
xmlns='jabber:client'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>stpeter@jabber.org/httpclient</jid>
<jid>user@example.com/httpclient</jid>
</bind>
</iq>
</body>
@ -361,6 +373,10 @@ Content-Length: 68
type='xs:boolean'
default='false'/>
<xs:attribute name='restartlogic'
type='xs:boolean'
default='false'/>
<xs:attribute name='version'
type='xs:string'
default='1.0'/>