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-0233.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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>XMPP Server Registration for use with Kerberos V5</title>
  10. <abstract>This specification defines the Kerberos principal name of an XMPP server. It also details a method by which a connecting client can determine this Kerberos principal name when authenticating using the "GSSAPI" SASL mechanism.</abstract>
  11. &LEGALNOTICE;
  12. <number>0233</number>
  13. <status>Draft</status>
  14. <lastcall>2017-03-01</lastcall>
  15. <lastcall>2017-02-22</lastcall>
  16. <type>Standards Track</type>
  17. <sig>Standards</sig>
  18. <approver>Council</approver>
  19. <dependencies>
  20. <spec>XMPP Core</spec>
  21. <spec>RFC 5178</spec>
  22. <spec>RFC 5179</spec>
  23. </dependencies>
  24. <supersedes/>
  25. <supersededby/>
  26. <shortname>kerberos5</shortname>
  27. &linuxwolf;
  28. &stpeter;
  29. &hildjj;
  30. <author>
  31. <firstname>Mili</firstname>
  32. <surname>Verma</surname>
  33. <email>mili.verma@isode.com</email>
  34. <jid>mili.verma@isode.com</jid>
  35. </author>
  36. <revision>
  37. <version>1.0.0</version>
  38. <date>2017-03-16</date>
  39. <initials>XEP Editor (ssw)</initials>
  40. <remark><p>Move to draft by order of the XMPP Council.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.5.1</version>
  44. <date>2017-03-03</date>
  45. <initials>mv</initials>
  46. <remark><p>Clarified regarding insecure DNS queries.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.5</version>
  50. <date>2015-10-20</date>
  51. <initials>mv</initials>
  52. <remark><p>Included support for Microsoft SSPI (Mili Verma).</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.4</version>
  56. <date>2011-08-26</date>
  57. <initials>psa</initials>
  58. <remark><p>Focused the document purely on the Kerberos use case, with the intent of handling the non-Kerberos use case in a separate specification; incremented the protocol version number to prevent confusion with deployed uses of the non-Kerberos functionality.</p></remark>
  59. </revision>
  60. <revision>
  61. <version>0.3</version>
  62. <date>2011-06-22</date>
  63. <initials>psa</initials>
  64. <remark><p>Tightened the conformance terminology in several places; updated references.</p></remark>
  65. </revision>
  66. <revision>
  67. <version>0.2</version>
  68. <date>2010-06-10</date>
  69. <initials>psa</initials>
  70. <remark><p>Expanded use beyond Kerberos; updated namespace; corrected schema; updated references.</p></remark>
  71. </revision>
  72. <revision>
  73. <version>0.1</version>
  74. <date>2008-01-30</date>
  75. <initials>psa</initials>
  76. <remark><p>Initial published version.</p></remark>
  77. </revision>
  78. <revision>
  79. <version>0.0.2</version>
  80. <date>2007-12-11</date>
  81. <initials>mm/psa</initials>
  82. <remark><p>Corrected syntax.</p></remark>
  83. </revision>
  84. <revision>
  85. <version>0.0.1</version>
  86. <date>2007-12-05</date>
  87. <initials>mm/psa</initials>
  88. <remark><p>First draft.</p></remark>
  89. </revision>
  90. </header>
  91. <section1 topic='Introduction' anchor='intro'>
  92. <p>The Kerberos Network Authentication Service (V5) is described in &rfc4120;. An application can call the Kerberos library through the Generic Security Services Application Programming Interface (GSS-API) described in &rfc4121; or the proprietary Microsoft Windows Security Service Provider Interface (SSPI).</p>
  93. <p>The Simple Authentication and Security Layer or SASL (&rfc4422;) is a framework for adding authentication support to connection-based protocols. The SASL mechanism used in environments that make use of Kerberos V5 is called "GSSAPI" and is described in &rfc4752;. Note that the <cite>RFC 4121</cite> API has a hyphen and the SASL mechanism does not.</p>
  94. <p>Before using the "GSSAPI" SASL mechanism to authenticate to an XMPP server (which is referred to as the "acceptor" in Kerberos terminology), a connecting client needs to obtain a Kerberos ticket from the Key Distribution Centre (KDC). For this the client needs to determine the Kerberos principal name of the XMPP server. This scenario was not addressed in &rfc3920; or &rfc6120;.</p>
  95. <p>This specification sets out the rules that must be followed when registering the Kerberos principal name of an XMPP server. It also details how a client can determine the hostname of the XMPP server which can then be used to construct the Kerberos principal name.</p>
  96. </section1>
  97. <section1 topic='Client Determination of Hostname' anchor='hostname'>
  98. <p>An XMPP client will initiate a connection to the XMPP server.</p>
  99. <p>The XMPP server will communicate its hostname in a child element of the &lt;mechanisms/&gt; element during SASL negotation, as allowed by <cite>RFC 6120</cite> (see Section 6.3.5 and the schema for the 'urn:ietf:params:xml:ns:xmpp-sasl' namespace in Appendix A.4).</p>
  100. <p>This child element is &lt;hostname/&gt; qualified by the 'urn:xmpp:domain-based-name:1' namespace. &NSNOTE;.</p>
  101. <p>The XML character data of the &lt;hostname/&gt; element specifies the fully-qualified name of the XMPP server. This should be used for constructing the Kerberos principal name and is independent of the usual rules that an XMPP client uses for establishing a network connection to the XMPP server which may use insecure DNS queries (also see &rfc4120;).</p>
  102. </section1>
  103. <section1 topic='Kerberos Principal Name in the GSS-API environment' anchor='principal'>
  104. <p>When the XMPP server is implemented using GSS-API, the domain-based service name (&rfc5178;, &rfc5179;) is used as the Kerberos principal name. Domain-based service names contain a domain name in addition to a hostname. This allows naming clustered servers after the domain which they service.</p>
  105. <p>The domain-based service name is mapped to the Kerberos principal name following the format specified in <cite>RFC 5179</cite> (i.e., "service/hostname/domain@REALM") and setting the values as follows:</p>
  106. <ul>
  107. <li>The <strong>service</strong> string MUST be "xmpp".</li>
  108. <li>The <strong>hostname</strong> string MUST be the hostname of the XMPP server, as provided by the server in the XML character data of the &lt;hostname/&gt; element during SASL negotiation.</li>
  109. <li>The <strong>domain</strong> string MUST be the canonical name of the service. This is typically communicated by the client in the 'to' address of the initial stream header.</li>
  110. <li>The <strong>REALM</strong> string SHOULD be determined according to the network policies in effect (usually the domain name, in an uppercase mapping).</li>
  111. </ul>
  112. </section1>
  113. <section1 topic='Kerberos Principal Name in the Microsoft SSPI environment' anchor='windows'>
  114. <p>Microsoft Windows provides the proprietary SSPI to support the "GSSAPI" SASL mechanism. This section describes the Windows equivalent of the domain-based service name for an XMPP server.</p>
  115. <p>In the Microsoft Windows environment, the concept of Service Principal Name (SPN) is used, which is specified in <link url='https://msdn.microsoft.com/en-us/library/ms677601%28v=vs.85%29.aspx'>https://msdn.microsoft.com/en-us/library/ms677601%28v=vs.85%29.aspx</link>. This format ("service class/host:port/service name") is similar to the one specified in <cite>RFC 5179</cite>. The SPN can be generated by setting the values as follows:</p>
  116. <ul>
  117. <li>The <strong>service class</strong> string MUST be "xmpp".</li>
  118. <li>The <strong>host</strong> string MUST be the hostname of the XMPP server, as provided by the server in the XML character data of the &lt;hostname/&gt; element during SASL negotiation.</li>
  119. <li>The <strong>port</strong> is optional. It can be used to differentiate between multiple XMPP servers on a single host computer and should be omitted if the XMPP server uses the default port of 5222 for accepting client connections.</li>
  120. <li>The <strong>service name</strong> string MUST be the canonical name of the service. This is typically communicated by the client in the 'to' address of the initial stream header.</li>
  121. </ul>
  122. </section1>
  123. <section1 topic='Interoperability between GSS-API and SSPI' anchor='interop'>
  124. <p>The goal of this section is to help developers of applications so that clients and servers implemented over SSPI can interoperate with servers and clients implemented over GSS-API.</p>
  125. <p>Interoperability is achieved by the GSS-API system joining the Windows Active Directory domain or by having a cross-realm trust between the KDCs of the GSS-API and SSPI systems.</p>
  126. <p>The SPN of the SSPI server does not specify a realm. A GSS-API client constucts the Kerberos principal name according to the rules in the GSS-API environment and adds a realm to the Kerberos principal name, but the Kerberos principal name is mapped to the correct XMPP server on SSPI.</p>
  127. <p>When the server uses GSS-API, the SPN for the server needs to be created in the SSPI environment. The SPN constructed by the SSPI client according to the rules in the SSPI environment is then mapped to the correct GSS-API XMPP server.</p>
  128. <p>The domain-based service name of GSS-API does not specify a port, so the port option of the SPN in SSPI should only be used in testing scenarios when both the XMPP client and the XMPP server are implemented using SSPI. The port SHOULD NOT be used in any other scenarios.</p>
  129. <p>So in effect, whether an endpoint uses SSPI or GSS-API does not affect interoperability as long as the port in SSPI is not used.</p>
  130. </section1>
  131. <section1 topic='Examples' anchor='examples'>
  132. <p>Consider the example of an XMPP service "example.com" offered by the XMPP server located on the host "auth42.us.example.com", using the default port of 5222 for accepting client connections. When a client connects to the XMPP server, the server communicates its hostname along with supported SASL mechanisms as follows:</p>
  133. <example caption="Communicating the hostname"><![CDATA[
  134. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  135. <mechanism>GSSAPI</mechanism>
  136. <mechanism>DIGEST-MD5</mechanism>
  137. <hostname xmlns='urn:xmpp:domain-based-name:1'>auth42.us.example.com</hostname>
  138. </mechanisms>
  139. ]]></example>
  140. <p>To use the "GSSAPI" SASL mechanism, the client needs to determine the Kerberos principal name of the XMPP server, which will be:</p>
  141. <ul>
  142. <li>the domain-based service name "xmpp/auth42.us.example.com/example.com@EXAMPLE.COM" if the client is using GSS-API.</li>
  143. <li>the SPN "xmpp/auth42.us.example.com/example.com" if the client is using SSPI.</li>
  144. </ul>
  145. </section1>
  146. <section1 topic='Security Considerations' anchor='security'>
  147. <p>The communication of the XMPP server's hostname during SASL negotiation is not known to introduce new security vulnerabilities, as long as it is done after the underlying channel has been secured using Transport Layer Security (TLS; &rfc5246;) as described for XMPP in <cite>RFC 6120</cite>. For additional security considerations, refer to <cite>RFC 5178</cite> and <cite>RFC 5179</cite>.</p>
  148. </section1>
  149. <section1 topic='IANA Considerations' anchor='iana'>
  150. <p>This document requires no interaction with &IANA;.</p>
  151. </section1>
  152. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  153. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  154. <p>This specification defines the following XML namespace:</p>
  155. <ul>
  156. <li>urn:xmpp:domain-based-name:1</li>
  157. </ul>
  158. <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>
  159. </section2>
  160. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  161. &NSVER;
  162. </section2>
  163. </section1>
  164. <section1 topic='XML Schema' anchor='schema'>
  165. <code><![CDATA[
  166. <?xml version='1.0' encoding='UTF-8'?>
  167. <xs:schema
  168. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  169. targetNamespace='urn:xmpp:domain-based-name:1'
  170. xmlns='urn:xmpp:domain-based-name:1'
  171. elementFormDefault='qualified'>
  172. <xs:annotation>
  173. <xs:documentation>
  174. The protocol documented by this schema is defined in
  175. XEP-0233: http://www.xmpp.org/extensions/xep-0233.html
  176. </xs:documentation>
  177. </xs:annotation>
  178. <xs:element name='hostname' type='xs:string'/>
  179. </xs:schema>
  180. ]]></code>
  181. </section1>
  182. <section1 topic='Acknowledgements' anchor='ack'>
  183. <p>Thanks to Owen Friel, Shane Hannon, Seamus Kerrigan, Eliot Lear, Alexey Melnikov, Klaas Wierenga, and Dave Cridland for their comments.</p>
  184. </section1>
  185. </xep>