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-0192.xml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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>Proposed Stream Feature Improvements</title>
  10. <abstract>This document proposes improvements to the XML stream features definition for inclusion in the specification that supersedes RFC 3920.</abstract>
  11. &LEGALNOTICE;
  12. <number>0192</number>
  13. <status>Obsolete</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. </dependencies>
  19. <supersedes/>
  20. <supersededby>
  21. <spec>RFC 6120</spec>
  22. </supersededby>
  23. <shortname>N/A</shortname>
  24. &stpeter;
  25. <revision>
  26. <version>1.2</version>
  27. <date>2012-02-08</date>
  28. <initials>psa</initials>
  29. <remark><p>Per a vote of the XMPP Council, changed status from Deprecated to Obsolete.</p></remark>
  30. </revision>
  31. <revision>
  32. <version>1.1</version>
  33. <date>2011-05-11</date>
  34. <initials>psa</initials>
  35. <remark><p>Per a vote of the XMPP Council, changed specification to Deprecated because the recommendations described in this document were not incorporated into RFC 6120.</p></remark>
  36. </revision>
  37. <revision>
  38. <version>1.0</version>
  39. <date>2007-01-17</date>
  40. <initials>psa</initials>
  41. <remark><p>Per a vote of the XMPP Council, advanced specification to Draft; XMPP Registrar assigned urn:xmpp:features:dialback as namespace for dialback stream feature.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.2</version>
  45. <date>2006-12-20</date>
  46. <initials>psa</initials>
  47. <remark><p>Removed session establishment examples and text; specified that namespace for dialback stream feature shall be issued by the XMPP Registrar.</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.1</version>
  51. <date>2006-08-16</date>
  52. <initials>psa</initials>
  53. <remark><p>Initial version.</p></remark>
  54. </revision>
  55. <revision>
  56. <version>0.0.1</version>
  57. <date>2006-08-10</date>
  58. <initials>psa</initials>
  59. <remark><p>First draft.</p></remark>
  60. </revision>
  61. </header>
  62. <section1 topic='Introduction' anchor='proto'>
  63. <p><cite>RFC 3920</cite> introduced the concept of stream features. Implementation experience has revealed several shortcomings in the current definition and usage of stream features:</p>
  64. <ul>
  65. <li>Because not all stream features include a mechanism for specifying that negotiation of the feature is required, servers and clients cannot know with certainty when the stream negotiation has been completed and therefore when it is acceptable to begin sending XML stanzas over the stream.</li>
  66. <li>The server dialback protocol does not have a stream feature associated with it.</li>
  67. </ul>
  68. <p>Those shortcomings are addressed in this document.</p>
  69. <p class='box'>Note: The recommendations from this document were NOT incorporated into &rfc6120; and this document is Obsolete.</p>
  70. </section1>
  71. <section1 topic='Required Flag' anchor='required'>
  72. <p>The XMPP stream feature for Transport Layer Security (TLS) includes a &lt;required/&gt; child element that can be used to indicate that negotiation of TLS must be completed before proceeding with the rest of the stream negotiation. However, as defined in <cite>RFC 3920</cite> the remaining stream features do not include the ability to flag that negotiation of the feature is required in order to (1) proceed with the negotiation or (2) begin sending XML stanzas. Because the non-TLS features lack a required flag, it is not possible for the initiating entity to know definitively how to proceed at any given stage in the stream negotiation, and the only way for the initiating entity to know whether it may begin sending XML stanzas is to attempt to send them (the receiving entity will return a &notauthorized; stream error if not all required features have been negotiated). This state of affairs is suboptimal. Therefore, every stream feature must include the ability to flag the feature as required or not required. When the initiating entity receives a stream features element with no features containing a &lt;required/&gt; element, it knows thatt the receiving party will accept XML stanzas over the stream.</p>
  73. <p>The following examples show a possible flow of stream negotiation between a client and a server, using the required flag for all but one of the features and following the order specified in &xep0170;. (This example is more verbose than a typical stream negotiation flow, but is provided here for the sake of completeness.)</p>
  74. <example caption='A stream negotiation'><![CDATA[
  75. C: <stream:stream
  76. xmlns='jabber:client'
  77. xmlns:stream='http://etherx.jabber.org/streams'
  78. to='example.com'
  79. version='1.0'>
  80. S: <stream:stream
  81. xmlns='jabber:client'
  82. xmlns:stream='http://etherx.jabber.org/streams'
  83. id='c2s_123'
  84. from='example.com'
  85. version='1.0'>
  86. S: <stream:features>
  87. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
  88. <required/>
  89. </starttls>
  90. </stream:features>
  91. C: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  92. S: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  93. [TLS negotiation]
  94. C: <stream:stream
  95. xmlns='jabber:client'
  96. xmlns:stream='http://etherx.jabber.org/streams'
  97. to='example.com'
  98. version='1.0'>
  99. S: <stream:stream
  100. xmlns='jabber:client'
  101. xmlns:stream='http://etherx.jabber.org/streams'
  102. from='example.com'
  103. id='c2s_234'
  104. version='1.0'>
  105. S: <stream:features>
  106. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  107. <mechanism>EXTERNAL</mechanism>
  108. <mechanism>DIGEST-MD5</mechanism>
  109. <mechanism>PLAIN</mechanism>
  110. <required/>
  111. </mechanisms>
  112. </stream:features>
  113. C: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
  114. mechanism='DIGEST-MD5'/>
  115. S: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  116. cmVhbG09InNvbWVyZWFsbSIsbm9uY2U9Ik9BNk1HOXRFUUdtMmhoIixxb3A9ImF1dGgi
  117. LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNzCg==
  118. </challenge>
  119. C: <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  120. dXNlcm5hbWU9InNvbWVub2RlIixyZWFsbT0ic29tZXJlYWxtIixub25jZT0i
  121. T0E2TUc5dEVRR20yaGgiLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLG5jPTAw
  122. MDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZXhhbXBsZS5jb20i
  123. LHJlc3BvbnNlPWQzODhkYWQ5MGQ0YmJkNzYwYTE1MjMyMWYyMTQzYWY3LGNo
  124. YXJzZXQ9dXRmLTgK
  125. </response>
  126. S: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  127. cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZAo=
  128. </challenge>
  129. C: <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
  130. S: <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
  131. C: <stream:stream
  132. xmlns='jabber:client'
  133. xmlns:stream='http://etherx.jabber.org/streams'
  134. to='example.com'
  135. version='1.0'>
  136. S: <stream:stream
  137. xmlns='jabber:client'
  138. xmlns:stream='http://etherx.jabber.org/streams'
  139. id='c2s_345'
  140. from='example.com'
  141. version='1.0'>
  142. S: <stream:features>
  143. <compression xmlns='http://jabber.org/features/compress'>
  144. <method>zlib</method>
  145. <required/>
  146. </compression>
  147. </stream:features>
  148. C: <compress xmlns='http://jabber.org/protocol/compress'>
  149. <method>zlib</method>
  150. </compress>
  151. S: <compressed xmlns='http://jabber.org/protocol/compress'/>
  152. C: <stream:stream
  153. xmlns='jabber:client'
  154. xmlns:stream='http://etherx.jabber.org/streams'
  155. to='example.com'
  156. version='1.0'>
  157. S: <stream:stream
  158. xmlns='jabber:client'
  159. xmlns:stream='http://etherx.jabber.org/streams'
  160. id='c2s_456'
  161. from='example.com'
  162. version='1.0'>
  163. S: <stream:features>
  164. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  165. <required/>
  166. </bind>
  167. </stream:features>
  168. C: <iq type='set' id='bind_1'>
  169. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  170. <resource>someresource</resource>
  171. </bind>
  172. </iq>
  173. S: <iq type='result' id='bind_1'>
  174. <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
  175. <jid>somenode@example.com/someresource</jid>
  176. </bind>
  177. </iq>
  178. ]]></example>
  179. </section1>
  180. <section1 topic='Dialback Stream Feature' anchor='dialback'>
  181. <p>As specified in <cite>RFC 3920</cite>, support for the server dialback protocol is currently adverised through inclusion of a dialback namespace prefix in the stream header:</p>
  182. <example caption='Stream header with dialback namespace advertisement'><![CDATA[
  183. <stream:stream
  184. xmlns:stream='http://etherx.jabber.org/streams'
  185. xmlns='jabber:server'
  186. xmlns:db='jabber:server:dialback'
  187. id='s2s_123'>
  188. ]]></example>
  189. <p>However, it is not clear if inclusion of the dialback namespace indicates that a server supports the server dialback protocol or that it requires negotiation of server dialback. To make this clear, we define a stream feature for server dialback:</p>
  190. <example caption='Dialback stream feature'><![CDATA[
  191. <stream:features>
  192. <dialback xmlns='urn:xmpp:features:dialback'>
  193. <required/>
  194. </dialback>
  195. </stream:features>
  196. ]]></example>
  197. <p>Consider the following scenario, in which Server1 provides a self-signed certificate. According to Server2's local service policy, it does not consider self-signed certificates to be trustworthy and therefore requires negotiation of server dialback in this case.</p>
  198. <example caption='A stream negotiation with server dialback'><![CDATA[
  199. S1: <stream:stream
  200. xmlns='jabber:server'
  201. xmlns:db='jabber:server:dialback'
  202. xmlns:stream='http://etherx.jabber.org/streams'
  203. to='example.com'
  204. version='1.0'>
  205. S2: <stream:stream
  206. xmlns='jabber:server'
  207. xmlns:db='jabber:server:dialback'
  208. xmlns:stream='http://etherx.jabber.org/streams'
  209. id='s2s_123'
  210. from='example.com'
  211. version='1.0'>
  212. S2: <stream:features>
  213. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
  214. <required/>
  215. </starttls>
  216. </stream:features>
  217. S2: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  218. [TLS negotiation with self-signed certificate]
  219. S1: <stream:stream
  220. xmlns='jabber:server'
  221. xmlns:db='jabber:server:dialback'
  222. xmlns:stream='http://etherx.jabber.org/streams'
  223. to='example.com'
  224. version='1.0'>
  225. S2: <stream:stream
  226. xmlns='jabber:server'
  227. xmlns:db='jabber:server:dialback'
  228. xmlns:stream='http://etherx.jabber.org/streams'
  229. from='example.com'
  230. id='c2s_234'
  231. version='1.0'>
  232. S2: <stream:features>
  233. <dialback xmlns='urn:xmpp:features:dialback'>
  234. <required/>
  235. </dialback>
  236. </stream:features>
  237. [Dialback negotiation]
  238. ]]></example>
  239. </section1>
  240. <section1 topic='Security Considerations' anchor='security'>
  241. <p>The improvements described herein do not introduce any new security concerns above and beyond those defined in <cite>RFC 3920</cite>.</p>
  242. </section1>
  243. <section1 topic='IANA Considerations' anchor='iana'>
  244. <p>No interaction with &IANA; is required as a result of this document.</p>
  245. </section1>
  246. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  247. <section2 topic='Stream Features' anchor='registrar-stream'>
  248. <p>As specified in &xep0220;, the &REGISTRAR; includes a dialback stream feature of 'urn:xmpp:features:dialback' in its registry of stream features (see &STREAMFEATURES;).</p>
  249. </section2>
  250. </section1>
  251. <section1 topic='XML Schema' anchor='schema'>
  252. <section2 topic='SASL Stream Feature' anchor='schema-sasl'>
  253. <p>Note: The following provisional schema is intended to replace the existing schema for the SASL stream feature.</p>
  254. <code><![CDATA[
  255. <?xml version='1.0' encoding='UTF-8'?>
  256. <xs:schema
  257. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  258. targetNamespace='urn:ietf:params:xml:ns:xmpp-sasl'
  259. xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
  260. elementFormDefault='qualified'>
  261. <xs:element name='mechanisms'>
  262. <xs:complexType>
  263. <xs:sequence>
  264. <xs:element name='mechanism'
  265. maxOccurs='unbounded'
  266. type='xs:string'/>
  267. <xs:element name='required'
  268. minOccurs='0'
  269. maxOccurs='1'
  270. type='empty'/>
  271. </xs:sequence>
  272. </xs:complexType>
  273. </xs:element>
  274. <xs:element name='auth'>
  275. <xs:complexType>
  276. <xs:simpleContent>
  277. <xs:extension base='xs:string'>
  278. <xs:attribute name='mechanism'
  279. type='xs:string'
  280. use='optional'/>
  281. </xs:extension>
  282. </xs:simpleContent>
  283. </xs:complexType>
  284. </xs:element>
  285. <xs:element name='challenge' type='xs:string'/>
  286. <xs:element name='response' type='xs:string'/>
  287. <xs:element name='abort' type='empty'/>
  288. <xs:element name='success' type='empty'/>
  289. <xs:element name='failure'>
  290. <xs:complexType>
  291. <xs:choice minOccurs='0'>
  292. <xs:element name='aborted' type='empty'/>
  293. <xs:element name='incorrect-encoding' type='empty'/>
  294. <xs:element name='invalid-authzid' type='empty'/>
  295. <xs:element name='invalid-mechanism' type='empty'/>
  296. <xs:element name='mechanism-too-weak' type='empty'/>
  297. <xs:element name='not-authorized' type='empty'/>
  298. <xs:element name='temporary-auth-failure' type='empty'/>
  299. </xs:choice>
  300. </xs:complexType>
  301. </xs:element>
  302. <xs:simpleType name='empty'>
  303. <xs:restriction base='xs:string'>
  304. <xs:enumeration value=''/>
  305. </xs:restriction>
  306. </xs:simpleType>
  307. </xs:schema>
  308. ]]></code>
  309. </section2>
  310. <section2 topic='Resource Binding Stream Feature' anchor='schema-bind'>
  311. <p>Note: The following provisional schema is intended to replace the existing schema for the Resource Binding stream feature.</p>
  312. <code><![CDATA[
  313. <?xml version='1.0' encoding='UTF-8'?>
  314. <xs:schema
  315. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  316. targetNamespace='urn:ietf:params:xml:ns:xmpp-bind'
  317. xmlns='urn:ietf:params:xml:ns:xmpp-bind'
  318. elementFormDefault='qualified'>
  319. <xs:element name='bind'>
  320. <xs:complexType>
  321. <xs:sequence>
  322. <xs:choice minOccurs='0' maxOccurs='1'>
  323. <xs:element name='resource' type='resourceType'/>
  324. <xs:element name='jid' type='fullJIDType'/>
  325. </xs:choice>
  326. <xs:element name='required'
  327. minOccurs='0'
  328. maxOccurs='1'
  329. type='empty'/>
  330. </xs:choice>
  331. </xs:sequence>
  332. </xs:complexType>
  333. </xs:element>
  334. <xs:simpleType name='resourceType'>
  335. <xs:restriction base='xs:string'>
  336. <xs:minLength value='1'/>
  337. <xs:maxLength value='1023'/>
  338. </xs:restriction>
  339. </xs:simpleType>
  340. <xs:simpleType name='fullJIDType'>
  341. <xs:restriction base='xs:string'>
  342. <xs:minLength value='8'/>
  343. <xs:maxLength value='3071'/>
  344. </xs:restriction>
  345. </xs:simpleType>
  346. </xs:schema>
  347. ]]></code>
  348. </section2>
  349. <section2 topic='Server Dialback Stream Feature' anchor='schema-dialback'>
  350. <p>Note: The following defines a schema for the proposed Server Dialback stream feature.</p>
  351. <code><![CDATA[
  352. <?xml version='1.0' encoding='UTF-8'?>
  353. <xs:schema
  354. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  355. targetNamespace='urn:xmpp:features:dialback'
  356. xmlns='urn:xmpp:features:dialback'
  357. elementFormDefault='qualified'>
  358. <xs:element name='dialback'>
  359. <xs:complexType>
  360. <xs:sequence>
  361. <xs:element name='required'
  362. minOccurs='0'
  363. maxOccurs='1'
  364. type='empty'/>
  365. </xs:sequence>
  366. </xs:complexType>
  367. <xs:simpleType name='empty'>
  368. <xs:restriction base='xs:string'>
  369. <xs:enumeration value=''/>
  370. </xs:restriction>
  371. </xs:simpleType>
  372. </xs:schema>
  373. ]]></code>
  374. </section2>
  375. </section1>
  376. <section1 topic='Acknowledgements' anchor='ack'>
  377. <p>Thanks to Ralph Meijer and Joe Hildebrand for their comments.</p>
  378. </section1>
  379. </xep>