forked from xsf/xeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xep-0035.xml
129 lines (102 loc) · 7.52 KB
/
xep-0035.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
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM "xep.ent">
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>SSL/TLS Integration</title>
<abstract>NOTE WELL: this specification was retracted on 2003-11-05 since the topic is addressed definitively in XMPP Core. Please refer to XMPP Core for further information.</abstract>
&LEGALNOTICE;
<number>0035</number>
<status>Retracted</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies/>
<supersedes/>
<supersededby><spec>XMPP Core</spec></supersededby>
<shortname>N/A</shortname>
<author>
<firstname>Robert</firstname>
<surname>Norris</surname>
<email>rob@cataclysm.cx</email>
<jid>rob@cataclysm.cx</jid>
</author>
<revision>
<version>0.2</version>
<date>2003-11-05</date>
<initials>psa</initials>
<remark>The status of this specification has been changed to Retracted since it has been superseded by XMPP Core.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2002-06-14</date>
<initials>rn</initials>
<remark>Initial version.</remark>
</revision>
</header>
<section1 topic='Introduction'>
<p>The TLS protocol <note><link url="http://www.ietf.org/rfc/rfc2246.txt">RFC 2246</link></note> (formerly known as SSL) provides a way to secure an application protocol from tampering and eavesdropping. The option of using such security is desirable for Jabber due to common connection eavesdropping and hijacking attacks. <note>See <link url="http://www.ietf.org/rfc/rfc1704.txt">RFC 1704</link>, "On Internet Authentication."</note><note>This paragraph adapted from <link url="http://www.ietf.org/rfc/rfc2595.txt">RFC 2595</link>, section 1.</note></p>
<p>Traditionally, Jabber servers has supported TLS by utilising a "wrapper" around the standard protocol stream. This wrapper usually listens on a port other than those listed in the IANA registry <note>The Internet Assigned Numbers Authority defines jabber-client (port 5222) and jabber-server (port 5269) as the standard Jabber ports; see <link url='http://www.iana.org/assignments/port-numbers'>http://www.iana.org/assignments/port-numbers</link>.</note> (commonly 5223 for client-to-server communications and 5270 for server-to-server communications). In the case of client-to-server communications, clients must initiate a TLS session immediately after connecting, before beginning the normal XML stream. This method of utilising TLS is typical of many servers that implement stream-based protocols, but has a number of flaws, which are outlined in section 7 of <link url="http://www.ietf.org/rfc/rfc2595.txt">RFC 2595</link>. Accordingly, the use of port 5223 and port 5270 for secure sessions is deprecated.</p>
<p>This document describes an extension to the Jabber XML stream that provides a "STARTTLS" command which clients may invoke on an insecure stream to secure it. This extension is modelled on <link url="http://www.ietf.org/rfc/rfc2595.txt">RFC 2595</link>, which describes the STARTTLS extension for the IMAP <note><link url="http://www.ietf.org/rfc/rfc2060">RFC 2060</link></note>, POP3 <note><link url="http://www.ietf.org/rfc/rfc1939">RFC 1939</link></note> and ACAP <note><link url="http://www.ietf.org/rfc/rfc2244">RFC 2244</link></note> protocols. A future document (or an addition to this document) will define TLS support within server-to-server streams.</p>
</section1>
<section1 topic='Protocol'>
<section2 topic="Overview">
<p>This protocol operates over the standard Jabber client connection on port 5222.</p>
<p>The namespace identifier for this protocol is http://www.ietf.org/rfc/rfc2595.txt.</p>
<p>The following examples show the dialogue between a client [C] and a server [S].</p>
<p>
</p>
</section2>
<section2 topic="Stream initialization">
<p>The client begins by requesting the use of STARTTLS as part of the normal Jabber stream negotiation. The server responds by informing the client whether or not it supports STARTTLS. It does this in the normal stream negotiation response:</p>
<example caption="Stream initialization">
C: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
xmlns:tls='http://www.ietf.org/rfc/rfc2595.txt'
to='jabber.org'>
S: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
xmlns:tls='http://www.ietf.org/rfc/rfc2595.txt'
id='12345678'>
</example>
<p>In the event that a server does not support the STARTTLS extension, it will respond with the normal stream negotiation response:</p>
<example caption="Stream initialization; server not supporting STARTTLS">
C: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
xmlns:tls='http://www.ietf.org/rfc/rfc2595.txt'
to='jabber.org'>
S: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
id='12345678'>
</example>
</section2>
<section2 topic="TLS negotiation">
<p>To begin the TLS negotiation, the client issues the STARTTLS command:</p>
<example caption="STARTTLS request">
C: <tls:starttls/>
</example>
<p>When the server is ready to begin the TLS negotiation, it will close the XML stream, but will keep the underlying connection to the client open:</p>
<example caption="STARTTLS response">
S: </stream:stream>
</example>
<p>The client now begins a normal TLS negotiation by sending the TLS ClientHello command. Upon completion of the TLS negotiation, the client reissues the XML stream initialization:</p>
<example caption="Stream initialization">
C: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
to='jabber.org'>
S: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
id='12345678'>
</example>
<p>This is necessary, since any information about the stream presented by the server or the client may have been modified by an attacker.</p>
<p>Note that once the secure channel has been established, the server must not advertise or allow the use of the STARTTLS command.</p>
</section2>
</section1>
<section1 topic="Certificate-based authentication">
<p>TLS allows clients to be authenticated by verifying the certificate that they present during the TLS negotiation. This can be done in conjunction with the Jabber SASL profile (see &xep0034;) and the EXTERNAL mechanism.</p>
<p>If a client authenticates with a certificate using the TLS authentication, and the client requests the use of SASL in the second XML stream negotiation (over the secure channel), servers supporting certificate-based authentication should add the EXTERNAL mechanism to the list of supported authentication mechanisms. If the client then requests this mechanism, the server should automatically inform the user that authentication was successful. See &rfc2222; and <cite>XEP-0034</cite> for more information.</p>
<p>Servers implementing STARTTLS functionality are not required to implement certificate-based authentication.</p>
</section1>
</xep>