XEP-0288 - Minor clarifications about bidi/dialback

Minor clarifications about bidi/dialback

Signed-off-by: Dave Cridland <dave.cridland@isode.com>
This commit is contained in:
Philip Hancke 2011-12-12 17:01:46 +00:00 committed by Dave Cridland
parent 4a150d9452
commit d5d1e1a269
1 changed files with 21 additions and 7 deletions

View File

@ -21,7 +21,7 @@
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<shortname>bidi</shortname>
<author>
<firstname>Philipp</firstname>
<surname>Hancke</surname>
@ -33,6 +33,12 @@
<email>dave.cridland@isode.com</email>
<jid>dave.cridland@isode.com</jid>
</author>
<revision>
<version>0.2</version>
<date>2010-11-11</date>
<initials>ph</initials>
<remark><p>Minor clarifications about the implications of bidi and dialback.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2010-10-04</date>
@ -55,8 +61,9 @@
<remark><p>initial version</p></remark>
</revision>
</header>
<section1 topic='Introduction'>
<p>&xmppcore; restricts server-to-server communication in such a way that a server has to use on TCP connection for XML stanzas sent from the server to the peer and another TCP connection (initiated by the peer) for stanzas from the peer to the server, for a total of two TCP connections. &rfc6120; allows two servers to send stanzas in a bidirectional way, but does not define methods for explicitly signalling the usage thereof. This is accomplished in this specification.</p>
<section1 topic='Introduction' anchor='intro'>
<p>&rfc3920; restricts server-to-server communication in such a way that a server has to use one TCP connection for XML stanzas sent from the server to the peer, and another TCP connection (initiated by the peer) for stanzas from the peer to the server, for a total of two TCP connections. &rfc3920bis; allows two servers to send stanzas in a bidirectional way, but does not define methods for explicitly signalling the usage thereof. This is accomplished herein.</p>
<p>While this may seem like a mere optimization that decreases the number of sockets used by an implementation or increases the performance of the server-to-server connection<note>In constrained environments, bidirectional server-to-server connections exhibit a reduced packet round trip time, see &lt;<link url='http://www.isode.com/whitepapers/xmpp-performance-constrained.html'>http://www.isode.com/whitepapers/xmpp-performance-constrained.html</link>&gt;.</note>, it actually removes some of the practical barriers for the implementation of Multiplexing in &xep0220;.</p>
</section1>
<!--
http://www.ietf.org/mail-archive/web/xmpp/current/msg00658.html
@ -74,18 +81,18 @@ http://www.ietf.org/mail-archive/web/xmpp/current/msg00664.html
<p>If the initiating entity chooses to use TLS, STARTTLS negotiation MUST be completed before enabling bidirectionality.</p>
</section2>
<section2 topic='Negotiation' anchor='nego'>
<p>To enable bidirectional communication, the connecting server sends a &lt;bidi/&gt; element qualified by the 'urn:xmpp:bidi' namespace. This SHOULD be done before either SASL negotiation or &xep0220;.</p>
<p>To enable bidirectional communication, the connecting server sends a &lt;bidi/&gt; element qualified by the 'urn:xmpp:bidi' namespace. This SHOULD be done before either SASL negotiation or Server Dialback.</p>
<example caption="Connecting Server Requests Bidirectionality"><![CDATA[
C: <bidi xmlns='urn:xmpp:bidi'/>
]]></example>
<p>Note: Since there is no reply to the request, it is possible to pipeline it.</p>
<p>After enabling bidirectionality, the connecting server continues to authenticate via SASL or requests to send stanzas for a domain pair with Server Dialback. The receiving server MUST NOT send stanzas to the peer before it has authenticated via SASL, or the peer's identity has been verified via Server Dialback. Note that the receiving server MUST NOT attempt to verify a dialback key on the same connection where the corresponding request was issued.</p>
<p>Also note that the receiving server MUST only send stanzas for which it has been authenticated - in the case of TLS/SASL based authentication, this is the value of the stream's 'to' attribute, whereas in the case of &xep0220; this is the value of the 'to' attribute on any &lt;db:result> element.</p>
<p>Finally, once bidirectionality is enabled, the receiving server MAY initiate &xep0220; authentications for other domains it hosts to any domain authenticated to be hosted by the connecting server.</p>
<p>Also note that the receiving server MUST only send stanzas for which it has been authenticated - in the case of TLS/SASL based authentication, this is the value of the stream's 'to' attribute, whereas in the case of Server Dialback this is the inverse of any domain pair that has been used in a dialback request.</p>
<p>Finally, once bidirectionality is enabled, the receiving server MAY initiate Server Dialback authentications for other domains it hosts to any domain authenticated to be hosted by the connecting server. In particular, it may initiate Target Piggybacking for any target domain that has successfully been used as a source domain by the connecting server.</p>
</section2>
</section1>
<section1 topic='Examples' anchor='examples'>
<p>This section shows two complete examples of bidirectional streams, the first example uses SASL EXTERNAL, the second uses Server Dialback. </p>
<p>This section shows two complete examples of bidirectional streams, the first example uses SASL EXTERNAL, the second uses Server Dialback.</p>
<example caption='Bidirectional Streams with SASL Authentication'><![CDATA[
C: <stream:stream xmlns:stream='http://etherx.jabber.org/streams'
xmlns='jabber:server' xmlns:db='jabber:server:dialback'
@ -190,17 +197,24 @@ C: <db:result from='capulet.lit' to='conference.montague.lit' type='valid'/>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>This specification defines the following XML namespaces:</p>
<ul>
<li>'urn:xmpp:bidi'</li>
</ul>
<p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
</section2>
<section2 topic='Stream Features' anchor='registrar-stream'>
<p>This specification defines the following XML namespace:</p>
<ul>
<li>'urn:xmpp:features:bidi'</li>
</ul>
<p>Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar shall add 'urn:xmpp:features:bidi' in its registry of stream features at &STREAMFEATURES;.</p>
</section2>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Justin Karneges.</p>
</section1>
</xep>