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-0246.xml 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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>End-to-End XML Streams</title>
  10. <abstract>This specification defines methods for communicating via end-to-end XML streams over a logical or physical connection that provides a reliable transport between two endpoints.</abstract>
  11. &LEGALNOTICE;
  12. <number>0246</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>NOT_YET_ASSIGNED</shortname>
  23. &stpeter;
  24. <revision>
  25. <version>0.1.1</version>
  26. <date>2016-01-20</date>
  27. <initials>XEP Editor (mam)</initials>
  28. <remark><p>Updated missing 'ice-tcp' reference to RFC 6544.</p></remark>
  29. </revision>
  30. <revision>
  31. <version>0.1</version>
  32. <date>2008-06-18</date>
  33. <initials>psa</initials>
  34. <remark><p>Initial published version.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>0.0.1</version>
  38. <date>2008-06-13</date>
  39. <initials>psa</initials>
  40. <remark><p>First draft, split off from XEP-0174.</p></remark>
  41. </revision>
  42. </header>
  43. <section1 topic='Introduction' anchor='intro'>
  44. <p>XMPP as defined in &xmppcore; does not support direct interaction between endpoints, since it requires a client to authenticate an XML stream with a "home" server and send of all of its outbound XML stanzas through that server (which potentially can route those stanzas through a peer server for delivery to the intended recipient). However, in some scenarios it is desirable to establish end-to-end XML streams between two endpoints instead of relying on the standard client-server architecture. These scenarios include:</p>
  45. <ul>
  46. <li>Two endpoints cannot access an XMPP server</li>
  47. <li>Two endpoints want to enforce end-to-end encryption</li>
  48. <li>Two endpoints want to send a high volume of XMPP traffic but the intermediate servers enforce rate limits</li>
  49. </ul>
  50. <p>The first scenario is addressed by &xep0174;. The second and third scenarios are addressed by &xep0247;. Both of those technologies result in the establishment of a direct or mediated connection between two endpoints, such as a direct TCP connection, a bytestream through SOCKS5 (&xep0065;) or XMPP itself (&xep0047;), or other future transport methods such as &rfc6544;.</p>
  51. <p>Once two endpoints have opened a direct or mediated connection, they can establish an XML stream over that connection for end-to-end "("e2e") communication. We call this an "e2e stream".</p>
  52. </section1>
  53. <section1 topic='Initiating an e2e Stream' anchor='initiate'>
  54. <p>The initiator and recipient essentially follow the process defined in <cite>RFC 6120</cite> to establish XML streams between themselves.</p>
  55. <p>First, the initiator opens an XML stream to the recipient over the negotiated transport.</p>
  56. <example caption="Opening a Stream"><![CDATA[
  57. <stream:stream
  58. xmlns='jabber:client'
  59. xmlns:stream='http://etherx.jabber.org/streams'
  60. from='romeo@forza'
  61. to='juliet@pronto'
  62. version='1.0'>
  63. ]]></example>
  64. <p>In accordance with <cite>RFC 6120</cite>, the initial stream header SHOULD include the 'to' and 'from' attributes. In the case of <cite>XEP-0174</cite>, these SHOULD be the username@machine-name advertised in the PTR record. In the case of <cite>Jingle XML Streams</cite>, these SHOULD be the bare JIDs &BAREJID; of the entities as communicated via XMPP.</p>
  65. <p>If the initiator supports stream features and the other stream-related aspects of XMPP 1.0 as specified in <cite>RFC 6120</cite>, then it SHOULD include the version='1.0' flag as shown in the previous example.</p>
  66. <p>The recipient then responds with a stream header as well:</p>
  67. <example caption="Stream Header Response"><![CDATA[
  68. <stream:stream
  69. xmlns='jabber:client'
  70. xmlns:stream='http://etherx.jabber.org/streams'
  71. from='juliet@pronto'
  72. to='romeo@forza'
  73. version='1.0'>
  74. ]]></example>
  75. <p>If both the initiator and recipient included the version='1.0' flag, the recipient SHOULD also send stream features as specified in <cite>RFC 6120</cite>:</p>
  76. <example caption="Recipient Sends Stream Features"><![CDATA[
  77. <stream:features>
  78. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  79. </stream:features>
  80. ]]></example>
  81. </section1>
  82. <section1 topic='Stream Encryption' anchor='encryption'>
  83. <p>The mere exchange of stream headers results in an unencrypted and unauthenticated channel between the two entities. The entities SHOULD upgrade the channel to an encrypted stream using the XMPP STARTTLS command defined in &xmppcore; using &rfc5246;, optionally followed by SASL negotiation for mutual authentication (see &rfc4422;).</p>
  84. <p>End-to-end XML streams can be negotiated between two XMPP clients, between an XMPP client and a remote XMPP service (i.e., a service with which a client does not have a direct XML stream, such as a remote &xep0045; room), or between two remote XMPP services. Therefore, if standard X.509 certificates are used then a party to an e2e XML stream will present either a client certificate or a server certificate as appropriate. If X.509 certificates are used, they MUST at a minimum be generated and validated in accordance with the certificate guidelines guidelines provided in &rfc6120;; however, applications of end-to-end XML streams MAY define supplemental guidelines for certificate validation in the context of particular architectures, such as <cite>XEP-0174</cite> for link-local streams and <cite>XEP-0247</cite> for direct or mediated streams negotiated through XMPP servers.</p>
  85. <p>To ease the transition from the PGP-based object encryption method specified in &xep0027;, clients using TLS for e2e streams MAY use the OpenPGP TLS extension defined in &rfc5081; (if available).</p>
  86. <p>Use of other TLS extensions MAY be appropriate as well, including those defined in &rfc5246; and &rfc5054;.</p>
  87. </section1>
  88. <section1 topic='Exchanging Stanzas' anchor='exchange'>
  89. <p>Once the streams are established, either entity then can send XMPP message, presence, and IQ stanzas, with or without 'to' and 'from' addresses.</p>
  90. <example caption="Sending a Message"><![CDATA[
  91. <message from='romeo@forza' to='juliet@pronto'>
  92. <body>M'lady, I would be pleased to make your acquaintance.</body>
  93. </message>
  94. ]]></example>
  95. <example caption="A Reply"><![CDATA[
  96. <message from='juliet@pronto' to='romeo@forza'>
  97. <body>Art thou not Romeo, and a Montague?</body>
  98. </message>
  99. ]]></example>
  100. </section1>
  101. <section1 topic='Ending an e2e Stream' anchor='end'>
  102. <p>To end the stream, either party closes the XML stream:</p>
  103. <example caption="Closing the Stream"><![CDATA[
  104. </stream:stream>
  105. ]]></example>
  106. <p>The other party then closes the stream in the other direction as well:</p>
  107. <example caption="Closing the Stream"><![CDATA[
  108. </stream:stream>
  109. ]]></example>
  110. <p>Both parties then SHOULD close the logical or physical connection between them.</p>
  111. </section1>
  112. <section1 topic='Security Considerations' anchor='security'>
  113. <p>End-to-end streams SHOULD be encrypted; see the <link url='#encrytion'>Stream Encryption</link> section of this document.</p>
  114. </section1>
  115. <section1 topic='IANA Considerations' anchor='iana'>
  116. <p>This document requires no interaction with &IANA;.</p>
  117. </section1>
  118. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  119. <p>This document requires no interaction with the &REGISTRAR;.</p>
  120. </section1>
  121. </xep>