No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0361.xml 10.0KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Zero Handshake Server to Server Protocol</title>
  10. <abstract>
  11. This specification defines an approach for a pair of servers to eliminate initial handshakes and associated
  12. data transfer when using the XMPP S2S Protocol. This approach may only be used with a priori agreement and configuration
  13. of the two servers involved. This is of significant benefit in high latency environments.
  14. </abstract>
  16. <number>0361</number>
  17. <status>Deferred</status>
  18. <type>Informational</type>
  19. <sig>Standards</sig>
  20. <approver>Council</approver>
  21. <dependencies>
  22. <spec>RFC 6120</spec>
  23. <spec>RFC 6121</spec>
  24. </dependencies>
  25. <supersedes/>
  26. <supersededby/>
  27. <shortname>X2X</shortname>
  28. <author>
  29. <firstname>Steve</firstname>
  30. <surname>Kille</surname>
  31. <email></email>
  32. <jid></jid>
  33. </author>
  34. <revision>
  35. <version>0.3</version>
  36. <date>2017-09-11</date>
  37. <initials>XEP Editor (jwi)</initials>
  38. <remark>Defer due to lack of activity.</remark>
  39. </revision>
  40. <revision>
  41. <version>0.2</version>
  42. <date>2015-07-18</date>
  43. <initials>sek</initials>
  44. <remark><p>Assume an open &lt;stream:stream&gt;, implicitly parenting all XML elements received and sent.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.1</version>
  48. <date>2015-07-16</date>
  49. <initials>XEP Editor (mam)</initials>
  50. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>0.0.1</version>
  54. <date>2015-06-22</date>
  55. <initials>sek</initials>
  56. <remark><p>First draft.</p></remark>
  57. </revision>
  58. </header>
  59. <section1 topic='Introduction' anchor='intro'>
  60. <p>
  61. This specification arose from work on deploying XMPP in high latency environments, with round trips of several second. Even with data transfer rates as low as 2400 bit per second, XMPP works well once connections are established as compressed messages are small and the protocols are fully asynchronous. However the combination of low data rate and high latency led to connection establishment times of several minutes. This was unworkable, particularly when connections were prone to failure.
  62. </p>
  63. <p>
  64. The solution set out here is to eliminate all the intial handshaking and to start the S2S communication as if the handshaking had been correctly completed. This cannot be used for communication between an arbitrary pair of servers, as in general the negotiation associated with the handshaking is vital for correctly determining a variety of parameters for use in the connection. However, a pair of servers may operate by locally configuring information that would have been negotiated. This enables the pair of servers to eliminate initial handshaking and data exchange.
  65. </p>
  66. </section1>
  67. <section1 topic='Requirements' anchor='reqs'>
  68. <p>
  69. This specification can be considered as a profile for server to server XMPP communication, to enable XMPP deployment over high latency links. This profile MUST only be used where its use has been pre-agreed and configured for both participating servers.
  70. </p>
  71. </section1>
  72. <section1 topic='Use Cases' anchor='usecases'>
  73. <p>
  74. An example scenario where this protocol is important is to support use of XMPP communication on an aircraft which only has slow high latency air ground communication, with round trips of several seconds (e.g., UHF or Satcom). Use of stanard XMPP protocols (server to server or client to server) leads to long setup times. This protocol can be deployed between an XMPP server on the aircraft and one on the ground. This will be operated over a closed private network, where security considerations can be addressed primarily at the network level.
  75. </p>
  76. </section1>
  77. <section1 topic='Business Rules' anchor='rules'>
  78. <section2 topic="General">
  79. <p>
  80. In simple terms, this can be considered as operation of RFC 6121 communication between a pair of XMPP servers without the preliminary negotiation done in RFC 6120. It might be considered that the start point is the
  81. DONE box in Figure 3 of RFC 6121. The TCP connection is opened and messages start to flow, as if the preceding RFC 6120 exchanges had taken place. All configuration informaition, including choice of port is handled by the a priori configuration.</p>
  82. <p>
  83. Note that stream open is not sent. The interaction takes place as if this had completed. All XML elements received over the stream are treated as if they were inside a normal S2S stream that has been opened with the following stream opening tag, defining the default namespace of jabber:server and the stream namespace of &lt;stream:stream xmlns:stream='...' xmlns='...'&gt;. When a stream is closed, a stream close SHOULD be exchanged.
  84. </p>
  85. </section2>
  86. <section2 topic="Identity Determination">
  87. <p>
  88. A connection between a pair of servers will be by TCP, with or without TLS. The pair of servers need to identify each other at the connection level. Three mechanisms are noted:
  89. </p>
  90. <ol start="1.">
  91. <li>Implicit. The responder assumes identity of sender because it knew where to connect to. This is NOT RECOMMENDED.</li>
  92. <li>Validation of source IP and port. </li>
  93. <li>Validation of digital signature using a certificate. This requires TLS to be used.</li>
  94. </ol>
  95. <p>The server will then associate one or more XMPP domains with this connection level identity.</p>
  96. </section2>
  97. <section2 topic="Connection Direction">
  98. <p>
  99. Connections may be opened by one server only or by either server. The choice is part of the a priori configured agreement. It is generally recommended to allow connections to be opened by either server. However policy or network constraints may require that the connection is initiated by one server only. When a server initiates a connection it will generally use this connection to send messages to the other server. The server opening a connection is responsible for closing it at the end of its use.
  100. </p>
  101. <p>
  102. Consider a scenario with two servers: server A and server B.
  103. When a connection is opened by server A to server B, the server B MAY use this connection to send messages to server A or MAY open a connection to server A. It is recommended that only a single connection is used in this scenario and so in many cases this protocol will proceed with a single bidirectional TCP connection and messages flowing in both directions. In the event of both servers opening connections at the same time, both TCP connections SHOULD be used unidirectional with messages sent on the connection opened by the message sender only.
  104. </p>
  105. </section2>
  106. <section2 topic="Multiple Domains">
  107. <p>Typically a pair of XMPP servers connecting using this protocl will communcicate with multiple domains (e.g., a base domain and a MUC domain). It is generally desirable to configure things so that all communications will share the same link, rather than establishing separate links for each domain, essentially piggy-backing multiple logical connections onto a single TCP connection. Two or more connections MAY be initiated from one server to the other but this is NOT RECOMMENDED. </p>
  108. </section2>
  109. <section2 topic="Message Validation">
  110. <p>
  111. An XMPP server receiving data over such a link should appropriately validate to and from elements of stream child elements. The rules for this SHOULD be controlled by an priori agreement. An inbound connection will generally be associated with several peer domains. A RECOMMENDED approach is to consider each of these peers in turn and validate in the manner of a peer XMPP server connected using RFC 6020 for that domain. In the event that an inbound message is not considered to be valid, it should be handled in a manner that this invalid message would be handled if it arrived over standard S2S.
  112. </p>
  113. </section2>
  114. <section2 topic="Use of TLS">
  115. <p>
  116. This protocol MAY be deployed directly over TCP. This will often be appropriate for environments where network security is handled at IP or lower layers or where the system is operated in closed network environment.
  117. </p>
  118. <p>
  119. This protocol may be deployed over TLS operating over TCP. If this is done, TLS client and or server X.509 based authentication may be used, with certificate validation achieved by PKI or simply pinning (configuring) a trusted certificate. This configuration and authentication is a part of the a priori configuration.
  120. </p>
  121. </section2>
  122. </section1>
  123. <section1 topic='Security Considerations' anchor='security'>
  124. <p>
  125. This protocol operates without the standard XMPP security negotiation. It is imperative that consideration is given to link security whenever this protocol is set up. The identity verification facilities of Server Dialback and SASL EXTERNAL are not available in this protocol so other mechanisms are needed. Use of TLS with mutual authentication is the approach that provides best security with this protocol.
  126. </p>
  127. <p>
  128. When TLS is not used, the only option available is for the responder to identify the initiator based on source IP address and port. This mechanism is prone to attacks, and so should be used with care.
  129. Where source IP address is checked, this may
  130. be done directly by match of IP address or by use of reverse DNS lookup to identify the connecting server. If reverse DNS Lookup is used, it is RECOMMENDED to use DNS SEC to mitigate against DNS attacks.
  131. </p>
  132. </section1>
  133. <section1 topic='IANA Considerations' anchor='iana'>
  134. <p>None.</p>
  135. </section1>
  136. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  137. <p>None.</p>
  138. </section1>
  139. <section1 topic="Acknowledgements">
  140. <p>
  141. Dave Cridland, Curtis King, Kevin Smith and Kurt Zeilenga worked out and validated the approach documented in this XEP.
  142. </p>
  143. <p>
  144. Kevin Smith and Kurt Zeilenga provided review and input to this document.
  145. </p>
  146. </section1>
  147. </xep>