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-0388.xml 25KB

  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>Extensible SASL Profile</title>
  10. <abstract>This document describes a replacement for the SASL profile documented in RFC 6120 which allows for greater extensibility.</abstract>
  12. <number>0388</number>
  13. <status>Experimental</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. </dependencies>
  19. <supersedes/>
  20. <supersededby/>
  21. <shortname>sasl2</shortname>
  22. &dcridland;
  23. <revision>
  24. <version>0.2.1</version>
  25. <date>2017-08-24</date>
  26. <initials>dwd</initials>
  27. <remark>
  28. <ul>
  29. <li>That's a lot of XML errors. Sorry.</li>
  30. <li>Clarified whose additional-data this is.</li>
  31. <li>&lt;next> uses &lt;initial-response>.</li>
  32. <li>Added a bunch of example flows.</li>
  33. </ul>
  34. </remark>
  35. </revision>
  36. <revision>
  37. <version>0.2.0</version>
  38. <date>2017-08-14</date>
  39. <initials>dwd</initials>
  40. <remark>
  41. <p>Updated according to implementation experience:</p>
  42. <ul>
  43. <li>Updated namespace</li>
  44. <li>Continue "mechanisms" are not; changed these to "tasks".</li>
  45. <li>Added stream features after Success.</li>
  46. <li>Don't need complexity of "=" encoding; removed.</li>
  47. <li>Fixed internal links.</li>
  48. <li>Updated examples.</li>
  49. </ul>
  50. </remark>
  51. </revision>
  52. <revision>
  53. <version>0.1.0</version>
  54. <date>2017-03-16</date>
  55. <initials>XEP Editor (ssw)</initials>
  56. <remark>
  57. <ul>
  58. <li>Move to experimental.</li>
  59. </ul>
  60. </remark>
  61. </revision>
  62. <revision>
  63. <version>0.0.1</version>
  64. <date>2017-02-07</date>
  65. <initials>dwd</initials>
  66. <remark>
  67. <ul>
  68. <li>Initial Revision</li>
  69. </ul>
  70. </remark>
  71. </revision>
  72. </header>
  73. <section1 topic='Introduction' anchor='intro'>
  74. <p>While SASL provides an excellent framework that has served us well over the past 18 years, a number of shortcomings in the profile - the syntax binding to XMPP - that is in use.</p>
  75. <p>This specification addresses a number of shortfalls:</p>
  76. <ul>
  77. <li>Number of round trips</li>
  78. <li>Extensibility</li>
  79. <li>Support for second factor</li>
  80. <li>Support for mandatory password changes</li>
  81. </ul>
  82. <p>The new SASL profile documented herein is primarily a syntactic change to allow extensibility, combined with removal of the (largely) redundant stream restart, and additional results beyond total success or abject failure.</p>
  83. <section2 topic="Terminology">
  84. <p>Although initiating entities, in general, use SASL, and receiving entities offer it, the SASL specification and common parlance both use "Client " and "Server"; this specification uses Client and Server and assumes C2S links. This is not intended to preclude use of this SASL profile on S2S links. The term "SASL2" is used to mean the new SASL profile specified in this document; however the same RFC 4422 definition of SASL (and SASL profiles) applies.</p>
  85. <p>Examples often use hypothetical SASL mechanisms and sub-extensions; this specification does not intend to make a position on any particular SASL mechanism, and the Mandatory To Implement mechanisms are unaffected.</p>
  86. </section2>
  87. </section1>
  88. <section1 topic='Overview' anchor="overview">
  89. <section2 topic="Discovering Support" anchor="feature">
  90. <p>Servers capable of SASL2 offer a stream feature of &lt;mechanisms/>, qualified by the "urn:xmpp:sasl:1" namespace. This in turn contains one or more &lt;mechanism/> elements in the same namespace, and potentially other elements (for example, the &lt;hostname/> element defined within XEP-0233).</p>
  91. <p>Note that SASL2 is impossible for clients to initiate without at least one mechanism being available, and therefore MUST NOT be offered.</p>
  92. <p>The feature so advertised, and its child content, SHOULD be stable for the given stream to and from attributes and encryption state, and therefore MAY be cached by clients for later connections.</p>
  93. <p>The Service Name used by XMPP is unchanged from RFC 6120.</p>
  94. </section2>
  95. <section2 topic="SASL Data Encoding">
  96. <p>In all cases, both Clients and Servers encode SASL exchanges using Base 64 encoding. This SHOULD NOT include any line wrapping or other whitespace. As the form &lt;element/> is equivalent to &lt;element>&lt;/element>, these both indicate an empty string. Challenges and responses with no data do not occur in SASL, and so require no special handling. To indicate the absence of an initial response, or the absence of success data, the element is simply not included.</p>
  97. </section2>
  98. <section2 topic="Initiation">
  99. <p>Clients, upon observing this stream feature, initiate the authentication by the use of the &lt;authenticate/> top-level element, within the same namespace. The nature of this element is to inform the server about properties of the final stream state, as well as initiate authentication itself. To achieve the latter, it has a single mandatory attribute of "mechanism", with a string value of a mechanism name offered by the Server in the stream feature, and an optional child element of &lt;initial-response/>, containing a base64-encoded SASL Initial Response.</p>
  100. <p>On subsequent connections, if a Client has previously cache the stream feature, the Client MAY choose to send it before seeing the stream features - sending it "pipelined" with the Stream Open tag for example.</p>
  101. <example caption="An authentication request"><![CDATA[
  102. <authenticate xmlns='urn:xmpp:sasl:1' mechanism="BLURDLYBLOOP">
  103. <initial-response>Tm9ib2R5IGV2ZXIgZGVjb2RlcyB0aGUgZXhhbXBsZXMu</initial-response>
  104. </authenticate>
  105. ]]></example>
  106. <p>In order to provide support for other desired stream states beyond authentication, additional child elements are used. For example, a hypothetical XEP-0198 session resumption element might be included, and/or Resource Binding requests.</p>
  107. <example caption="An authentication request with a (hypothetical) bind request"><![CDATA[
  108. <authenticate xmlns='urn:xmpp:sasl:1' mechanism='BLURDYBLOOP'>
  109. <initial-response>
  110. SSBzaG91bGQgbWFrZSB0aGlzIGEgY29tcGV0aXRpb24=
  111. </initial-response>
  112. <bind xmlns='urn:xmpp:bind:example'/>
  113. </authenticate>
  114. ]]></example>
  115. </section2>
  116. <section2 topic="Challenges and Responses" anchor="challenge">
  117. <p>Server Challenges MAY then be sent. Each Challenge MUST be responded to by a Client in a Client Response. These are not extensible, and contain the corresponding base64 encoded SASL data:</p>
  118. <example caption="A challenge and response exchange"><![CDATA[
  119. <!-- A server might send: -->
  120. <challenge xmlns='urn:xmpp:sasl:1'>
  121. U28sIG5leHQgRk9TREVNIC0gMjAxOCwgdGhhdCBpcy4uLg==
  122. </challenge>
  123. <!-- A client might respond: -->
  124. <response xmlns='urn:xmpp:sasl:1'>
  125. Li4uSSdsbCBidXkgYSBiZWVyIGZvciB0aGUgZmlyc3QgcGVyc29uIHdoby4uLg==
  126. </response>
  127. ]]></example>
  128. </section2>
  129. <section2 topic="During Authentication">
  130. <p>At any time while authentication is in progress, neither Client nor Server sends any element (including stanzas) or other data except the top-level elements defined herein. Clients MUST NOT send whitespace, and MUST send only &lt;response/> elements as appropriate or an &lt;abort/> element to immediately cause an error. Servers MUST disconnect Clients immediately if any other traffic is received. Servers are similarly REQUIRED to send no whitespace, and only the &lt;response/> and completion elements from the section below.</p>
  131. </section2>
  132. <section2 topic="Completing Authentication">
  133. <p>Authentication may complete in one of three ways. It may complete successfully, in which case the client is authenticated. It may also fail, in which case the client is not authenticated and the stream and session state remain entirely unchanged.</p>
  134. <p>Finally, it may have completed successfully, but further interaction is required - for example, a password change or second-factor authentication.</p>
  135. <section3 topic="Success">
  136. <p>If the Client is now authenticated, the Server sends a &lt;success/> element, which contains contains an &lt;authorization-identity/> element containing the negotiated identity - this is a bare JID, unless resource binding has occurred, in which case it is a full JID.</p>
  137. <p>It MAY contain an &lt;additional-data> element, containing additional data from the exchange (task or SASL mechanism) that has just completed.</p>
  138. <example caption="Successful authentication"><![CDATA[
  139. <success xmlns='urn:xmpp:sasl:1'>
  140. <additional-data>
  141. ip/AeIOfZXKBV+fW2smE0GUB3I//nnrrLCYkt0Vj
  142. </additional-data>
  143. <authorization-identifier>juliet@montague.example/Balcony/a987dsh9a87sdh</authorization-identifier>
  144. </success>
  145. ]]></example>
  146. <p>Other extension elements MAY also be contained by the &lt;success/> element.</p>
  147. <example caption="Successful re-authentication and resumption"><![CDATA[
  148. <success xmlns='urn:xmpp:sasl:1'>
  149. <additional-data>
  150. SGFkIHlvdSBnb2luZywgdGhlcmUsIGRpZG4ndCBJPw==
  151. </additional-data>
  152. <authorization-identifier>juliet@montague.example/Balcony/a987dsh9a87sdh</authorization-identifier>
  153. <sm:resumed xmlns='urn:xmpp:sm:3:example' h='345' previd='124'/>
  154. </success>
  155. ]]></example>
  156. <p>Any security layer negotiated SHALL take effect after the ">" octet of the closing tag (ie, immediately after "&lt;/success>"), if it has not already taken effect at a &lt;continue> - see <link url='#continue'>Continue</link> below.</p>
  157. <p>The &lt;success> element is immediately followed by a &lt;features> element containing the applicable stream features of the newly authenticated stream. Note that no stream restart occurs.</p>
  158. </section3>
  159. <section3 topic="Failure">
  160. <p>A &lt;failure/> element is used by the server to terminate the authentication attempt. It MAY contain application-specific error codes, and MAY contain a textual error. It MUST contain one of the SASL error codes from RFC 6120 Section 6.5.</p>
  161. <example caption="Failure"><![CDATA[
  162. <failure xmlns='urn:xmpp:sasl:1'>
  163. <aborted xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
  164. <optional-application-specific xmlns='urn:something:else'/>
  165. <text>This is a terrible example.</text>
  166. </failure>
  167. ]]></example>
  168. </section3>
  169. <section3 topic="Continue" anchor="continue">
  170. <p>A &lt;continue/> element is used to indicate that while the SASL exchange was successful, it is insufficient to allow authentication at this time.</p>
  171. <p>This can be used to indicate that the Client needs to perform a Second Factor Authentication ("2FA"), or is required to change password.</p>
  172. <p>Such tasks are presented within a &lt;tasks> element, which contains a sequence of &lt;task> elements, each containing a name. These tasks are analogous to a SASL mechanism, but have a number of differences - they may never attempt to negotiate a new authorization identifier, nor a new security layer.</p>
  173. <p>A client MAY choose any one of the offered tasks; if multiple are required a sequence of &lt;continue> exchanges will occur until all mandatory tasks are complete.</p>
  174. <p>The &lt;continue element therefore always contains a &lt;tasks/> element, as defined above. It MAY contain an &lt;additional-data/> element, as the &lt;success/> element does.</p>
  175. <p>Finally, it MAY contain a &lt;text/> element, which can contain human-readable data explaining the nature of the step required.</p>
  176. <example caption="Continue Required"><![CDATA[
  177. <continue xmlns='urn:xmpp:sasl:1'>
  178. <additional-data>
  179. SSdtIGJvcmVkIG5vdy4=
  180. </additional-data>
  181. <tasks>
  182. <task>HOTP-EXAMPLE</task>
  183. <task>TOTP-EXAMPLE</task>
  184. </tasks>
  185. <text>This account requires 2FA</text>
  186. </continue>
  187. ]]></example>
  188. <p>After the final octet of the first &lt;continue> element, any SASL security layer negotiated in the preceding exchange SHALL be immediately in effect.</p>
  189. <p>Clients respond with a &lt;next/> element, which has a single mandatory attribute of "task", containing the selected task name, and contains an OPTIONAL base64 encoded initial response contained in an &lt;initial-response> element.</p>
  190. <example caption="Client Continues"><![CDATA[
  191. <next xmlns='urn:xmpp:sasl:1' task='TOTP-EXAMPLE'>
  192. <initial-response>
  193. SSd2ZSBydW4gb3V0IG9mIGlkZWFzIGhlcmUu
  194. </initial-response>
  195. </next-authenticate>
  196. ]]></example>
  197. </section3>
  198. </section2>
  199. </section1>
  200. <section1 topic="SASL Profile Definition">
  201. <p>This provides pointers and/or clarifications to the <link url="#overview">Overview</link> in the order and manner defined in RFC 4422, section 4.</p>
  202. <section2 topic="Service Name">
  203. <p>The service name SHALL be "xmpp", as defined by RFC 6120.</p>
  204. </section2>
  205. <section2 topic="Mechanism negotiation">
  206. <p>Servers list mechanisms during stream features (See <link url="#features">Discovering Support</link>).</p>
  207. </section2>
  208. <section2 topic="Message Definitions">
  209. <section3 topic="Initiation">
  210. <p>Clients initiate using the &lt;authenticate/> top level element (See <link url="#auth">Initiation</link>.</p>
  211. </section3>
  212. <section3 topic="Server Challenges and Client Responses">
  213. <p>See <link url="#challenge">Challenges and Responses</link>.</p>
  214. </section3>
  215. <section3 topic="Outcome">
  216. <p>See <link url="#outcome">Completing Authentication</link>.</p>
  217. </section3>
  218. </section2>
  219. <section2 topic="Non-Empty Authorization Strings">
  220. <p>If a Client specifies an authorization string which is non-empty, the identifier is normalized by treating it as a JID, and performing normalization as described in RFC 7622.</p>
  221. <p>In general, implementors are advised that a non-empty authorization string MAY be considered an error if the stream's from attribute (if present) does not match.</p>
  222. </section2>
  223. <section2 topic="Aborting">
  224. <p>Clients MAY abort unilaterally by sending &lt;abort/> as specified in <link url="#abort">Client Aborts</link>.</p>
  225. <p>Servers MAY abort unliterally by sending &lt;failure/> with the &lt;aborted/> error code as defined in <link url="#failure">Failure</link>.</p>
  226. </section2>
  227. <section2 topic="Security Layer Effect">
  228. <p>Security Layers take effect after the SASL mechanism itself (ie, the first negotiation) has completed successfully, after the final octet of the server's &lt;success> or &lt;continue>. See <link url="#success">Success</link> and <link url="#continue">Continue</link>.</p>
  229. </section2>
  230. <section2 topic="Security Layer Order">
  231. <p>Option (a) is used - any SASL Security Layer is applied first to data being sent, and TLS applied last.</p>
  232. </section2>
  233. <section2 topic="Multiple Authentication">
  234. <p>Although the &lt;continue/> concept does use tasks analogous to multiple SASL sequences, only the first SASL mechanism used is considered an authentication, and only the first can negotiate a security layer.</p>
  235. <p>In particular, once &lt;success/> has been sent by the server, any further &lt;authenticate/> element MUST result in a stream error.</p>
  236. </section2>
  237. </section1>
  238. <section1 topic="Example Flows">
  239. <p>This section provides a fictional example. It is important to note that many of the extensions used wihtin this section do not, in fact, exist and therefore are to be avoided.</p>
  240. <section2 topic="Syntactic Equivalence">
  241. <p>Where no additional features that SASL2 makes available are used, the flow of information is identical to the original SASL profile. This example shows the new syntax and draws the reader's attention to the differences.</p>
  242. <example caption="PLAIN Authentication"><![CDATA[
  243. <!--
  244. Server sends stream features.
  245. These are identical to SASL1, but within a different namespace.
  246. -->
  247. <stream:features>
  248. <mechanisms xmlns='urn:xmpp:sasl:1'>
  249. <mechanism>PLAIN</mechanism>
  250. <mechanism>SCRAM-SHA-1</mechanism>
  251. </mechanisms>
  252. </stream:features>
  253. <!--
  254. Client intiates authentication.
  255. Beyond the element local name and namespace,
  256. the main distinction is that initial-response data is held within an element,
  257. so the "=" special case no longer applies.
  258. -->
  259. <authenticate xmlns='urn:xmpp:sasl:1' mechanism='PLAIN'>
  260. <initial-response>AGFsaWNlQGV4YW1wbGUub3JnCjM0NQ==</initial-response>
  261. </authenticate>
  262. <!--
  263. This completes in one step, so the Server sends a success.
  264. A SASL2 success always includes the authorization identifier:
  265. -->
  266. <success xmlns='urn:xmpp:sasl:1'>
  267. <authorization-identifier></authorization-identifier>
  268. </success>
  269. <!--
  270. The server immediately sends a new set of stream features at this point.
  271. There is no stream restart.
  272. -->
  273. <stream:features>
  274. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  275. <required/>
  276. </bind>
  277. </stream:features>
  278. <!--
  279. The client now continues with resource binding.
  280. -->
  281. ]]></example>
  282. <p>Use of SASL2 in this simple scenario saves one round-trip (due to the lack of stream restart).</p>
  283. </section2>
  284. <section2 topic="Once More, This Time With CRAM">
  285. <p>Again, this is an equivalent flow to a common SASL1 flow, although using the CRAM-MD5 mechanism which is (thankfully) rarely used in practise.</p>
  286. <example caption="CRAM-MD5 Authentication"><![CDATA[
  287. <!--
  288. Server sends stream features.
  289. -->
  290. <stream:features>
  291. <mechanisms xmlns='urn:xmpp:sasl:1'>
  292. <mechanism>PLAIN</mechanism>
  293. <mechanism>CRAM-MD5</mechanism>
  294. </mechanisms>
  295. </stream:features>
  296. <!--
  297. Client intiates authentication.
  298. Here, no initial response is needed, so none is sent.
  299. -->
  300. <authenticate xmlns='urn:xmpp:sasl:1' mechanism='CRAM-MD5'/>
  301. <!--
  302. CRAM-MD5 starts with a server challenge:
  303. -->
  304. <challenge xmlns='urn:xmpp:sasl:1'>
  305. PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
  306. </challenge>
  307. <!--
  308. And the client responds:
  309. -->
  310. <response xmlns='urn:xmpp:sasl:1>
  312. </response>
  313. <!--
  314. This completes, so the Server sends a success.
  315. -->
  316. <success xmlns='urn:xmpp:sasl:1'>
  317. <authorization-identifier></authorization-identifier>
  318. </success>
  319. <!--
  320. The server immediately sends a new set of stream features at this point.
  321. There is no stream restart.
  322. -->
  323. <stream:features>
  324. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  325. <required/>
  326. </bind>
  327. </stream:features>
  328. <!--
  329. The client now continues with resource binding.
  330. -->
  331. ]]></example>
  332. <p>Use of SASL2 in this simple scenario again simply saves one round-trip.</p>
  333. </section2>
  334. <section2 topic="Advanced Usage">
  335. <p>This moves into the deeply hypothetical. A binding extension is posited, alongside an unrealistic 2FA mechanism which somehow mutually authenticates because why not.</p>
  336. <example caption="CRAM-MD5 Authentication"><![CDATA[
  337. <!--
  338. Server sends stream features.
  339. Note that whilst megabind is advertised, the unrealistic 2FA mechanism is not.
  340. -->
  341. <stream:features>
  342. <mechanisms xmlns='urn:xmpp:sasl:1'>
  343. <mechanism>BLURDYBLOOP</mechanism>
  344. </mechanisms>
  345. <megabind xmlns='urn:example:megabind'/>
  346. </stream:features>
  347. <!--
  348. Client intiates authentication.
  349. -->
  350. <authenticate xmlns='urn:xmpp:sasl:1' mechanism='BLURDYBLOOP'>
  351. <initial-response>
  352. SW5pdGlhbCBSZXNwb25zZQ==
  353. </initial-response>
  354. <megabind xmlns='urn:example:megabind'>
  355. <resource>this-one-please</resource>
  356. </megabind>
  357. </authenticate>
  358. <!--
  359. Maybe BLURDYBLOOP does this:
  360. -->
  361. <challenge xmlns='urn:xmpp:sasl:1'>
  362. PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
  363. </challenge>
  364. <!--
  365. And the client responds:
  366. -->
  367. <response xmlns='urn:xmpp:sasl:1>
  369. </response>
  370. <!--
  371. This completes, so the Server sends a continue, with the
  372. success data (probably mutual auth) from BLURDYBLOOP.
  373. The next task required is the unrealistic 2FA.
  374. Note that the session is - probably - bound at this point, but
  375. the authorization-identifier is not passed to the client until
  376. the full authentication sequence is completed.
  377. -->
  378. <continue xmlns='urn:xmpp:sasl:1'>
  379. <additional-data>
  380. QWRkaXRpb25hbCBEYXRh
  381. </additional-data>
  382. <tasks>
  383. <task>UNREALISTIC-2FA</task>
  384. </tasks>
  385. </continue>
  386. <!--
  387. The client supports the unrealistic 2FA, so can move onto the next task:
  388. -->
  389. <next xmlns='urn:xmpp:sasl:1' task='UNREALISTIC-2FA'>
  390. <initial-response>
  391. VW5yZWFsaXN0aWMgMkZBIElS
  392. </initial-response>
  393. <!--
  394. In principle, another option could be negotiated here, but this seems
  395. unlikely to be useful in practise.
  396. -->
  397. </next>
  398. <!--
  399. This 2FA process is both unrealistic and also uses multiple round-trips.
  400. -->
  401. <challenge xmlns='urn:xmpp:sasl:1'>
  402. PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
  403. </challenge>
  404. <!--
  405. The client responds here.
  406. -->
  407. <response xmlns='urn:xmpp:sasl:1>
  409. </response>
  410. <!--
  411. Finally, the server sends a success.
  412. Here, we have an authzid which is a full jid, since the session is now bound.
  413. The additional-data element here contains the mutual authentication data for the
  414. unrealistic 2FA, and doesn't refer back to the BLURDYBLOOP exchange.
  415. -->
  416. <success xmlns='urn:xmpp:sasl:1'>
  417. <additional-data>
  418. VW5yZWFsaXN0aWMgMkZBIG11dHVhbCBhdXRoIGRhdGE=
  419. </additional-data>
  420. <authorization-identifier>
  422. </authorization-identifier>
  423. </success>
  424. <!--
  425. The Server also sends an (empty) features element.
  426. The client can simply continue and send stanzas.
  427. -->
  428. <stream:features/>
  429. ]]></example>
  430. <p>Although the unrealistic 2FA here uses 2 round-trips (real ones will probably use one), the embedding of resource binding as shown here means that a second RTT is saved by SASL2, and there's no net change. A more realistic example would see RTTs saved, and additional negotiations could be added to further reduce RTTs.</p>
  431. </section2>
  432. </section1>
  433. <section1 topic='Security Considerations' anchor='security'>
  434. <p>Relative to the SASL profile documented in RFC 6120, this introduces more data unprotected by any security layer negotiated by SASL itself.</p>
  435. <p>While no actual exchanges are introduced that are unprotected, the nature of this exchange might allow for (for example) a resource binding extension to be introduced.</p>
  436. <p>SASL security layers are sparingly used in the field, however, so this is thought to be a theoretical, rather than practical, concern.</p>
  437. </section1>
  438. <section1 topic='IANA Considerations' anchor='iana'>
  439. <p>This XEP requires no interaction with &IANA;. </p>
  440. </section1>
  441. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  442. <p>None.</p>
  443. </section1>
  444. <section1 topic="XML Schema">
  445. <code><![CDATA[
  446. <?xml version='1.0' encoding='utf-8'?>
  447. <xs:schema xmlns:xs=''
  448. targetNamespace="urn:xmpp:sasl:1"
  449. xmlns="urn:xmpp:sasl:1"
  450. elementFormDefault="qualified">
  451. <xs:element name="mechanisms">
  452. <xs:complexType>
  453. <xs:sequence>
  454. <xs:element name="mechanism" type="SaslMechName" minOccurs="1" maxOccurs="unbounded"/>
  455. <xs:any/>
  456. </xs:sequence>
  457. </xs:complexType>
  458. </xs:element>
  459. <xs:element name="authenticate">
  460. <xs:complexType>
  461. <xs:attribute name="mechanism" type="SaslMechName"/>
  462. <xs:sequence>
  463. <xs:element name="initial-response"/>
  464. <xs:any/>
  465. </xs:sequence>
  466. </xs:complexType>
  467. </xs:element>
  468. <xs:element name="next">
  469. <xs:complexType>
  470. <xs:attribute name="task" type="SaslMechName"/>
  471. <xs:sequence>
  472. <xs:element name="initial-response"/>
  473. <xs:any/>
  474. </xs:sequence>
  475. </xs:complexType>
  476. </xs:element>
  477. <xs:element name="challenge" type="SaslData"/>
  478. <xs:element name="response" type="SaslData"/>
  479. <xs:element name="initial-response" type="SaslData"/>
  480. <xs:element name="success">
  481. <xs:complexType>
  482. <xs:sequence>
  483. <xs:element name="additional-data" type="SaslData"/>
  484. <xs:element name="authorization-identifier" type="Jid"/>
  485. </xs:sequence>
  486. </xs:complexType>
  487. </xs:element>
  488. <xs:element name="continue">
  489. <xs:complexType>
  490. <xs:sequence>
  491. <xs:element name="additional-data" type="SaslData"/>
  492. <xs:element name="tasks">
  493. <xs:complexType>
  494. <xs:sequence>
  495. <xs:element name="tasK" type="SaslMechName"/>
  496. </xs:sequence>
  497. </xs:complexType>
  498. </xs:element>
  499. </xs:sequence>
  500. </xs:complexType>
  501. </xs:element>
  502. <xs:simpleType name="Jid">
  503. <xs:restriction base="xs:string">
  504. <xs:maxLength value="3071"/>
  505. </xs:restriction>
  506. </xs:simpleType>
  507. <xs:simpleType name="SaslMechName">
  508. <xs:restriction base="xs:string">
  509. <xs:minLength value="1"/>
  510. <xs:maxLength value="20"/>
  511. </xs:restriction>
  512. </xs:simpleType>
  513. <xs:simpleType name="SaslData">
  514. <xs:restriction base="xs:base64Binary"/>
  515. </xs:simpleType>
  516. </xs:schema>
  517. ]]></code>
  518. </section1>
  519. <section1 topic='Acknowledgements' anchor='ack'>
  520. <p>The author wishes to share any credit with many members of the community, including Lance Stout, Ralph Meijer, Phil Roberts and Florian Schmaus.</p>
  521. </section1>
  522. </xep>