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-0175.xml 10KB

  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>Best Practices for Use of SASL ANONYMOUS</title>
  10. <abstract>This document specifies best practices for use of the SASL ANONYMOUS mechanism in the context of client authentication with an XMPP server.</abstract>
  12. <number>0175</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>N/A</shortname>
  23. &stpeter;
  24. <revision>
  25. <version>1.2</version>
  26. <date>2009-09-30</date>
  27. <initials>psa</initials>
  28. <remark><p>Provided more detailed recommendations regarding usage restrictions for anonymous users, including the concept of different deployment types; added note about the account/anonymous service discovery identity.</p></remark>
  29. </revision>
  30. <revision>
  31. <version>1.1</version>
  32. <date>2007-11-07</date>
  33. <initials>psa</initials>
  34. <remark><p>Recommended that node identifier be a UUID; recommended that trace data not be included.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>1.0</version>
  38. <date>2006-09-20</date>
  39. <initials>psa</initials>
  40. <remark><p>Per a vote of the Jabber Council, advanced status to Active.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.1</version>
  44. <date>2006-02-09</date>
  45. <initials>psa</initials>
  46. <remark><p>Initial version; modified flow to remove unecessary challenge.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.0.1</version>
  50. <date>2006-01-24</date>
  51. <initials>psa</initials>
  52. <remark><p>First draft.</p></remark>
  53. </revision>
  54. </header>
  55. <section1 topic='Introduction' anchor='intro'>
  56. <p>&xmppcore; allows XMPP server implementations to support any SASL mechanism (see &rfc4422;) when authenticating clients. This document provides recommendations regarding use of the SASL ANONYMOUS mechanism (see &rfc4505;) in XMPP systems.</p>
  57. </section1>
  58. <section1 topic='Deployment Types' anchor='deployments'>
  59. <p>XMPP server implementations can be deployed in a variety of settings. Although it is difficult to provide recommendations for every kind of XMPP deployment, this document attempts to strike a balance between more and less controlled settings by defining three different deployment types:</p>
  60. <ul>
  61. <li>Public deployments, such as well-known instant messaging (IM) services on the open Internet.</li>
  62. <li>Private deployments, such as enterprise IM services, technical support departments, and helplines.</li>
  63. <li>Specialized deployments that typically will be accessed in a controlled fashion, such as gaming services, members-only websites, and applications that are not used directly by human users.</li>
  64. </ul>
  65. </section1>
  66. <section1 topic='Recommendations' anchor='recommendations'>
  67. <p>An XMPP server implementation SHOULD NOT enable the SASL ANONYMOUS mechanism by default, but instead SHOULD force the administrator of a given service to explicitly enable support in the context of that deployment.</p>
  68. <p>When a client authenticates using SASL ANONYMOUS, an XMPP server SHOULD assign a temporary, unique bare JID &LOCALBARE; to the client. Although the method for ensuring the uniqueness of the localpart is a matter of implementation, it is RECOMMENDED for the localpart to be a UUID as specified in &rfc4122;.</p>
  69. <p>Although <cite>RFC 4505</cite> allows the client to provide so-called "trace data" when authenticating via SASL ANONYMOUS, it is NOT RECOMMENDED for the client to include trace data as the XML character data of the &lt;auth/&gt; element (instead, the &lt;auth/&gt; element SHOULD be empty). However, if trace data is included, the server MUST NOT use it for any purpose other than tracing (e.g., not use it as the resource identifier of the anonymous user's full JID).</p>
  70. <p>Because an anonymous user is unknown to the server, the server SHOULD appropriately restrict the user's access in order to limit the possibility of malicious behavior (such as denial of service attacks as described in &xep0205;), especially on public deployments. The following restrictions are encouraged on public deployments. Administrators of private deployments and specialized deployments are advised to take these restrictions into account when configuring their services, but can reasonably relax these restrictions if they have appropriate access controls in place or their deployment requirements cannot be met using the more restrictive profile applied in public deployments.</p>
  71. <ol start='1'>
  72. <li><p>During resource binding, the server MAY ignore the resource identifier provided by the client (if any) and instead assign a resource identifier that it generates on behalf of the client.</p></li>
  73. <li><p>The server SHOULD NOT allow the client to initiate communication with entities hosted at remote servers.</p></li>
  74. <li><p>The server MAY allow the client to establish relationships with local services and users; such relationships might include presence subscriptions and roster additions (see &xmppim;), &xep0045; registrations, and &xep0060; subscriptions. (Note that allowing presence subscriptions and roster additions can create a sub-optimal user experience for the added contacts.) However, if the server permits such relationships, it MUST cancel them when the client's session ends.</p></li>
  75. <li><p>The server MAY allow the client to store information on the server for the purpsoe of providing an optimal user experience (e.g., storage of client preferences using &xep0049;). However, if the server allows this, it SHOULD remove such information when the client's session ends.</p></li>
  76. <li><p>The server SHOULD NOT allow the client to send large numbers of XMPP stanzas or otherwise use large amounts of system resources (e.g., by binding multiple resource identifiers or creating multiple &xep0065; sessions).</p></li>
  77. </ol>
  78. </section1>
  79. <section1 topic='Protocol Flow' anchor='flow'>
  80. <p>The RECOMMENDED protocol flow following TLS negotiation (refer to <cite>RFC 3920</cite>) is as follows:</p>
  81. <ol>
  82. <li>
  83. <p>Client initiates stream to server.</p>
  84. <example caption="Stream initiation"><![CDATA[
  85. <stream:stream
  86. xmlns:stream=''
  87. xmlns='jabber:client'
  88. to=''
  89. version='1.0'>
  90. ]]></example>
  91. </li>
  92. <li>
  93. <p>Server replies with stream header.</p>
  94. <example caption="Stream header reply"><![CDATA[
  95. <stream:stream
  96. xmlns:stream=''
  97. xmlns='jabber:client'
  98. id='c2s_234'
  99. from=''
  100. version='1.0'>
  101. ]]></example>
  102. </li>
  103. <li>
  104. <p>Server advertises stream features.</p>
  105. <example caption="Stream features advertisement"><![CDATA[
  106. <stream:features>
  107. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  108. <mechanism>DIGEST-MD5</mechanism>
  109. <mechanism>ANONYMOUS</mechanism>
  110. </mechanisms>
  111. </stream:features>
  112. ]]></example>
  113. </li>
  114. <li>
  115. <p>Client requests SASL ANONYMOUS mechanism.</p>
  116. <example caption="Requesting SASL ANONYMOUS"><![CDATA[
  117. <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>
  118. ]]></example>
  119. </li>
  120. <li>
  121. <p>Server sends &lt;success/&gt;.</p>
  122. <example caption="Sending success"><![CDATA[
  123. <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
  124. ]]></example>
  125. </li>
  126. <li>
  127. <p>Client opens new stream.</p>
  128. <example caption="Initiating a new stream"><![CDATA[
  129. <stream:stream
  130. xmlns:stream=''
  131. xmlns='jabber:client'
  132. to=''
  133. version='1.0'>
  134. ]]></example>
  135. </li>
  136. <li>
  137. <p>Server tells client that resource binding is required.</p>
  138. <example caption="Stream header reply with features"><![CDATA[
  139. <stream:stream
  140. xmlns:stream=''
  141. xmlns='jabber:client'
  142. id='c2s_345'
  143. from=''
  144. version='1.0'>
  145. <stream:features>
  146. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
  147. </stream:features>
  148. ]]></example>
  149. </li>
  150. <li>
  151. <p>Client requests that server create a resource for it.</p>
  152. <example caption="Requesting resource creation"><![CDATA[
  153. <iq type='set' id='bind_1'>
  154. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
  155. </iq>
  156. ]]></example>
  157. </li>
  158. <li>
  159. <p>Server replies with full JID.</p>
  160. <example caption="Server informs client of full JID"><![CDATA[
  161. <iq type='result' id='bind_1'>
  162. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  163. <jid></jid>
  164. </bind>
  165. </iq>
  166. ]]></example>
  167. </li>
  168. </ol>
  169. </section1>
  170. <section1 topic='Service Discovery' anchor='disco'>
  171. <p>A server MUST reply to a &xep0030; information ("disco#info") request sent to the bare JID &LOCALBARE; of the user with an identity of "account/anonymous", as shown in the following example.</p>
  172. <example caption="Server informs client of full JID"><![CDATA[
  173. <iq from=''
  174. id='kj37vd95'
  175. to=''
  176. type='result'>
  177. <query xmlns=''>
  178. <identity category='account' type='anonymous'/>
  179. <feature var=''/>
  180. <feature var=''/>
  181. </query>
  182. </iq>
  183. ]]></example>
  184. </section1>
  185. <section1 topic='Security Considerations' anchor='security'>
  186. <p>The security considerations discussed in <cite>RFC 3920</cite> and <cite>RFC 4505</cite> apply to the use of SASL ANONYMOUS in XMPP; specific suggestions regarding usage restrictions for anonymous users are provided under the <link url='#rec'>Recommendations</link> section of this document.</p>
  187. </section1>
  188. <section1 topic='IANA Considerations' anchor='iana'>
  189. <p>This document requires no interaction with &IANA;.</p>
  190. </section1>
  191. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  192. <p>This document requires no interaction with the &REGISTRAR;.</p>
  193. </section1>
  194. <section1 topic='Acknowledgements' anchor='ack'>
  195. <p>Thanks to Dave Cridland, Tuomas Koski, Jack Moffitt, Andy Skelton, and Kurt Zeilenga for their feedback.</p>
  196. </section1>
  197. </xep>