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-0344.xml 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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>Impact of TLS and DNSSEC on Dialback</title>
  10. <abstract>This specification provides documentation how Server Dialback is used together with Transport Layer Security, and discusses how the security considerations of Dialback are changed by the introduction of TLS and/or DNSSEC.</abstract>
  11. &LEGALNOTICE;
  12. <number>0344</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0220</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>N/A</shortname>
  24. &fippo;
  25. &dcridland;
  26. <revision>
  27. <version>0.4</version>
  28. <date>2017-09-11</date>
  29. <initials>XEP Editor (jwi)</initials>
  30. <remark>Defer due to lack of activity.</remark>
  31. </revision>
  32. <revision>
  33. <version>0.3</version>
  34. <date>2015-03-23</date>
  35. <initials>dwd/ph</initials>
  36. <remark>
  37. <p>Described same-certificate flow.</p>
  38. </remark>
  39. </revision>
  40. <revision>
  41. <version>0.2</version>
  42. <date>2014-03-19</date>
  43. <initials>editor (mam)</initials>
  44. <remark>
  45. <p>Editorial fixes.</p>
  46. </remark>
  47. </revision>
  48. <revision>
  49. <version>0.1</version>
  50. <date>2014-03-14</date>
  51. <initials>editor (mam)</initials>
  52. <remark>
  53. <p>Initial published version approved by the XMPP Council.</p>
  54. </remark>
  55. </revision>
  56. <revision>
  57. <version>0.0.3</version>
  58. <date>2014-02-28</date>
  59. <initials>dwd</initials>
  60. <remark>
  61. <p>Changed title and added more security considerations.</p>
  62. </remark>
  63. </revision>
  64. <revision>
  65. <version>0.0.2</version>
  66. <date>2013-11-13</date>
  67. <initials>dwd</initials>
  68. <remark><p>Added some narrative and a section on dwd.</p></remark>
  69. </revision>
  70. <revision>
  71. <version>0.0.1</version>
  72. <date>2013-11-04</date>
  73. <initials>ph</initials>
  74. <remark><p>First draft.</p></remark>
  75. </revision>
  76. </header>
  77. <section1 topic='Introduction' anchor='intro'>
  78. <p>Although &xep0220; describes dialback as being run before any other negotiation, it is typically run over TLS where supported. This allows it to be used as a simple convenient fallback to X.509 Strong Authentication within the TLS layer, as described in &rfc6120;, and also affords greater protection to the exchange.</p>
  79. <p>This document describes these practises, and also describes various functionally equivalent shortcuts to the protocol, including that known as "dialback without dialback".</p>
  80. </section1>
  81. <section1 topic='Protocol' anchor='protocol'>
  82. <section2 topic='Dramatis Personae'>
  83. <p>This document will tell a tale of two servers; orchard.capulet.example is trying to contact home.montague.example. Each server operates a single domain; these are capulet.example and montague.example respectively.</p>
  84. </section2>
  85. <section2 topic='Classic Dialback Flow' anchor='classic'>
  86. <p>The traditional pattern is shown here:</p>
  87. <code><![CDATA[
  88. orchard.capulet. home.montague.
  89. example example
  90. (as Initiating) (as Receiving
  91. Server) Server)
  92. ---------------- -------------
  93. | |
  94. | [if necessary, |
  95. | perform DNS |
  96. | lookup on |
  97. | Target Domain, |
  98. | open TCP |
  99. | connection, |
  100. | and establish |
  101. | stream] |
  102. | -----------------> |
  103. | (ID D60000229F) |
  104. | |
  105. | send | capulet.example
  106. | dialback key | (as Authoritative
  107. | -----(STEP 1)----> | Server)
  108. | | -----------------
  109. | | [if necessary, |
  110. | | perform DNS |
  111. | | lookup on |
  112. | | Sender Domain, |
  113. | | open TCP |
  114. | | connection, |
  115. | | and establish |
  116. | | stream] |
  117. | | -----------------> |
  118. | | |
  119. | | send |
  120. | | verify request |
  121. | | ----(STEP 2)-----> |
  122. | | |
  123. | | send |
  124. | | verify response |
  125. | | <----(STEP 3)----- |
  126. | | |
  127. | report | |
  128. | dialback result | |
  129. | <-----(STEP 4)---- | |
  130. ]]></code>
  131. </section2>
  132. <section2 topic='XMPP Exchanges in Classic Dialback over TLS' anchor='dialback-stanzas'>
  133. <p>This traditional pattern involves the following protocol exchanges when dialback over TLS is used:</p>
  134. <example caption="Initiating Server Opens Stream"><![CDATA[
  135. <stream:stream
  136. xmlns:stream='http://etherx.jabber.org/streams'
  137. xmlns='jabber:server'
  138. from='capulet.example'
  139. to='montague.example'
  140. version='1.0'>
  141. ]]></example>
  142. <example caption="Receiving Server Responds with a stream header and advertises TLS feature"><![CDATA[
  143. <stream:stream
  144. xmlns:stream='http://etherx.jabber.org/streams'
  145. xmlns='jabber:server'
  146. id='D60000229F'
  147. from='montague.example'
  148. to='capulet.example'
  149. version='1.0'>
  150. <stream:features>
  151. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
  152. <required/>
  153. </starttls>
  154. </stream:features>
  155. ]]></example>
  156. <example caption="Initiating Server Sends STARTTLS command"><![CDATA[
  157. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  158. ]]></example>
  159. <example caption="Receiving Server informs Initiating Server to proceed"><![CDATA[
  160. <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  161. ]]></example>
  162. <example caption="Initiating Server Opens Stream"><![CDATA[
  163. <stream:stream
  164. xmlns:stream='http://etherx.jabber.org/streams'
  165. xmlns='jabber:server'
  166. from='capulet.example'
  167. to='montague.example'
  168. version='1.0'>
  169. ]]></example>
  170. <example caption="Receiving Server Responds with a stream header"><![CDATA[
  171. <stream:stream
  172. xmlns:stream='http://etherx.jabber.org/streams'
  173. xmlns='jabber:server'
  174. id='D60000229F'
  175. from='montague.example'
  176. to='capulet.example'
  177. version='1.0'>
  178. <stream:features>
  179. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  180. </mechanisms>
  181. </stream:features>
  182. ]]></example>
  183. <example caption="Initiating Server Sends Dialback Key (Step 1)"><![CDATA[
  184. <db:result
  185. from='capulet.example'
  186. to='montague.example'>
  187. b4835385f37fe2895af6c196b59097b16862406db80559900d96bf6fa7d23df3
  188. </db:result>
  189. ]]></example>
  190. <p>The Receiving Server may need to establish a connection to the Authoritative Server at this point.</p>
  191. <example caption="Receiving Server Sends Verification Request to Authoritative Server (Step 2)"><![CDATA[
  192. <db:verify
  193. from='montague.example'
  194. id='D60000229F'
  195. to='capulet.example'>
  196. b4835385f37fe2895af6c196b59097b16862406db80559900d96bf6fa7d23df3
  197. </db:verify>
  198. ]]></example>
  199. <example caption="Receiving Server is Informed by Authoritative Server that Key is Valid (Step 3)"><![CDATA[
  200. <db:verify
  201. from='capulet.example'
  202. id='D60000229F'
  203. to='montague.example'
  204. type='valid'/>
  205. ]]></example>
  206. <example caption="Initiating Server Receives Valid Verification Result from Receiving Server (Step 4)"><![CDATA[
  207. <db:result
  208. from='montague.example'
  209. to='capulet.example'
  210. type='valid'/>
  211. ]]></example>
  212. </section2>
  213. <section2 topic='Dialback without dialback flow' anchor='dwd'>
  214. <p>If during the initial connection, home.montague.example is able to determine that the certificate presented is trustworthy, and authenticates orchard.capulet.example as authorized to offer the XMPP service for capulet.example, then the flow can be shortcutted heavily, allowing the entire Authoritative Server process to be elided.</p>
  215. <p>This is particularly useful in cases where the dialback exchange is a subsequent exchange used in piggybacking, as it remains the only solution for piggybacking with strong authentication.</p>
  216. <code><![CDATA[
  217. orchard.capulet. home.montague.
  218. example example
  219. (as Initiating) (as Receiving
  220. Server) Server)
  221. ---------------- -------------
  222. | |
  223. | [if necessary, |
  224. | perform DNS |
  225. | lookup on |
  226. | Target Domain, |
  227. | open TCP |
  228. | connection, |
  229. | and establish |
  230. | stream] |
  231. | -----------------> |
  232. | (ID D60000229F) |
  233. | |
  234. | send |
  235. | dialback key |
  236. | -----(STEP 1)----> |
  237. | |
  238. | | [observe certificate
  239. | | trustworthy and
  240. | | correct for capulet.example
  241. | | as per RFC 6125]
  242. | |
  243. | report |
  244. | dialback result |
  245. | <-----(STEP 4)---- |
  246. ]]></code>
  247. </section2>
  248. <section2 topic='XMPP Exchanges in Dialback without dialback' anchor='dwd-stanzas'>
  249. <p>This traditional pattern involves the following protocol exchanges when dialback over TLS is used:</p>
  250. <example caption="Initiating Server Opens Stream"><![CDATA[
  251. <stream:stream
  252. xmlns:stream='http://etherx.jabber.org/streams'
  253. xmlns='jabber:server'
  254. from='capulet.example'
  255. to='montague.example'
  256. version='1.0'>
  257. ]]></example>
  258. <example caption="Receiving Server Responds with a stream header and advertises TLS feature"><![CDATA[
  259. <stream:stream
  260. xmlns:stream='http://etherx.jabber.org/streams'
  261. xmlns='jabber:server'
  262. id='D60000229F'
  263. from='montague.example'
  264. to='capulet.example'
  265. version='1.0'>
  266. <stream:features>
  267. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
  268. <required/>
  269. </starttls>
  270. </stream:features>
  271. ]]></example>
  272. <example caption="Initiating Server Sends STARTTLS command"><![CDATA[
  273. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  274. ]]></example>
  275. <example caption="Receiving Server informs Initiating Server to proceed"><![CDATA[
  276. <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  277. ]]></example>
  278. <example caption="Initiating Server Opens Stream"><![CDATA[
  279. <stream:stream
  280. xmlns:stream='http://etherx.jabber.org/streams'
  281. xmlns='jabber:server'
  282. from='capulet.example'
  283. to='montague.example'
  284. version='1.0'>
  285. ]]></example>
  286. <example caption="Receiving Server Responds with a stream header"><![CDATA[
  287. <stream:stream
  288. xmlns:stream='http://etherx.jabber.org/streams'
  289. xmlns='jabber:server'
  290. id='D60000229F'
  291. from='montague.example'
  292. to='capulet.example'
  293. version='1.0'>
  294. <stream:features>
  295. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  296. <mechanism name='EXTERNAL'/>
  297. </mechanisms>
  298. </stream:features>
  299. ]]></example>
  300. <p>Note that having authenticated the certificate and found it authorized for capulet.example, montague.example has offered EXTERNAL above. It's not clear why capulet.example does not avail itself of the offer below; however it should be noted that EXTERNAL would not be available with piggybacking for example.</p>
  301. <example caption="Initiating Server Sends Dialback Key (Step 1)"><![CDATA[
  302. <db:result
  303. from='capulet.example'
  304. to='montague.example'>
  305. b4835385f37fe2895af6c196b59097b16862406db80559900d96bf6fa7d23df3
  306. </db:result>
  307. ]]></example>
  308. <p>Critically, it is at this point that home.montague.example both authenticates and checks authorization on the certificate, or at least ensure that the certificate presented at this stage matches that presented at the initial handshake.</p>
  309. <example caption="Initiating Server Receives Valid Verification Result from Receiving Server (Step 4)"><![CDATA[
  310. <db:result
  311. from='montague.example'
  312. to='capulet.example'
  313. type='valid'/>
  314. from='montague.example'
  315. to='capulet.example'
  316. type='valid'/>
  317. ]]></example>
  318. </section2>
  319. <section2 topic='Same Certificate shortcut' anchor='samecert'>
  320. <p>If during the initial connection, the Receiving Server is unable to determine that the certificate presented is trustworthy but the Authoritative Server presents the same certificate as the Originating Server, the &lt;db:verify/&gt; step can be elided.</p>
  321. <p>Note: the Receiving Server MUST still check that the hostname in the certificate matches.</p>
  322. <p>Essentially, this replaces the Dialback Key Validation step from &xep0185; with the somewhat more elaborate proof of posession of the private key associated with the certificate.</p>
  323. <code><![CDATA[
  324. orchard.capulet. home.montague.
  325. example example
  326. (as Initiating) (as Receiving
  327. Server) Server)
  328. ---------------- -------------
  329. | |
  330. | [if necessary, |
  331. | perform DNS |
  332. | lookup on |
  333. | Target Domain, |
  334. | open TCP |
  335. | connection, |
  336. | and establish |
  337. | stream] |
  338. | -----------------> |
  339. | (ID D60000229F) |
  340. | |
  341. | send | capulet.example
  342. | dialback key | (as Authoritative
  343. | -----(STEP 1)----> | Server)
  344. | | -----------------
  345. | | [if necessary, |
  346. | | perform DNS |
  347. | | lookup on |
  348. | | Sender Domain, |
  349. | | open TCP |
  350. | | connection, |
  351. | | and establish |
  352. | | stream] |
  353. | | -----------------> |
  354. | | [observe certificate is for
  355. | | capulet.example and same as
  356. | | used by orchard.capulat.example]
  357. | report |
  358. | dialback result |
  359. | <-----(STEP 4)---- |
  360. ]]></code>
  361. </section2>
  362. <section2 topic='XMPP Exchanges in Same Certifiate shortcut' anchor='samecert-stanzas'>
  363. <p>This pattern involves the following protocol exchanges:</p>
  364. <example caption="Initiating Server Opens Stream"><![CDATA[
  365. <stream:stream
  366. xmlns:stream='http://etherx.jabber.org/streams'
  367. xmlns='jabber:server'
  368. from='capulet.example'
  369. to='montague.example'
  370. version='1.0'>
  371. ]]></example>
  372. <example caption="Receiving Server Responds with a stream header and advertises TLS feature"><![CDATA[
  373. <stream:stream
  374. xmlns:stream='http://etherx.jabber.org/streams'
  375. xmlns='jabber:server'
  376. id='D60000229F'
  377. from='montague.example'
  378. to='capulet.example'
  379. version='1.0'>
  380. <stream:features>
  381. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
  382. <required/>
  383. </starttls>
  384. </stream:features>
  385. ]]></example>
  386. <example caption="Initiating Server Sends STARTTLS command"><![CDATA[
  387. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  388. ]]></example>
  389. <example caption="Receiving Server informs Initiating Server to proceed"><![CDATA[
  390. <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  391. ]]></example>
  392. <example caption="Initiating Server Opens Stream"><![CDATA[
  393. <stream:stream
  394. xmlns:stream='http://etherx.jabber.org/streams'
  395. xmlns='jabber:server'
  396. from='capulet.example'
  397. to='montague.example'
  398. version='1.0'>
  399. ]]></example>
  400. <example caption="Receiving Server Responds with a stream header"><![CDATA[
  401. <stream:stream
  402. xmlns:stream='http://etherx.jabber.org/streams'
  403. xmlns='jabber:server'
  404. id='D60000229F'
  405. from='montague.example'
  406. to='capulet.example'
  407. version='1.0'>
  408. <stream:features>
  409. <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  410. </mechanisms>
  411. </stream:features>
  412. ]]></example>
  413. <example caption="Initiating Server Sends Dialback Key (Step 1)"><![CDATA[
  414. <db:result
  415. from='capulet.example'
  416. to='montague.example'>
  417. b4835385f37fe2895af6c196b59097b16862406db80559900d96bf6fa7d23df3
  418. </db:result>
  419. ]]></example>
  420. <p>The Receiving Server may need to establish a connection to the Authoritative Server at this point. Here we assume that this connection is using TLS and the certificate presented by the Authoritative Server is the same as the one used by the Originating Server and contains the domain name claimed by the Originating Server.</p>
  421. <example caption="Initiating Server Receives Valid Verification Result from Receiving Server (Step 4)"><![CDATA[
  422. <db:result
  423. from='montague.example'
  424. to='capulet.example'
  425. type='valid'/>
  426. ]]></example>
  427. </section2>
  428. </section1>
  429. <section1 topic='Security Considerations' anchor='security'>
  430. <p>With respect to <strong>XEP-0220</strong>'s security considerations, the adaptations in this document add at minimum channel encryption and integrity, which forces an attacker into making an active attack, rather than passive eavesdropping. This raises the cost of an attack significantly. However, unless the certificates are authenticated, there is still a man-in-the-middle attack possible, and the reliance on unauthenticated DNS remains problematic.</p>
  431. <section2 topic='Dialback without dialback shortcut'>
  432. <p>Use of the "Dialback without dialback" shortcut described in section 2.4 raises the level of authentication to that of the TLS/SASL-EXTERNAL process described in <strong>RFC 6120</strong>, and is thought to be indistinguishable from a security standpoint. As such, the security considerations relating to this in <strong>RFC 6120</strong> et al apply.</p>
  433. </section2>
  434. <section2 topic='Same Certificate shortcut'>
  435. <p>Use of the "Same Certificate" shortcut described in section 2.6 is not thought to materially alter the security profile beyond that described above. In particular, it does not alter the level of trust an implementation may put in authentication.</p>
  436. </section2>
  437. <section2 topic="DNSSEC">
  438. <p>If both SRV and A/AAAA records are protected by DNSSEC, this means that the correct address for the peer can be proven, removing DNS forgery as an attack vector. Without TLS, it is however still possible to mount an array of attacks, including IP spoofing and eavesdropping.</p>
  439. <p>With TLS, however, the situation improves. Since TLS protects against a naïve IP spoofing attack, a routing protocol attack (such as BGP hijacking) is required to forge the server.</p>
  440. </section2>
  441. <p>In addition, it is of critical importance to check the certificate at the time when the dialback result is received, and not only in the initial handshake. This protects against an attack based around renegotiation.</p>
  442. </section1>
  443. <section1 topic='IANA Considerations' anchor='iana'>
  444. <p>This document requires no interaction with &IANA;.</p>
  445. </section1>
  446. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  447. <p>This document requires no interaction with the XMPP Registrar.</p>
  448. </section1>
  449. </xep>