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

  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>SSL/TLS Integration</title>
  10. <abstract>NOTE WELL: this specification was retracted on 2003-11-05 since the topic is addressed definitively in XMPP Core. Please refer to XMPP Core for further information.</abstract>
  12. <number>0035</number>
  13. <status>Retracted</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies/>
  17. <supersedes/>
  18. <supersededby><spec>XMPP Core</spec></supersededby>
  19. <shortname>N/A</shortname>
  20. <author>
  21. <firstname>Robert</firstname>
  22. <surname>Norris</surname>
  23. <email></email>
  24. <jid></jid>
  25. </author>
  26. <revision>
  27. <version>0.2</version>
  28. <date>2003-11-05</date>
  29. <initials>psa</initials>
  30. <remark>The status of this specification has been changed to Retracted since it has been superseded by XMPP Core.</remark>
  31. </revision>
  32. <revision>
  33. <version>0.1</version>
  34. <date>2002-06-14</date>
  35. <initials>rn</initials>
  36. <remark>Initial version.</remark>
  37. </revision>
  38. </header>
  39. <section1 topic='Introduction'>
  40. <p>The TLS protocol <note><link url="">RFC 2246</link></note> (formerly known as SSL) provides a way to secure an application protocol from tampering and eavesdropping. The option of using such security is desirable for Jabber due to common connection eavesdropping and hijacking attacks. <note>See <link url="">RFC 1704</link>, "On Internet Authentication."</note><note>This paragraph adapted from <link url="">RFC 2595</link>, section 1.</note></p>
  41. <p>Traditionally, Jabber servers has supported TLS by utilising a "wrapper" around the standard protocol stream. This wrapper usually listens on a port other than those listed in the IANA registry <note>The Internet Assigned Numbers Authority defines jabber-client (port 5222) and jabber-server (port 5269) as the standard Jabber ports; see <link url=''></link>.</note> (commonly 5223 for client-to-server communications and 5270 for server-to-server communications). In the case of client-to-server communications, clients must initiate a TLS session immediately after connecting, before beginning the normal XML stream. This method of utilising TLS is typical of many servers that implement stream-based protocols, but has a number of flaws, which are outlined in section 7 of <link url="">RFC 2595</link>. Accordingly, the use of port 5223 and port 5270 for secure sessions is deprecated.</p>
  42. <p>This document describes an extension to the Jabber XML stream that provides a "STARTTLS" command which clients may invoke on an insecure stream to secure it. This extension is modelled on <link url="">RFC 2595</link>, which describes the STARTTLS extension for the IMAP <note><link url="">RFC 2060</link></note>, POP3 <note><link url="">RFC 1939</link></note> and ACAP <note><link url="">RFC 2244</link></note> protocols. A future document (or an addition to this document) will define TLS support within server-to-server streams.</p>
  43. </section1>
  44. <section1 topic='Protocol'>
  45. <section2 topic="Overview">
  46. <p>This protocol operates over the standard Jabber client connection on port 5222.</p>
  47. <p>The namespace identifier for this protocol is</p>
  48. <p>The following examples show the dialogue between a client [C] and a server [S].</p>
  49. <p>
  50. </p>
  51. </section2>
  52. <section2 topic="Stream initialization">
  53. <p>The client begins by requesting the use of STARTTLS as part of the normal Jabber stream negotiation. The server responds by informing the client whether or not it supports STARTTLS. It does this in the normal stream negotiation response:</p>
  54. <example caption="Stream initialization">
  55. C: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  56. xmlns:stream=&apos;;
  57. xmlns:tls=&apos;;
  58. to=&apos;;&gt;
  59. S: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  60. xmlns:stream=&apos;;
  61. xmlns:tls=&apos;;
  62. id=&apos;12345678&apos;&gt;
  63. </example>
  64. <p>In the event that a server does not support the STARTTLS extension, it will respond with the normal stream negotiation response:</p>
  65. <example caption="Stream initialization; server not supporting STARTTLS">
  66. C: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  67. xmlns:stream=&apos;;
  68. xmlns:tls=&apos;;
  69. to=&apos;;&gt;
  70. S: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  71. xmlns:stream=&apos;;
  72. id=&apos;12345678&apos;&gt;
  73. </example>
  74. </section2>
  75. <section2 topic="TLS negotiation">
  76. <p>To begin the TLS negotiation, the client issues the STARTTLS command:</p>
  77. <example caption="STARTTLS request">
  78. C: &lt;tls:starttls/&gt;
  79. </example>
  80. <p>When the server is ready to begin the TLS negotiation, it will close the XML stream, but will keep the underlying connection to the client open:</p>
  81. <example caption="STARTTLS response">
  82. S: &lt;/stream:stream&gt;
  83. </example>
  84. <p>The client now begins a normal TLS negotiation by sending the TLS ClientHello command. Upon completion of the TLS negotiation, the client reissues the XML stream initialization:</p>
  85. <example caption="Stream initialization">
  86. C: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  87. xmlns:stream=&apos;;
  88. to=&apos;;&gt;
  89. S: &lt;stream:stream xmlns=&apos;jabber:client&apos;
  90. xmlns:stream=&apos;;
  91. id=&apos;12345678&apos;&gt;
  92. </example>
  93. <p>This is necessary, since any information about the stream presented by the server or the client may have been modified by an attacker.</p>
  94. <p>Note that once the secure channel has been established, the server must not advertise or allow the use of the STARTTLS command.</p>
  95. </section2>
  96. </section1>
  97. <section1 topic="Certificate-based authentication">
  98. <p>TLS allows clients to be authenticated by verifying the certificate that they present during the TLS negotiation. This can be done in conjunction with the Jabber SASL profile (see &xep0034;) and the EXTERNAL mechanism.</p>
  99. <p>If a client authenticates with a certificate using the TLS authentication, and the client requests the use of SASL in the second XML stream negotiation (over the secure channel), servers supporting certificate-based authentication should add the EXTERNAL mechanism to the list of supported authentication mechanisms. If the client then requests this mechanism, the server should automatically inform the user that authentication was successful. See &rfc2222; and <cite>XEP-0034</cite> for more information.</p>
  100. <p>Servers implementing STARTTLS functionality are not required to implement certificate-based authentication.</p>
  101. </section1>
  102. </xep>