-
Notifications
You must be signed in to change notification settings - Fork 5
/
rfc7590.xml
340 lines (293 loc) · 20.8 KB
/
rfc7590.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<rfc category="std" number="7590" ipr="trust200902" updates="6120" submissionType="IETF" consensus="yes">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<front>
<title abbrev="XMPP TLS">Use of Transport Layer Security (TLS) in the Extensible Messaging and Presence Protocol (XMPP)</title>
<author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization>&yet</organization>
<address>
<email>[email protected]</email>
<uri>https://andyet.com/</uri>
</address>
</author>
<author initials="T." surname="Alkemade" fullname="Thijs Alkemade">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<date month="June" year="2015"/>
<abstract>
<t>This document provides recommendations for the use of Transport Layer Security (TLS) in the Extensible Messaging and Presence Protocol (XMPP). This document updates RFC 6120.</t>
</abstract>
</front>
<middle>
<section title="Introduction" anchor='intro'>
<t>The Extensible Messaging and Presence Protocol (XMPP) <xref target='RFC6120'/> (along with its precursor, the so-called "Jabber protocol") has used Transport Layer Security (TLS) <xref target='RFC5246'/> (along with its precursor, Secure Sockets Layer or SSL) since 1999. Both <xref target='RFC6120'/> and its predecessor <xref target='RFC3920'/> provided recommendations regarding the use of TLS in XMPP. In order to address the evolving threat model on the Internet today, this document provides stronger recommendations.</t>
<t>In particular, this document updates <xref target='RFC6120'/> by specifying that XMPP implementations and deployments MUST follow the best current practices documented in the "Recommendations for Secure Use of TLS and DTLS" <xref target='RFC7525'/>. This includes stronger recommendations regarding SSL/TLS protocol versions, fallback to lower versions, TLS&nbhy;layer compression, TLS session resumption, cipher suites, public key lengths, forward secrecy, and other aspects of using TLS with XMPP.</t>
</section>
<section title="Terminology" anchor="terms">
<t>Various security-related terms are to be understood in the sense defined in <xref target="RFC4949"/>.</t>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target='RFC2119'/>.</t>
</section>
<section title="Recommendations" anchor="rec">
<t>The best current practices documented in the "Recommendations for Secure Use of TLS and DTLS" <xref target='RFC7525'/> are included here by reference. Instead of repeating those recommendations here, this document mostly provides supplementary information regarding secure implementation and deployment of XMPP technologies.</t>
<section title="Support for TLS" anchor="rec-support">
<!-- [rfced] Please consider whether any changes are needed per
http://www.rfc-editor.org/errata_search.php?eid=3486
-->
<t>Support for TLS (specifically, the XMPP profile of STARTTLS) is
mandatory for XMPP implementations, as already specified in <xref
target='RFC6120'/> and its predecessor <xref target='RFC3920'/>.</t>
<t>The server (i.e., the XMPP receiving entity) to which a client or
peer server (i.e., the XMPP initiating entity) connects might not
offer a stream feature of <starttls xmlns='urn:ietf:params:xml:ns
:xmpp-tls'/>. Although in general this stream feature indicates
that the server supports and offers TLS, this
stream feature might be stripped out by an attacker (see Section 2.1
of <xref target='RFC7457'/>). Similarly, the <required/> child
element of the <starttls/> stream feature is used to indicate
that negotiation of TLS is mandatory; however, this could also be
stripped out by
an attacker. Therefore, the initiating entity MUST NOT be deterred
from attempting TLS negotiation even if the receiving entity does not
advertise support for TLS. Instead, the initiating entity SHOULD
(based on local policy) proceed with the stream negotiation and
attempt to negotiate TLS.</t>
</section>
<section title="Compression" anchor="rec-compress">
<t>XMPP supports an application-layer compression technology <xref target='XEP-0138'/>. Although this XMPP extension might have slightly stronger security properties than TLS-layer compression (since it is enabled after Simple Authentication and Security Layer (SASL) authentication, as described in <xref target='XEP-0170'/>), this document neither encourages nor discourages use of XMPP-layer compression.</t>
</section>
<section title="Session Resumption" anchor="rec-resume">
<t>To improve the reliability of communications over XMPP, it is common practice for clients and servers to implement the stream management extension <xref target='XEP-0198'/>. Although that specification includes a method for resumption of XMPP streams at the application layer, also using session resumption at the TLS layer further optimizes the overall process of resuming an XMPP session (see <xref target='XEP-0198'/> for detailed information). Whether or not XEP-0198 is used for application-layer session resumption, implementations MUST follow the recommendations provided in <xref target='RFC7525'/> regarding TLS-layer session resumption.</t>
</section>
<section title="Authenticated Connections" anchor="rec-auth">
<t>Both the core XMPP specification <xref target='RFC6120'/> and the CertID specification <xref target='RFC6125'/> provide recommendations and requirements for certificate validation in the context of authenticated connections. This document does not supersede those specifications (e.g., it does not modify the recommendations in <xref target='RFC6120'/> regarding the Subject Alternative Names or other certificate details that need to be supported for authentication of XMPP connections using PKIX certificates).</t>
<t>Wherever possible, it is best to prefer authenticated connections (along with SASL <xref target='RFC4422'/>), as already stated in the core XMPP specification <xref target='RFC6120'/>. In particular:</t>
<t>
<list style='symbols'>
<t>Clients MUST authenticate servers.</t>
<t>Servers MUST authenticate clients.</t>
<t>Servers SHOULD authenticate other servers.</t>
</list>
</t>
<t>This document does not mandate that servers need to authenticate peer servers, although such authentication is strongly preferred. Unfortunately, in multi-tenanted environments it can be extremely difficult to obtain and deploy PKIX certificates with the proper Subject Alternative Names (see <xref target='XMPP-DNA'/> and <xref target='PKIX-POSH'/> for details). To overcome that difficulty, the Domain Name Associations (DNAs) specification <xref target='XMPP-DNA'/> describes a framework for XMPP server authentication methods, which include not only PKIX but also DNS-Based Authentication of Named Entities (DANE) as defined in <xref target='DANE-SRV'/> and PKIX over Secure HTTP (POSH) as defined in <xref target='PKIX-POSH'/>. These methods can provide a basis for server identity verification when appropriate PKIX certificates cannot be obtained and deployed.</t>
<t>Given the pervasiveness of eavesdropping <xref target='RFC7258'/>, even an encrypted but unauthenticated connection might be better than an unencrypted connection in these scenarios (this is similar to the "better-than-nothing security" approach for IPsec <xref target='RFC5386'/>). Encrypted but unauthenticated connections include connections negotiated using anonymous Diffie-Hellman mechanisms or using self-signed certificates, among others. In particular for XMPP server-to-server interactions, it can be reasonable for XMPP server implementations to accept encrypted but unauthenticated connections when Server Dialback keys <xref target='XEP-0220'/> are used; such keys on their own provide only weak identity verification (made stronger through the use of DNSSEC <xref target='RFC4033'/>), but this at least enables encryption of server-to-server connections. The DNA prooftypes mentioned above are intended to mitigate the residual need for encrypted but unauthenticated connections in these scenarios.</t>
</section>
<section title="Server Name Indication" anchor="rec-sni">
<t>Although there is no harm in supporting the TLS Server Name Indication (SNI) extension <xref target='RFC6066'/>, this is not necessary since the same function is served in XMPP by the 'to' address of the initial stream header as explained in Section 4.7.2 of <xref target='RFC6120'/>.</t>
</section>
<section title="Human Factors" anchor="rec-user">
<t>It is strongly encouraged that XMPP clients provide ways for end users (and that XMPP servers provide ways for administrators) to complete the following tasks:</t>
<t>
<list style='symbols'>
<t>Determine if a given incoming or outgoing XML stream is encrypted using TLS.</t>
<t>Determine the version of TLS used for encryption of a given stream.</t>
<t>If authenticated encryption is used, determine how the connection was authenticated or verified (e.g., via PKI, DANE, POSH, or Server Dialback).</t>
<t>Inspect the certificate offered by an XMPP server.</t>
<t>Determine the cipher suite used to encrypt a connection.</t>
<t>Be warned if the certificate changes for a given server.</t>
</list>
</t>
</section>
</section>
<section title="Security Considerations" anchor="security">
<t>The use of TLS can help to limit the information available for correlation between the XMPP application layer and the underlying network and transport layers. As typically deployed, XMPP technologies do not leave application-layer routing data (such as XMPP 'to' and 'from' addresses) at rest on intermediate systems, since there is only one hop between any two given XMPP servers. As a result, encrypting all hops (sender's client to sender's server, sender's server to recipient's server, and recipient's server to recipient's client) can help to limit the amount of metadata that might leak.</t>
<t>It is possible that XMPP servers themselves might be compromised. In that case, per-hop encryption would not protect XMPP communications, and even end-to-end encryption of (parts of) XMPP stanza payloads would leave addressing information and XMPP roster data in the clear. By the same token, it is possible that XMPP clients (or the end-user devices on which such clients are installed) could also be compromised, leaving users utterly at the mercy of an adversary.</t>
<t>This document and related actions to strengthen the security of the XMPP network are based on the assumption that XMPP servers and clients have not been subject to widespread compromise. If this assumption is valid, then ubiquitous use of per-hop TLS channel encryption and more significant deployment of end-to-end object encryption technologies will serve to protect XMPP communications to a measurable degree, compared to the alternatives.</t>
<t>This document covers only communication over the XMPP network and does not take into account gateways to non-XMPP networks. As an example, for security considerations related to gateways between XMPP and the Session Initiation Protocol (SIP), see <xref target='RFC7247'/> and <xref target='RFC7572'/>.</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.RFC.2119" ?>
<?rfc include="reference.RFC.4949" ?>
<?rfc include="reference.RFC.5246" ?>
<?rfc include="reference.RFC.6120" ?>
<?rfc include="reference.RFC.6125" ?>
<!--draft-ietf-uta-tls-bcp is now RFC 7525-->
<?rfc include="reference.RFC.7525" ?>
</references>
<references title="Informative References">
<?rfc include="reference.RFC.3920" ?>
<?rfc include="reference.RFC.4033" ?>
<?rfc include="reference.RFC.4422" ?>
<?rfc include="reference.RFC.5386" ?>
<?rfc include="reference.RFC.6066" ?>
<?rfc include="reference.RFC.7247" ?>
<?rfc include="reference.RFC.7258" ?>
<?rfc include="reference.RFC.7457" ?>
<!--draft-ietf-stox-im is now RFC 7572-->
<?rfc include="reference.RFC.7572" ?>
<!--draft-ietf-dane-srv, Active - in RFC Ed Queue-->
<reference anchor="DANE-SRV">
<front>
<title>Using DNS-Based Authentication of Named Entities (DANE) TLSA records with SRV and MX records.</title>
<author initials="T" surname="Finch" fullname="Tony Finch">
<organization/>
</author>
<author initials="M" surname="Miller" fullname="Matthew Miller">
<organization/>
</author>
<author initials="P" surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
</author>
<date month="April" year="2015"/>
<abstract>
<t>The DANE specification (RFC 6698) describes how to use TLSA resource records in the DNS to associate a server's host name with its TLS certificate, where the association is secured with DNSSEC. However, application protocols that use SRV records (RFC 2782) to indirectly name the target server host names for a service domain cannot apply the rules from RFC 6698. Therefore this document provides guidelines that enable such protocols to locate and use TLSA records.</t>
</abstract>
</front>
<seriesInfo name="Work in Progress," value="draft-ietf-dane-srv-14"/>
</reference>
<!--draft-ietf-xmpp-dna, Active - I-D exists-->
<reference anchor='XMPP-DNA'>
<front>
<title>Domain Name Associations (DNA) in the Extensible Messaging and Presence Protocol (XMPP)</title>
<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
<organization />
</author>
<author initials='M' surname='Miller' fullname='Matthew Miller'>
<organization />
</author>
<date month='March' year='2015' />
<abstract><t>This document improves the security of the Extensible Messaging and Presence Protocol (XMPP) in two ways. First, it specifies how "prooftypes" can establish a strong association between a domain name and an XML stream. Second, it describes how to securely delegate a source domain to a derived domain, which is especially important in virtual hosting environments.</t></abstract>
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-xmpp-dna-10' />
</reference>
<!--draft-ietf-xmpp-posh, Active - I-D exists-->
<reference anchor="PKIX-POSH">
<front>
<title>PKIX over Secure HTTP (POSH)</title>
<author initials="M" surname="Miller" fullname="Matthew Miller">
<organization/>
</author>
<author initials="P" surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
</author>
<date month="February" year="2015"/>
<abstract>
<t>Experience has shown that it is extremely difficult to deploy proper PKIX certificates for TLS in multi-tenanted environments, since certification authorities will not issue certificates for hosted domains to hosting services, hosted domains do not want hosting services to hold their private keys, and hosting services wish to avoid liability for holding those keys. As a result, domains hosted in multi-tenanted environments often deploy non-HTTP applications such as email and instant messaging using certificates that identify the hosting service, not the hosted domain. Such deployments force end users and peer services to accept a certificate with an improper identifier, resulting in obvious security implications. This document defines two methods that make it easier to deploy certificates for proper server identity checking in non-HTTP application protocols. The first method enables the TLS client associated with a user agent or peer application server to obtain the end-entity certificate of a hosted domain over secure HTTP as an alternative to standard PKIX techniques. The second method enables a hosted domain to securely delegate a non-HTTP application to a hosting service using redirects provided by HTTPS itself or by a pointer in a file served over HTTPS at the hosted domain. While this approach was developed for use in the Extensible Messaging and Presence Protocol (XMPP) as a Domain Name Association prooftype, it can be applied to any non-HTTP application protocol.</t>
</abstract>
</front>
<seriesInfo name="Work in Progress," value="draft-ietf-xmpp-posh-04"/>
</reference>
<reference anchor="XEP-0138" target="http://xmpp.org/extensions/xep-0138.html" >
<front>
<title>Stream Compression</title>
<author initials="J." surname="Hildebrand" fullname="Joe Hildebrand">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<date month="May" year="2009"/>
</front>
<seriesInfo name="XSF XEP" value="0138"/>
</reference>
<reference anchor="XEP-0170" target="http://xmpp.org/extensions/xep-0170.html">
<front>
<title>Recommended Order of Stream Feature Negotiation</title>
<author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<date month="January" year="2007"/>
</front>
<seriesInfo name="XSF XEP" value="0170"/>
</reference>
<reference anchor="XEP-0198" target="http://xmpp.org/extensions/xep-0198.html">
<front>
<title>Stream Management</title>
<author initials="J." surname="Karneges" fullname="Justin Karneges">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="J." surname="Hildebrand" fullname="Joe Hildebrand">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="F." surname="Forno" fullname="Fabio Forno">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="D." surname="Cridland" fullname="Dave Cridland">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="M." surname="Wild" fullname="Matthew Wild">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<date month="June" year="2011"/>
</front>
<seriesInfo name="XSF XEP" value="0198"/>
</reference>
<reference anchor="XEP-0220" target="http://xmpp.org/extensions/xep-0220.html">
<front>
<title>Server Dialback</title>
<author initials="J." surname="Miller" fullname="Jeremie Miller">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="P." surname="Hancke" fullname="Philipp Hancke">
<organization/>
<address>
<email/>
</address>
</author>
<date month="August" year="2014"/>
</front>
<seriesInfo name="XSF XEP" value="0220"/>
</reference>
</references>
<section title="Implementation Notes" anchor="impl">
<t>Some governments enforce legislation prohibiting the export of strong cryptographic technologies. Nothing in this document ought to be taken as advice to violate such prohibitions.</t>
</section>
<section title="Acknowledgements" numbered="no">
<t>The authors would like to thank the following individuals for their input: Dave Cridland, Philipp Hancke, Olle Johansson, Steve Kille, Tobias Markmann, Matt Miller, and Rene Treffer.</t>
<t>Roni Even caught several important issues in his review on behalf of the General Area Review Team.</t>
<t>Ben Campbell, Spencer Dawkins, and Barry Leiba provided helpful input during IESG review.</t>
<t>Thanks to Leif Johansson and Orit Levin as chairs of the UTA WG, Ben Campbell and Joe Hildebrand as chairs of the XMPP WG, and Stephen Farrell as the sponsoring Area Director.</t>
</section>
</back>
</rfc>