idnits 2.17.1 draft-ietf-xmpp-core-19.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The exact meaning of the all-uppercase expression 'NOT REQUIRED' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 26, 2003) is 7481 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: '43' is mentioned on line 481, but not defined -- Looks like a reference, but probably isn't: 'RFCXXXX' on line 2870 -- Possible downref: Non-RFC (?) normative reference: ref. '1' ** Downref: Normative reference to an Informational RFC: RFC 2779 (ref. '2') ** Obsolete normative reference: RFC 793 (ref. '4') (Obsoleted by RFC 9293) -- Possible downref: Non-RFC (?) normative reference: ref. '5' ** Obsolete normative reference: RFC 3491 (ref. '6') (Obsoleted by RFC 5891) ** Obsolete normative reference: RFC 3454 (ref. '7') (Obsoleted by RFC 7564) ** Obsolete normative reference: RFC 2234 (ref. '8') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2373 (ref. '9') (Obsoleted by RFC 3513) -- Possible downref: Non-RFC (?) normative reference: ref. '10' ** Obsolete normative reference: RFC 2246 (ref. '11') (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2818 (ref. '12') (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 2222 (ref. '13') (Obsoleted by RFC 4422, RFC 4752) ** Obsolete normative reference: RFC 3548 (ref. '14') (Obsoleted by RFC 4648) ** Obsolete normative reference: RFC 3066 (ref. '16') (Obsoleted by RFC 4646, RFC 4647) ** Obsolete normative reference: RFC 2279 (ref. '17') (Obsoleted by RFC 3629) -- Possible downref: Non-RFC (?) normative reference: ref. '18' ** Obsolete normative reference: RFC 2078 (ref. '19') (Obsoleted by RFC 2743) == Outdated reference: A later version (-22) exists of draft-ietf-xmpp-im-18 -- Obsolete informational reference (is this intentional?): RFC 2616 (ref. '22') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 2396 (ref. '23') (Obsoleted by RFC 3986) -- Obsolete informational reference (is this intentional?): RFC 2060 (ref. '25') (Obsoleted by RFC 3501) -- Obsolete informational reference (is this intentional?): RFC 2535 (ref. '29') (Obsoleted by RFC 4033, RFC 4034, RFC 4035) Summary: 15 errors (**), 0 flaws (~~), 6 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Saint-Andre 3 Internet-Draft J. Miller 4 Expires: April 25, 2004 Jabber Software Foundation 5 October 26, 2003 7 XMPP Core 8 draft-ietf-xmpp-core-19 10 Status of this Memo 12 This document is an Internet-Draft and is in full conformance with 13 all provisions of Section 10 of RFC2026. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that other 17 groups may also distribute working documents as Internet-Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six months 20 and may be updated, replaced, or obsoleted by other documents at any 21 time. It is inappropriate to use Internet-Drafts as reference 22 material or to cite them other than as "work in progress." 24 The list of current Internet-Drafts can be accessed at http:// 25 www.ietf.org/ietf/1id-abstracts.txt. 27 The list of Internet-Draft Shadow Directories can be accessed at 28 http://www.ietf.org/shadow.html. 30 This Internet-Draft will expire on April 25, 2004. 32 Copyright Notice 34 Copyright (C) The Internet Society (2003). All Rights Reserved. 36 Abstract 38 This memo defines the core features of the Extensible Messaging and 39 Presence Protocol (XMPP), a protocol for streaming XML [1] elements 40 in order to exchange messages and presence information in close to 41 real time. While XMPP provides a generalized, extensible framework 42 for transporting structured information, it is used mainly for the 43 purpose of building instant messaging and presence applications that 44 meet the requirements of RFC 2779. 46 Table of Contents 48 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 6 49 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 6 50 1.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 51 1.3 Discussion Venue . . . . . . . . . . . . . . . . . . . . . 6 52 1.4 Intellectual Property Notice . . . . . . . . . . . . . . . 6 53 2. Generalized Architecture . . . . . . . . . . . . . . . . . 6 54 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 6 55 2.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . 7 56 2.3 Client . . . . . . . . . . . . . . . . . . . . . . . . . . 7 57 2.4 Gateway . . . . . . . . . . . . . . . . . . . . . . . . . 8 58 2.5 Network . . . . . . . . . . . . . . . . . . . . . . . . . 8 59 3. Addressing Scheme . . . . . . . . . . . . . . . . . . . . 8 60 3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 8 61 3.2 Domain Identifier . . . . . . . . . . . . . . . . . . . . 9 62 3.3 Node Identifier . . . . . . . . . . . . . . . . . . . . . 9 63 3.4 Resource Identifier . . . . . . . . . . . . . . . . . . . 9 64 3.5 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . 10 65 3.6 Determination of Addresses . . . . . . . . . . . . . . . . 10 66 4. XML Streams . . . . . . . . . . . . . . . . . . . . . . . 11 67 4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 11 68 4.2 Stream Attributes . . . . . . . . . . . . . . . . . . . . 13 69 4.2.1 Version Support . . . . . . . . . . . . . . . . . . . . . 14 70 4.3 Namespace Declarations . . . . . . . . . . . . . . . . . . 15 71 4.4 Stream Features . . . . . . . . . . . . . . . . . . . . . 15 72 4.5 Stream Encryption and Authentication . . . . . . . . . . . 15 73 4.6 Stream Errors . . . . . . . . . . . . . . . . . . . . . . 15 74 4.6.1 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 16 75 4.6.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 16 76 4.6.3 Defined Conditions . . . . . . . . . . . . . . . . . . . . 17 77 4.6.4 Application-Specific Conditions . . . . . . . . . . . . . 19 78 4.7 Simplified Stream Examples . . . . . . . . . . . . . . . . 19 79 5. Stream Encryption . . . . . . . . . . . . . . . . . . . . 21 80 5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 21 81 5.2 Narrative . . . . . . . . . . . . . . . . . . . . . . . . 23 82 5.3 Client-to-Server Example . . . . . . . . . . . . . . . . . 24 83 5.4 Server-to-Server Example . . . . . . . . . . . . . . . . . 26 84 6. Stream Authentication . . . . . . . . . . . . . . . . . . 28 85 6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 28 86 6.2 Narrative . . . . . . . . . . . . . . . . . . . . . . . . 29 87 6.3 SASL Definition . . . . . . . . . . . . . . . . . . . . . 31 88 6.4 SASL Errors . . . . . . . . . . . . . . . . . . . . . . . 32 89 6.5 Client-to-Server Example . . . . . . . . . . . . . . . . . 33 90 6.6 Server-to-Server Example . . . . . . . . . . . . . . . . . 36 91 7. Resource Binding . . . . . . . . . . . . . . . . . . . . . 39 92 8. Server Dialback . . . . . . . . . . . . . . . . . . . . . 41 93 8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 41 94 8.2 Order of Events . . . . . . . . . . . . . . . . . . . . . 42 95 8.3 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . 44 96 9. XML Stanzas . . . . . . . . . . . . . . . . . . . . . . . 47 97 9.1 Common Attributes . . . . . . . . . . . . . . . . . . . . 48 98 9.1.1 to . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 99 9.1.2 from . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 100 9.1.3 id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 101 9.1.4 type . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 102 9.1.5 xml:lang . . . . . . . . . . . . . . . . . . . . . . . . . 50 103 9.2 Basic Semantics . . . . . . . . . . . . . . . . . . . . . 50 104 9.2.1 Message Semantics . . . . . . . . . . . . . . . . . . . . 50 105 9.2.2 Presence Semantics . . . . . . . . . . . . . . . . . . . . 50 106 9.2.3 IQ Semantics . . . . . . . . . . . . . . . . . . . . . . . 51 107 9.3 Stanza Errors . . . . . . . . . . . . . . . . . . . . . . 52 108 9.3.1 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 52 109 9.3.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 53 110 9.3.3 Defined Conditions . . . . . . . . . . . . . . . . . . . . 54 111 9.3.4 Application-Specific Conditions . . . . . . . . . . . . . 56 112 10. XML Usage within XMPP . . . . . . . . . . . . . . . . . . 57 113 10.1 Restrictions . . . . . . . . . . . . . . . . . . . . . . . 57 114 10.2 XML Namespace Names and Prefixes . . . . . . . . . . . . . 57 115 10.2.1 Streams Namespace . . . . . . . . . . . . . . . . . . . . 57 116 10.2.2 Default Namespace . . . . . . . . . . . . . . . . . . . . 58 117 10.2.3 Dialback Namespace . . . . . . . . . . . . . . . . . . . . 58 118 10.3 Validation . . . . . . . . . . . . . . . . . . . . . . . . 59 119 10.4 Inclusion of Text Declaration . . . . . . . . . . . . . . 59 120 10.5 Character Encoding . . . . . . . . . . . . . . . . . . . . 59 121 11. IANA Considerations . . . . . . . . . . . . . . . . . . . 59 122 11.1 XML Namespace Name for TLS Data . . . . . . . . . . . . . 59 123 11.2 XML Namespace Name for SASL Data . . . . . . . . . . . . . 60 124 11.3 XML Namespace Name for Stream Errors . . . . . . . . . . . 60 125 11.4 XML Namespace Name for Resource Binding . . . . . . . . . 60 126 11.5 XML Namespace Name for Stanza Errors . . . . . . . . . . . 61 127 11.6 Nodeprep Profile of Stringprep . . . . . . . . . . . . . . 61 128 11.7 Resourceprep Profile of Stringprep . . . . . . . . . . . . 61 129 11.8 GSSAPI Service Name . . . . . . . . . . . . . . . . . . . 62 130 11.9 Port Numbers . . . . . . . . . . . . . . . . . . . . . . . 62 131 12. Internationalization Considerations . . . . . . . . . . . 62 132 13. Security Considerations . . . . . . . . . . . . . . . . . 62 133 13.1 High Security . . . . . . . . . . . . . . . . . . . . . . 62 134 13.2 Client-to-Server Communications . . . . . . . . . . . . . 63 135 13.3 Server-to-Server Communications . . . . . . . . . . . . . 64 136 13.4 Order of Layers . . . . . . . . . . . . . . . . . . . . . 65 137 13.5 Mandatory-to-Implement Technologies . . . . . . . . . . . 65 138 13.6 Firewalls . . . . . . . . . . . . . . . . . . . . . . . . 65 139 13.7 Use of base64 in SASL . . . . . . . . . . . . . . . . . . 65 140 13.8 Stringprep Profiles . . . . . . . . . . . . . . . . . . . 66 141 14. Server Rules for Handling XML Stanzas . . . . . . . . . . 67 142 14.1 No 'to' Address . . . . . . . . . . . . . . . . . . . . . 67 143 14.2 Foreign Domain . . . . . . . . . . . . . . . . . . . . . . 67 144 14.3 Subdomain . . . . . . . . . . . . . . . . . . . . . . . . 68 145 14.4 Mere Domain or Specific Resource . . . . . . . . . . . . . 68 146 14.5 Node in Same Domain . . . . . . . . . . . . . . . . . . . 68 147 15. Compliance Requirements . . . . . . . . . . . . . . . . . 69 148 15.1 Servers . . . . . . . . . . . . . . . . . . . . . . . . . 69 149 15.2 Clients . . . . . . . . . . . . . . . . . . . . . . . . . 69 150 Normative References . . . . . . . . . . . . . . . . . . . 70 151 Informative References . . . . . . . . . . . . . . . . . . 71 152 Authors' Addresses . . . . . . . . . . . . . . . . . . . . 72 153 A. Nodeprep . . . . . . . . . . . . . . . . . . . . . . . . . 72 154 A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 72 155 A.2 Character Repertoire . . . . . . . . . . . . . . . . . . . 73 156 A.3 Mapping . . . . . . . . . . . . . . . . . . . . . . . . . 73 157 A.4 Normalization . . . . . . . . . . . . . . . . . . . . . . 73 158 A.5 Prohibited Output . . . . . . . . . . . . . . . . . . . . 73 159 A.6 Bidirectional Characters . . . . . . . . . . . . . . . . . 74 160 B. Resourceprep . . . . . . . . . . . . . . . . . . . . . . . 74 161 B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 75 162 B.2 Character Repertoire . . . . . . . . . . . . . . . . . . . 75 163 B.3 Mapping . . . . . . . . . . . . . . . . . . . . . . . . . 75 164 B.4 Normalization . . . . . . . . . . . . . . . . . . . . . . 75 165 B.5 Prohibited Output . . . . . . . . . . . . . . . . . . . . 76 166 B.6 Bidirectional Characters . . . . . . . . . . . . . . . . . 76 167 C. XML Schemas . . . . . . . . . . . . . . . . . . . . . . . 76 168 C.1 Streams namespace . . . . . . . . . . . . . . . . . . . . 76 169 C.2 Stream error namespace . . . . . . . . . . . . . . . . . . 78 170 C.3 TLS namespace . . . . . . . . . . . . . . . . . . . . . . 79 171 C.4 SASL namespace . . . . . . . . . . . . . . . . . . . . . . 79 172 C.5 Resource binding namespace . . . . . . . . . . . . . . . . 81 173 C.6 Dialback namespace . . . . . . . . . . . . . . . . . . . . 81 174 C.7 Stanza error namespace . . . . . . . . . . . . . . . . . . 82 175 D. Differences Between Core Jabber Protocol and XMPP . . . . 83 176 D.1 Channel Encryption . . . . . . . . . . . . . . . . . . . . 84 177 D.2 Authentication . . . . . . . . . . . . . . . . . . . . . . 84 178 D.3 Resource Binding . . . . . . . . . . . . . . . . . . . . . 84 179 D.4 JID Processing . . . . . . . . . . . . . . . . . . . . . . 84 180 D.5 Error Handling . . . . . . . . . . . . . . . . . . . . . . 85 181 D.6 Internationalization . . . . . . . . . . . . . . . . . . . 85 182 D.7 Stream Version Attribute . . . . . . . . . . . . . . . . . 85 183 E. Revision History . . . . . . . . . . . . . . . . . . . . . 85 184 E.1 Changes from draft-ietf-xmpp-core-18 . . . . . . . . . . . 85 185 E.2 Changes from draft-ietf-xmpp-core-17 . . . . . . . . . . . 86 186 E.3 Changes from draft-ietf-xmpp-core-16 . . . . . . . . . . . 87 187 E.4 Changes from draft-ietf-xmpp-core-15 . . . . . . . . . . . 87 188 E.5 Changes from draft-ietf-xmpp-core-14 . . . . . . . . . . . 87 189 E.6 Changes from draft-ietf-xmpp-core-13 . . . . . . . . . . . 88 190 E.7 Changes from draft-ietf-xmpp-core-12 . . . . . . . . . . . 88 191 E.8 Changes from draft-ietf-xmpp-core-11 . . . . . . . . . . . 88 192 E.9 Changes from draft-ietf-xmpp-core-10 . . . . . . . . . . . 89 193 E.10 Changes from draft-ietf-xmpp-core-09 . . . . . . . . . . . 89 194 E.11 Changes from draft-ietf-xmpp-core-08 . . . . . . . . . . . 89 195 E.12 Changes from draft-ietf-xmpp-core-07 . . . . . . . . . . . 89 196 E.13 Changes from draft-ietf-xmpp-core-06 . . . . . . . . . . . 90 197 E.14 Changes from draft-ietf-xmpp-core-05 . . . . . . . . . . . 90 198 E.15 Changes from draft-ietf-xmpp-core-04 . . . . . . . . . . . 90 199 E.16 Changes from draft-ietf-xmpp-core-03 . . . . . . . . . . . 90 200 E.17 Changes from draft-ietf-xmpp-core-02 . . . . . . . . . . . 91 201 E.18 Changes from draft-ietf-xmpp-core-01 . . . . . . . . . . . 91 202 E.19 Changes from draft-ietf-xmpp-core-00 . . . . . . . . . . . 91 203 E.20 Changes from draft-miller-xmpp-core-02 . . . . . . . . . . 91 204 Intellectual Property and Copyright Statements . . . . . . 93 206 1. Introduction 208 1.1 Overview 210 The Extensible Messaging and Presence Protocol (XMPP) is an open XML 211 [1] protocol for near-real-time messaging, presence, and 212 request-response services. The basic syntax and semantics were 213 developed originally within the Jabber open-source community, mainly 214 in 1999. In 2002, the XMPP WG was chartered with developing an 215 adaptation of the Jabber protocol that would be suitable as an IETF 216 instant messaging (IM) and presence technology. As a result of work 217 by the XMPP WG, the current memo defines the core features of XMPP; 218 XMPP IM [21] defines the extensions required to provide the instant 219 messaging and presence functionality defined in RFC 2779 [2]. 221 1.2 Terminology 223 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 224 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 225 "OPTIONAL" in this document are to be interpreted as described in RFC 226 2119 [3]. 228 1.3 Discussion Venue 230 The authors welcome discussion and comments related to the topics 231 presented in this document. The preferred forum is the 232 mailing list, for which archives and subscription 233 information are available at . 236 1.4 Intellectual Property Notice 238 This document is in full compliance with all provisions of Section 10 239 of RFC 2026. Parts of this specification use the term "jabber" for 240 identifying namespaces and other protocol syntax. Jabber[tm] is a 241 registered trademark of Jabber, Inc. Jabber, Inc. grants permission 242 to the IETF for use of the Jabber trademark in association with this 243 specification and its successors, if any. 245 2. Generalized Architecture 247 2.1 Overview 249 Although XMPP is not wedded to any specific network architecture, to 250 date it usually has been implemented via a typical client-server 251 architecture, wherein a client utilizing XMPP accesses a server over 252 a TCP [4] socket. 254 The following diagram provides a high-level overview of this 255 architecture (where "-" represents communications that use XMPP and 256 "=" represents communications that use any other protocol). 258 C1 - S1 - S2 - C3 259 / \ 260 C2 - G1 = FN1 = FC1 262 The symbols are as follows: 264 o C1, C2, C3 -- XMPP clients 266 o S1, S2 -- XMPP servers 268 o G1 -- A gateway that translates between XMPP and the protocol(s) 269 used on a foreign (non-XMPP) messaging network 271 o FN1 -- A foreign messaging network 273 o FC1 -- A client on a foreign messaging network 275 2.2 Server 277 A server acts as an intelligent abstraction layer for XMPP 278 communications. Its primary responsibilities are to manage 279 connections from or sessions for other entities (in the form of XML 280 streams (Section 4) to and from authorized clients, servers, and 281 other entities) and to route appropriately-addressed XML stanzas 282 (Section 9) among such entities over XML streams. Most XMPP-compliant 283 servers also assume responsibility for the storage of data that is 284 used by clients (e.g., contact lists for users of XMPP-based instant 285 messaging and presence applications); in this case, the XML data is 286 processed directly by the server itself on behalf of the client and 287 is not routed to another entity. Compliant server implementations 288 MUST ensure in-order processing of XML stanzas between any two 289 entities. 291 2.3 Client 293 Most clients connect directly to a server over a TCP socket and use 294 XMPP to take full advantage of the functionality provided by a server 295 and any associated services. Although there is no necessary coupling 296 of an XML stream to a TCP socket (e.g., a client COULD connect via 297 HTTP [22] polling or some other mechanism), this specification 298 defines a binding of XMPP to TCP only. Multiple resources (e.g., 299 devices or locations) MAY connect simultaneously to a server on 300 behalf of each authorized client, with each resource differentiated 301 by the resource identifier of a JID (e.g., vs. 302 ) as defined under Addressing Scheme (Section 3). 303 The RECOMMENDED port for connections between a client and a server is 304 5222, as registered with the Internet Assigned Numbers Authority 305 (IANA) [5] (see Port Numbers (Section 11.9)). 307 2.4 Gateway 309 A gateway is a special-purpose server-side service whose primary 310 function is to translate XMPP into the protocol used by a foreign 311 (non-XMPP) messaging system, as well as to translate the return data 312 back into XMPP. Examples are gateways to Internet Relay Chat (IRC), 313 Short Message Service (SMS), SIMPLE, SMTP, and legacy instant 314 messaging networks such as AIM, ICQ, MSN Messenger, and Yahoo! 315 Instant Messenger. Communications between gateways and servers, and 316 between gateways and the foreign messaging system, are not defined in 317 this document. 319 2.5 Network 321 Because each server is identified by a network address and because 322 server-to-server communications are a straightforward extension of 323 the client-to-server protocol, in practice the system consists of a 324 network of servers that inter-communicate. Thus user-a@domain1 is 325 able to exchange messages, presence, and other information with 326 user-b@domain2. This pattern is familiar from messaging protocols 327 (such as SMTP) that make use of network addressing standards. 328 Communications between any two servers are OPTIONAL. If enabled, such 329 communications SHOULD occur over XML streams that are bound to TCP 330 sockets. The RECOMMENDED port for connections between servers is 331 5222, as registered with the Internet Assigned Numbers Authority 332 (IANA) [5] (see Port Numbers (Section 11.9)). 334 3. Addressing Scheme 336 3.1 Overview 338 An entity is anything that can be considered a network endpoint 339 (i.e., an ID on the network) and that can communicate using XMPP. All 340 such entities are uniquely addressable in a form that is consistent 341 with RFC 2396 [23]. For historical reasons, the address of such an 342 entity is called a Jabber Identifier or JID. A valid JID contains a 343 set of ordered elements formed of a domain identifier, node 344 identifier, and resource identifier in the following format: 345 [node@]domain[/resource]. Each allowable portion of a JID (node 346 identifier, domain identifier, and resource identifier) may be up to 347 1023 bytes in length, resulting in a maximum total size (including 348 the '@' and '/' separators) of 3071 bytes. 350 All JIDs are based on the foregoing structure. The most common use of 351 this structure is to identify an instant messaging user, the server 352 to which the user connects, and the user's active session or 353 connection (e.g., a specific client) in the form of . However, node types other than clients are possible; for 355 example, a specific chat room offered by a multi-user chat service 356 could be addressed as (where "room" is the name of the 357 chat room and "service" is the hostname of the multi-user chat 358 service) and a specific occupant of such a room could be addressed as 359 (where "nick" is the occupant's room nickname). 360 Many other JID types are possible (e.g., could be a 361 server-side script or service). 363 3.2 Domain Identifier 365 The domain identifier is the primary identifier and is the only 366 REQUIRED element of a JID (a mere domain identifier is a valid JID). 367 It usually represents the network gateway or "primary" server to 368 which other entities connect for XML routing and data management 369 capabilities. However, the entity referenced by a domain identifier 370 is not always a server, and may be a service that is addressed as a 371 subdomain of a server and that provides functionality above and 372 beyond the capabilities of a server (e.g., a multi-user chat service, 373 a user directory, or a gateway to a foreign messaging system). 375 The domain identifier for every server or service that will 376 communicate over a network SHOULD resolve to a Fully Qualified Domain 377 Name. A domain identifier MUST be not more than 1023 bytes in length 378 and MUST conform to the Nameprep [6] profile of stringprep [7]. 380 3.3 Node Identifier 382 The node identifier is an optional secondary identifier placed before 383 the domain identifier and separated from the latter by the '@' 384 character. It usually represents the entity requesting and using 385 network access provided by the server or gateway (i.e., a client), 386 although it can also represent other kinds of entities (e.g., a chat 387 room associated with a multi-user chat service). The entity 388 represented by a node identifier is addressed within the context of a 389 specific domain; within instant messaging and presence applications 390 of XMPP this address is called a "bare JID" and is of the form 391 . 393 A node identifier MUST be no more than 1023 bytes in length and MUST 394 conform to the Nodeprep (Appendix A) profile of stringprep [7]. 396 3.4 Resource Identifier 397 The resource identifier is an optional tertiary identifier placed 398 after the domain identifier and separated from the latter by the '/' 399 character. A resource identifier may modify either a or 400 mere address. It usually represents a specific session, 401 connection (e.g., a device or location), or object (e.g., a 402 participant in a multi-user chat room) belonging to the entity 403 associated with a node identifier. A resource identifier is opaque to 404 both servers and other clients, and is typically defined by a client 405 implementation when it provides the information necessary to complete 406 Resource Binding (Section 7) (although it may be generated by a 407 server on behalf of a client). An entity may maintain multiple 408 resources simultaneously. 410 A resource identifier MUST be no more than 1023 bytes in length and 411 MUST conform to the Resourceprep (Appendix B) profile of stringprep 412 [7]. 414 3.5 Formal Syntax 416 The syntax for a JID is defined below using Augmented Backus-Naur 417 Form as defined in RFC 2234 [8]. The IPv4address and IPv6address 418 rules are defined in Appendix B of RFC 2373 [9]; the hostname rule is 419 defined in Section 3.2.2 of RFC 2396 [23]; the allowable character 420 sequences that conform to the node rule are defined by the Nodeprep 421 (Appendix A) profile of stringprep [7] as documented in this memo; 422 the allowable character sequences that conform to the resource rule 423 are defined by the Resourceprep (Appendix B) profile of stringprep 424 [7] as documented in this memo. 426 jid = [ node "@" ] domain [ "/" resource ] 427 domain = hostname / IPv4address / IPv6address 429 3.6 Determination of Addresses 431 After Stream Authentication (Section 6) and, if appropriate, Resource 432 Binding (Section 7), the receiving entity for a stream MUST determine 433 the initiating entity's JID. 435 For server-to-server communications, the initiating entity's JID 436 SHOULD be the authorization identity, derived from the authentication 437 identity as defined in RFC 2222 [13] if no authorization identity was 438 specified during stream authentication. 440 For client-to-server communications, the "bare JID" () 441 SHOULD be the authorization identity, derived from the authentication 442 identity as defined in RFC 2222 [13] if no authorization identity was 443 specified during stream authentication; the resource identifier 444 portion of the "full JID" () SHOULD be the 445 resource identifier negotiated by the client and server during 446 Resource Binding (Section 7). 448 The receiving entity MUST ensure that the resulting JID (including 449 node identifier, domain identifier, resource identifier, and 450 separator characters) conforms to the rules and formats defined 451 earlier in this section. 453 4. XML Streams 455 4.1 Overview 457 Two fundamental concepts make possible the rapid, asynchronous 458 exchange of relatively small payloads of structured information 459 between presence-aware entities: XML streams and XML stanzas. These 460 terms are defined as follows: 462 Definition of XML Stream: An XML stream is a container for the 463 exchange of XML elements between any two entities over a network. 464 An XML stream is negotiated from an initiating entity (usually a 465 client or server) to a receiving entity (usually a server), 466 normally over a TCP socket, and corresponds to the initiating 467 entity's "session" with the receiving entity. The start of the XML 468 stream is denoted unambiguously by an opening XML tag 469 (with appropriate attributes and namespace declarations), while 470 the end of the XML stream is denoted unambiguously by a closing 471 XML tag. An XML stream is unidirectional; in order to 472 enable bidirectional information exchange, the initiating entity 473 and receiving entity MUST negotiate one stream in each direction 474 (the "initial stream" and the "response stream"), normally over 475 the same TCP connection. 477 Definition of XML Stanza: An XML stanza is a discrete semantic unit 478 of structured information that is sent from one entity to another 479 over an XML stream. An XML stanza exists at the direct child level 480 of the root element and is said to be well-balanced if 481 it matches production [43] content of the XML specification [1]). 482 The start of any XML stanza is denoted unambiguously by the 483 element start tag at depth=1 of the XML stream (e.g., ), 484 and the end of any XML stanza is denoted unambiguously by the 485 corresponding close tag at depth=1 (e.g., ). An XML 486 stanza MAY contain child elements (with accompanying attributes, 487 elements, and CDATA) as necessary in order to convey the desired 488 information. The only defined XML stanzas are , 489 , and as defined under XML Stanzas (Section 9); 490 an XML element sent for the purpose of stream encryption (Section 491 5), stream authentication (Section 6), or server dialback (Section 492 8) is not considered to be an XML stanza. 494 Consider the example of a client's session with a server. In order to 495 connect to a server, a client MUST initiate an XML stream by sending 496 an opening tag to the server, optionally preceded by a text 497 declaration specifying the XML version and the character encoding 498 supported (see Inclusion of Text Declaration (Section 10.4); see also 499 Character Encoding (Section 10.5)). Subject to local policies and 500 service provisioning, the server SHOULD then reply with a second XML 501 stream back to the client, again optionally preceded by a text 502 declaration. Once the client has completed Stream Authentication 503 (Section 6), the client MAY send an unbounded number of XML stanzas 504 over the stream to any recipient on the network. When the client 505 desires to close the stream, it simply sends a closing tag 506 to the server (alternatively, the stream may be closed by the 507 server), after which both the client and server SHOULD close the 508 underlying TCP connection as well. 510 Those who are accustomed to thinking of XML in a document-centric 511 manner may wish to view a client's session with a server as 512 consisting of two open-ended XML documents: one from the client to 513 the server and one from the server to the client. From this 514 perspective, the root element can be considered the 515 document entity for each "document", and the two "documents" are 516 built up through the accumulation of XML stanzas sent over the two 517 XML streams. However, this perspective is a convenience only, and 518 XMPP does not deal in documents but in XML streams and XML stanzas. 520 In essence, then, an XML stream acts as an envelope for all the XML 521 stanzas sent during a session. We can represent this in a simplistic 522 fashion as follows: 524 |--------------------| 525 | | 526 |--------------------| 527 | | 528 | | 529 | | 530 |--------------------| 531 | | 532 | | 533 | | 534 |--------------------| 535 | | 536 | | 537 | | 538 |--------------------| 539 | ... | 540 |--------------------| 541 | | 542 |--------------------| 544 4.2 Stream Attributes 546 The attributes of the stream element are as follows: 548 o to -- The 'to' attribute SHOULD be used only in the XML stream 549 header from the initiating entity to the receiving entity, and 550 MUST be set to the JID of the receiving entity. There SHOULD be no 551 'to' attribute set in the XML stream header by which the receiving 552 entity replies to the initiating entity; however, if a 'to' 553 attribute is included, it SHOULD be silently ignored by the 554 initiating entity. 556 o from -- The 'from' attribute SHOULD be used only in the XML stream 557 header from the receiving entity to the initiating entity, and 558 MUST be set to the JID of the receiving entity granting access to 559 the initiating entity. There SHOULD be no 'from' attribute on the 560 XML stream header sent from the initiating entity to the receiving 561 entity; however, if a 'from' attribute is included, it SHOULD be 562 silently ignored by the receiving entity. 564 o id -- The 'id' attribute SHOULD be used only in the XML stream 565 header from the receiving entity to the initiating entity. This 566 attribute is a unique identifier created by the receiving entity 567 to function as a session key for the initiating entity's streams 568 with the receiving entity, and MUST be unique within the receiving 569 application (normally a server). There SHOULD be no 'id' attribute 570 on the XML stream header sent from the initiating entity to the 571 receiving entity; however, if an 'id' attribute is included, it 572 SHOULD be silently ignored by the receiving entity. 574 o xml:lang -- An 'xml:lang' attribute (as defined in Section 2.12 of 575 the XML specification [1]) SHOULD be included by the initiating 576 entity on the header for the initial stream to specify the default 577 language of any human-readable XML character data it sends over 578 that stream. If included, the receiving entity SHOULD remember 579 that value as the default for both the initial stream and the 580 response stream; if not included, the receiving entity SHOULD use 581 a configurable default value for both streams, which it MUST 582 communicate in the header for the response stream. For all stanzas 583 sent over the initial stream, if the initiating entity does not 584 include an 'xml:lang' attribute, the receiving entity SHOULD apply 585 the default value; if the initiating entity does include an 586 'xml:lang' attribute, the receiving entity MUST NOT modify or 587 delete it (see also xml:lang (Section 9.1.5)). The value of the 588 'xml:lang' attribute MUST be an NMTOKEN and MUST conform to the 589 format defined in RFC 3066 [16]. 591 o version -- The presence of the version attribute set to a value of 592 "1.0" signals support for the stream-related protocols (including 593 stream features) defined in this specification. Detailed rules 594 regarding generation and handling of this attribute are defined 595 below. 597 We can summarize as follows: 599 | initiating to receiving | receiving to initiating 600 ---------+---------------------------+----------------------- 601 to | hostname of receiver | silently ignored 602 from | silently ignored | hostname of receiver 603 id | silently ignored | session key 604 xml:lang | default language | default language 605 version | signals XMPP 1.0 support | signals XMPP 1.0 support 607 4.2.1 Version Support 609 The following rules apply to the generation and handling of the 610 'version' attribute: 612 1. If the initiating entity complies with the XML streams protocol 613 defined herein (including Stream Encryption (Section 5), Stream 614 Authentication (Section 6), and Stream Errors (Section 4.6)), it 615 MUST include the 'version' attribute in the XML stream header it 616 sends to the receiving entity, and it MUST set the value of the 617 'version' attribute to "1.0". 619 2. If the initiating entity includes the 'version' attribute set to 620 a value of "1.0" in its stream header and the receiving entity 621 supports XMPP 1.0, the receiving entity MUST reciprocate by 622 including the 'version' attribute set to a value of "1.0" in its 623 stream header response. 625 3. If the initiating entity does not include the 'version' attribute 626 in its stream header, the receiving entity still SHOULD include 627 the 'version' attribute set to a value of "1.0" in its stream 628 header response. 630 4. If the initiating entity includes the 'version' attribute set to 631 a value other than "1.0", the receiving entity SHOULD include the 632 'version' attribute set to a value of "1.0" in its stream header 633 response, but MAY at its discretion generate an 634 stream error and terminate the XML stream 635 and underlying TCP connection. 637 5. If the receiving entity includes the 'version' attribute set to a 638 value other than "1.0" in its stream header response, the 639 initiating entity SHOULD generate an 640 stream error and terminate the XML stream and underlying TCP 641 connection. 643 4.3 Namespace Declarations 645 The stream element MUST possess both a streams namespace declaration 646 and a default namespace declaration (as "namespace declaration" is 647 defined in the XML namespaces specification [10]). For detailed 648 information regarding the streams namespace and default namespace, 649 see Namespace Names and Prefixes (Section 10.2). 651 4.4 Stream Features 653 If the initiating entity includes the 'version' attribute set to a 654 value of "1.0" in the initial stream header, the receiving entity 655 MUST send a child element (prefixed by the streams 656 namespace prefix) to the initiating entity in order to announce any 657 stream-level features that can be negotiated (or capabilities that 658 otherwise need to be advertised). Currently this is used only for 659 Stream Encryption (Section 5), Stream Authentication (Section 6), and 660 Resource Binding (Section 7) as defined herein, and for Session 661 Establishment as defined in XMPP IM [21]; however, the stream 662 features functionality could be used to advertise other negotiable 663 features in the future. If an entity does not understand or support 664 some features, it SHOULD silently ignore them. 666 4.5 Stream Encryption and Authentication 668 XML streams in XMPP 1.0 SHOULD be encrypted as defined under Stream 669 Encryption (Section 5) and MUST be authenticated as defined under 670 Stream Authentication (Section 6). If the initiating entity attempts 671 to send an XML Stanza (Section 9) before the stream has been 672 authenticated, the receiving entity SHOULD return a 673 stream error to the initiating entity and then terminate both the XML 674 stream and the underlying TCP connection. 676 4.6 Stream Errors 678 The root stream element MAY contain an child element that is 679 prefixed by the streams namespace prefix. The error child MUST be 680 sent by a compliant entity (usually a server rather than a client) if 681 it perceives that a stream-level error has occurred. 683 4.6.1 Rules 685 The following rules apply to stream-level errors: 687 o It is assumed that all stream-level errors are unrecoverable; 688 therefore, if an error occurs at the level of the stream, the 689 entity that detects the error MUST send a stream error to the 690 other entity, send a closing tag, and terminate the 691 underlying TCP connection. 693 o If the error occurs while the stream is being set up, the 694 receiving entity MUST still send the opening tag, include 695 the element as a child of the stream element, send the 696 closing tag, and terminate the underlying TCP 697 connection. In this case, if the initiating entity provides an 698 unknown host in the 'to' attribute (or provides no 'to' attribute 699 at all), the server SHOULD provide the server's authoritative 700 hostname in the 'from' attribute of the stream header sent before 701 termination. 703 4.6.2 Syntax 705 The syntax for stream errors is as follows: 707 708 709 710 OPTIONAL descriptive text 711 712 [OPTIONAL application-specific condition element] 713 715 The element: 717 o MUST contain a child element corresponding to one of the defined 718 stanza error conditions defined below; this element MUST be 719 qualified by the 'urn:ietf:params:xml:ns:xmpp-streamstreams' 720 namespace (this namespace name adheres to the format defined in 721 The IETF XML Registry [24]) 723 o MAY contain a child containing CDATA that describes the 724 error in more detail; this element MUST be qualified by the 725 'urn:ietf:params:xml:ns:xmpp-streams' namespace and SHOULD possess 726 an 'xml:lang' attribute 728 o MAY contain a child element for an application-specific error 729 condition; this element MUST be qualified by an 730 application-defined namespace, and its structure is defined by 731 that namespace 733 The element is OPTIONAL. If included, it SHOULD be used only 734 to provide descriptive or diagnostic information that supplements the 735 meaning of a defined condition or application-specific condition. It 736 SHOULD NOT be interpreted programmatically by an application. It 737 SHOULD NOT be used as the error message presented to a user, but MAY 738 be shown in addition to the error message associated with the 739 included condition element (or elements). 741 4.6.3 Defined Conditions 743 The following stream-level error conditions are defined: 745 o -- the entity has sent XML that cannot be processed; 746 this error MAY be used rather than more specific XML-related 747 errors such as , , 748 , , and 749 , although the more specific errors are 750 preferred. 752 o -- the entity has sent a namespace prefix 753 that is unsupported, or has sent no namespace prefix on an element 754 that requires such a prefix (see XML Namespace Names and Prefixes 755 (Section 10.2)). 757 o -- the server is closing the active stream for this 758 entity because a new stream has been initiated that conflicts with 759 the existing stream. 761 o -- the entity has not generated any traffic 762 over the stream for some period of time (configurable according to 763 a local service policy). 765 o -- the value of the 'to' attribute provided by the 766 initiating entity in the stream header corresponds to a hostname 767 that is no longer hosted by the server. 769 o -- the value of the 'to' attribute provided by the 770 initiating entity in the stream header does not correspond to a 771 hostname that is hosted by the server. 773 o -- a stanza sent between two servers lacks 774 a 'to' or 'from' attribute (or the attribute has no value). 776 o -- the server has experienced a 777 misconfiguration or an otherwise-undefined internal error that 778 prevents it from servicing the stream. 780 o -- the JID or hostname provided in a 'from' 781 address does not match an authorized JID or validated domain 782 negotiated between servers via SASL or dialback, or between a 783 client and a server via authentication and resource authorization. 785 o -- the stream ID or dialback ID is invalid or does 786 not match an ID previously provided. 788 o -- the streams namespace name is something 789 other than "http://etherx.jabber.org/streams" or the dialback 790 namespace name is something other than "jabber:server:dialback" 791 (see XML Namespace Names and Prefixes (Section 10.2)). 793 o -- the entity has sent invalid XML over the stream 794 to a server that performs validation (see Validation (Section 795 10.3)). 797 o -- the entity has attempted to send data before 798 the stream has been authenticated, or otherwise is not authorized 799 to perform an action related to stream negotiation; the receiving 800 entity MUST NOT process the offending stanza before sending the 801 stream error. 803 o -- the entity has violated some local service 804 policy; the server MAY choose to specify the policy in the 805 element. 807 o -- the server is unable to properly 808 connect to a remote resource that is required for authentication 809 or authorization. 811 o -- the server lacks the system resources 812 necessary to service the stream. 814 o -- the entity has attempted to send restricted 815 XML features such as a comment, processing instruction, DTD, 816 entity reference, or unescaped character (see Restrictions 817 (Section 10.1)). 819 o -- the server will not provide service to the 820 initiating entity but is redirecting traffic to another host; the 821 server SHOULD specify the alternate hostname or IP address in the 822 CDATA of the element. 824 o -- the server is being shut down and all active 825 streams are being closed. 827 o -- the error condition is not one of those 828 defined by the other conditions in this list; this error condition 829 SHOULD be used only in conjunction with an application-specific 830 condition. 832 o -- the initiating entity has encoded the 833 stream in an encoding that is not supported by the server (see 834 Character Encoding (Section 10.5)). 836 o -- the initiating entity has sent a 837 first-level child of the stream that is not supported by the 838 server. 840 o -- the value of the 'version' attribute 841 provided by the initiating entity in the stream header specifies a 842 version of XMPP that is not supported by the server; the server 843 MAY specify the version(s) it supports in the element. 845 o -- the initiating entity has sent XML that 846 is not well-formed as defined by the XML specification [1]. 848 4.6.4 Application-Specific Conditions 850 As noted, an application MAY provide application-specific stream 851 error information by including a properly-namespaced child in the 852 error element. The application-specific element SHOULD supplement or 853 further qualify a defined element. Thus the element will 854 contain two or three child elements: 856 857 859 860 Some special application diagnostic information! 861 862 863 864 866 4.7 Simplified Stream Examples 868 This section contains two simplified examples of a stream-based 869 "session" of a client on a server (where the "C" lines are sent from 870 the client to the server, and the "S" lines are sent from the server 871 to the client); these examples are included for the purpose of 872 illustrating the concepts introduced thus far. 874 A basic "session": 876 C: 877 882 S: 883 889 ... encryption, authentication, and resource binding ... 890 C: 893 C: Art thou not Romeo, and a Montague? 894 C: 895 S: 898 S: Neither, fair saint, if either thee dislike. 899 S: 900 C: 901 S: 903 A "session" gone bad: 905 C: 906 911 S: 912 919 ... encryption, authentication, and resource binding ... 920 C: 921 Bad XML, no closing body tag! 922 923 S: 924 926 927 S: 929 5. Stream Encryption 931 5.1 Overview 933 XMPP includes a method for securing the stream from tampering and 934 eavesdropping. This channel encryption method makes use of the 935 Transport Layer Security (TLS) [11] protocol, along with a "STARTTLS" 936 extension that is modelled after similar extensions for the IMAP 937 [25], POP3 [26], and ACAP [27] protocols as described in RFC 2595 938 [28]. The namespace name for the STARTTLS extension is 939 'urn:ietf:params:xml:ns:xmpp-tls', which adheres to the format 940 defined in The IETF XML Registry [24]. 942 An administrator of a given domain MAY require the use of TLS for 943 client-to-server communications, server-to-server communications, or 944 both. Clients SHOULD use TLS to secure the streams prior to 945 attempting to complete Stream Authentication (Section 6), and servers 946 SHOULD use TLS between two domains for the purpose of securing 947 server-to-server communications. 949 The following rules apply: 951 1. An initiating entity that complies with this specification MUST 952 include the 'version' attribute set to a value of "1.0" in the 953 initial stream header. 955 2. If the TLS negotiation occurs between two servers, 956 communications MUST NOT proceed until the Domain Name System 957 (DNS) hostnames asserted by the servers have been resolved (see 958 Server-to-Server Communications (Section 13.3)). 960 3. When a receiving entity that complies with this specification 961 receives an initial stream header that includes the 'version' 962 attribute set to a value of "1.0", after sending a stream header 963 in reply (including the version flag) it MUST include a 964 element (qualified by the 965 'urn:ietf:params:xml:ns:xmpp-tls' namespace) along with the list 966 of other stream features it supports. 968 4. If the initiating entity chooses to use TLS for stream 969 encryption, TLS negotiation MUST be completed before proceeding 970 to SASL negotiation; this order of negotiation is required in 971 order to help safeguard authentication information sent during 972 SASL negotiation, as well as to make it possible to base the use 973 of the SASL EXTERNAL mechanism on a certificate provided during 974 prior TLS negotiation. 976 5. During TLS negotiation, an entity MUST NOT send any white space 977 characters (matching production [3] content of the XML 978 specification [1]) within the root stream element as separators 979 between elements (any white space characters shown in the TLS 980 examples below are included for the sake of readability only); 981 this prohibition helps to ensure proper security layer byte 982 precision. 984 6. The receiving entity MUST consider the TLS negotiation to have 985 begun immediately after sending the closing ">" character of the 986 element. The initiating entity MUST consider the TLS 987 negotiation to have begun immediately after receiving the 988 closing ">" character of the element from the 989 receiving entity. 991 7. The initiating entity MUST validate the certificate presented by 992 the receiving entity; there are two cases: 994 Case 1 -- The initiating entity has been configured with a set 995 of trusted root certificates: Normal certificate validation 996 processing is appropriate, and SHOULD follow the rules 997 defined for HTTP over TLS [12]. The trusted roots may be 998 either a well-known public set or a manually configured Root 999 CA (e.g., an organization's own Certificate Authority or a 1000 self-signed Root CA for the service as defined under High 1001 Security (Section 13.1)). This case is RECOMMENDED. 1003 Case 2 -- The initiating entity has been configured with the 1004 receiving entity's self-signed service certificate: Simple 1005 comparison of public keys is appropriate. This case is NOT 1006 RECOMMENDED (see High Security (Section 13.1) for details). 1008 If the above methods fail, the certificate SHOULD be presented 1009 to a human (e.g., an end user or server administrator) for 1010 approval; if presented, the receiver MUST deliver the entire 1011 certificate chain to the human, who SHOULD be given the option 1012 to store the Root CA certificate (not the service or End Entity 1013 certificate) and to not be queried again regarding acceptance of 1014 the certificate for some reasonable period of time. 1016 8. If the TLS negotiation is successful, the receiving entity MUST 1017 discard any knowledge obtained from the initiating entity before 1018 TLS takes effect. 1020 9. If the TLS negotiation is successful, the initiating entity MUST 1021 discard any knowledge obtained from the receiving entity before 1022 TLS takes effect. 1024 10. If the TLS negotiation is successful, the receiving entity MUST 1025 NOT offer the STARTTLS extension to the initiating entity along 1026 with the other stream features that are offered when the stream 1027 is restarted. 1029 11. If the TLS negotiation is successful, the initiating entity MUST 1030 continue with SASL negotiation. 1032 12. If the TLS negotiation results in failure, the receiving entity 1033 MUST terminate both the XML stream and the underlying TCP 1034 connection. 1036 13. See Mandatory-to-Implement Technologies (Section 13.5) regarding 1037 mechanisms that MUST be supported. 1039 5.2 Narrative 1041 When an initiating entity secures a stream with a receiving entity, 1042 the steps involved are as follows: 1044 1. The initiating entity opens a TCP connection and initiates the 1045 stream by sending the opening XML stream header to the receiving 1046 entity, including the 'version' attribute set to a value of 1047 "1.0". 1049 2. The receiving entity responds by opening a TCP connection and 1050 sending an XML stream header to the initiating entity, including 1051 the 'version' attribute set to a value of "1.0". 1053 3. The receiving entity offers the STARTTLS extension to the 1054 initiating entity by including it with the list of other 1055 supported stream features (if TLS is required for interaction 1056 with the receiving entity, it SHOULD signal that fact by 1057 including a element as a child of the 1058 element). 1060 4. The initiating entity issues the STARTTLS command (i.e., a 1061 element qualified by the 1062 'urn:ietf:params:xml:ns:xmpp-tls' namespace) to instruct the 1063 receiving entity that it wishes to begin a TLS negotiation to 1064 secure the stream. 1066 5. The receiving entity MUST reply with either a element 1067 or a element qualified by the 1068 'urn:ietf:params:xml:ns:xmpp-tls' namespace. If the failure case 1069 occurs, the receiving entity MUST terminate both the XML stream 1070 and the underlying TCP connection. If the proceed case occurs, 1071 the entities MUST attempt to complete the TLS negotiation over 1072 the TCP connection and MUST NOT send any further XML data until 1073 the TLS negotiation is complete. 1075 6. The initiating entity and receiving entity attempt to complete a 1076 TLS negotiation in accordance with RFC 2246 [11]. 1078 7. If the TLS negotiation is unsuccessful, the receiving entity MUST 1079 terminate the TCP connection (it is not necessary to send a 1080 closing tag first, since the receiving entity and 1081 initiating entity MUST consider the original stream to be closed 1082 upon sending or receiving the element). If the TLS 1083 negotiation is successful, the initiating entity MUST initiate a 1084 new stream by sending an opening XML stream header to the 1085 receiving entity. 1087 8. Upon receiving the new stream header from the initiating entity, 1088 the receiving entity MUST respond by sending a new XML stream 1089 header to the initiating entity along with the available features 1090 (but NOT including the STARTTLS feature). 1092 5.3 Client-to-Server Example 1094 The following example shows the data flow for a client securing a 1095 stream using STARTTLS (note: the alternate steps shown below are 1096 provided to illustrate the protocol for failure cases; they are not 1097 exhaustive and would not necessarily be triggered by the data sent in 1098 the example). 1100 Step 1: Client initiates stream to server: 1102 1108 Step 2: Server responds by sending a stream tag to client: 1110 1117 Step 3: Server sends the STARTTLS extension to client along with 1118 authentication mechanisms and any other stream features: 1120 1121 1122 1123 1124 1125 DIGEST-MD5 1126 PLAIN 1127 1128 1130 Step 4: Client sends the STARTTLS command to server: 1132 1134 Step 5: Server informs client to proceed: 1136 1138 Step 5 (alt): Server informs client that TLS negotiation has failed 1139 and closes both stream and TCP connection: 1141 1142 1144 Step 6: Client and server attempt to complete TLS negotiation over 1145 the existing TCP connection. 1147 Step 7: If TLS negotiation is successful, client initiates a new 1148 stream to server: 1150 1156 Step 7 (alt): If TLS negotiation is unsuccessful, Server2 closes TCP 1157 connection. 1159 Step 8: Server responds by sending a stream header to client along 1160 with any available stream features: 1162 1168 1169 1170 DIGEST-MD5 1171 PLAIN 1172 EXTERNAL 1173 1174 1176 Step 9: Client continues with Stream Authentication (Section 6). 1178 5.4 Server-to-Server Example 1180 The following example shows the data flow for two servers securing a 1181 stream using STARTTLS (note: the alternate steps shown below are 1182 provided to illustrate the protocol for failure cases; they are not 1183 exhaustive and would not necessarily be triggered by the data sent in 1184 the example). 1186 Step 1: Server1 initiates stream to Server2: 1188 1194 Step 2: Server2 responds by sending a stream tag to Server1: 1196 1203 Step 3: Server2 sends the STARTTLS extension to Server1 along with 1204 authentication mechanisms and any other stream features: 1206 1207 1208 1209 1210 1211 DIGEST-MD5 1212 KERBEROS_V4 1213 1214 1216 Step 4: Server1 sends the STARTTLS command to Server2: 1218 1220 Step 5: Server2 informs Server1 to proceed: 1222 1224 Step 5 (alt): Server2 informs Server1 that TLS negotiation has failed 1225 and closes stream: 1227 1228 1230 Step 6: Server1 and Server2 attempt to complete TLS negotiation via 1231 TCP. 1233 Step 7: If TLS negotiation is successful, Server1 initiates a new 1234 stream to Server2: 1236 1242 Step 7 (alt): If TLS negotiation is unsuccessful, server closes TCP 1243 connection. 1245 Step 8: Server2 responds by sending a stream header to Server1 along 1246 with any available stream features: 1248 1254 1255 1256 DIGEST-MD5 1257 KERBEROS_V4 1258 EXTERNAL 1259 1260 1262 Step 9: Server1 continues with Stream Authentication (Section 6). 1264 6. Stream Authentication 1266 6.1 Overview 1268 XMPP includes a method for authenticating a stream by means of an 1269 XMPP-specific profile of the Simple Authentication and Security Layer 1270 (SASL) [13]. SASL provides a generalized method for adding 1271 authentication support to connection-based protocols, and XMPP uses a 1272 generic XML namespace profile for SASL that conforms to Section 4 1273 ("Profiling Requirements") of RFC 2222 [13] (the namespace name that 1274 qualifies XML elements used in stream authentication is 1275 'urn:ietf:params:xml:ns:xmpp-sasl', which adheres to the format 1276 defined in The IETF XML Registry [24]). 1278 The following rules apply: 1280 1. If the SASL negotiation occurs between two servers, 1281 communications MUST NOT proceed until the Domain Name System 1282 (DNS) hostnames asserted by the servers have been resolved (see 1283 Server-to-Server Communications (Section 13.3)). 1285 2. If the initiating entity is capable of stream authentication via 1286 SASL, it MUST include the 'version' attribute set to a value of 1287 "1.0" in the initial stream header. 1289 3. If the receiving entity is capable of stream authentication via 1290 SASL, it MUST send one or more authentication mechanisms within 1291 a element qualified by the 1292 'urn:ietf:params:xml:ns:xmpp-sasl' namespace in reply to the 1293 opening stream tag received from the initiating entity (if the 1294 opening stream tag included the 'version' attribute set to a 1295 value of "1.0"). 1297 4. During SASL negotiation, an entity MUST NOT send any white space 1298 characters (matching production [3] content of the XML 1299 specification [1]) within the root stream element as separators 1300 between elements (any white space characters shown in the SASL 1301 examples below are included for the sake of readability only); 1302 this prohibition helps to ensure proper security layer byte 1303 precision. 1305 5. Any character data contained within the XML elements used during 1306 SASL negotiation MUST be encoded using base64 [14]. 1308 6. If supported by the selected SASL mechanism, the initiating 1309 entity SHOULD provide a username during SASL negotiation. The 1310 username-value SHOULD be the initiating entity's sending domain 1311 in the case of server-to-server communications, and SHOULD be 1312 the initiating entity's registered username in the case of 1313 client-to-server communications. 1315 7. If supported by the selected SASL mechanism, the initiating 1316 entity MAY provide an authorization identity during SASL 1317 negotiation, which SHOULD be a non-default identity for which 1318 the entity is seeking authorization to impersonate (i.e., not 1319 the default authorization identity, which is derived from the 1320 authentication identity as described in RFC 2222 [13]). If 1321 provided, the authzid-value MUST be of the form (i.e., 1322 a domain identifier only) for servers and of the form 1323 (i.e., node identifier and domain identifier) for 1324 clients. 1326 8. Upon successful SASL negotiation that involves negotiation of a 1327 security layer, the receiving entity MUST discard any knowledge 1328 obtained from the initiating entity which was not obtained from 1329 the SASL negotiation itself. 1331 9. Upon successful SASL negotiation that involves negotiation of a 1332 security layer, the initiating entity MUST discard any knowledge 1333 obtained from the receiving entity which was not obtained from 1334 the SASL negotiation itself. 1336 10. See Mandatory-to-Implement Technologies (Section 13.5) regarding 1337 mechanisms that MUST be supported. 1339 6.2 Narrative 1341 When an initiating entity authenticates with a receiving entity, the 1342 steps involved are as follows: 1344 1. The initiating entity requests SASL authentication by including 1345 the 'version' attribute in the opening XML stream header sent to 1346 the receiving entity, with the value set to "1.0". 1348 2. After sending an XML stream header in reply, the receiving entity 1349 sends a list of available SASL authentication mechanisms; each of 1350 these is a element included as a child within a 1351 container element qualified by the 1352 'urn:ietf:params:xml:ns:xmpp-sasl' namespace, which in turn is a 1353 child of a element in the streams namespace. If 1354 Stream Encryption (Section 5) needs to be established before a 1355 particular authentication mechanism may be used, the receiving 1356 entity MUST NOT provide that mechanism in the list of available 1357 SASL authentication mechanisms prior to stream encryption. If the 1358 initiating entity presents a valid certificate during prior TLS 1359 negotiation, the receiving entity SHOULD offer the SASL EXTERNAL 1360 mechanism to the initiating entity during stream authentication 1361 (refer to RFC 2222 [13]), although the EXTERNAL mechanism MAY be 1362 offered under other circumstances as well. 1364 3. The initiating entity selects a mechanism by sending an 1365 element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' 1366 namespace to the receiving entity and including an appropriate 1367 value for the 'mechanism' attribute; this element MAY optionally 1368 contain character data (in SASL terminology, the "initial 1369 response") if the mechanism supports or requires it. If the 1370 initiating entity selects the EXTERNAL mechanism for 1371 authentication and presented a certificate during prior TLS 1372 negotiation, the authentication credentials SHOULD be taken from 1373 that certificate. 1375 4. If necessary, the receiving entity challenges the initiating 1376 entity by sending a element qualified by the 1377 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1378 entity; this element MAY optionally contain character data (which 1379 MUST be computed in accordance with the definition of the SASL 1380 mechanism chosen by the initiating entity). 1382 5. The initiating entity responds to the challenge by sending a 1383 element qualified by the 1384 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the receiving 1385 entity; this element MAY optionally contain character data (which 1386 MUST be computed in accordance with the definition of the SASL 1387 mechanism chosen by the initiating entity). 1389 6. If necessary, the receiving entity sends more challenges and the 1390 initiating entity sends more responses. 1392 This series of challenge/response pairs continues until one of three 1393 things happens: 1395 1. The initiating entity aborts the handshake by sending an 1396 element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' 1397 namespace to the receiving entity. Upon receiving an 1398 element, the receiving entity SHOULD allow a configurable but 1399 reasonable number of retries (at least 2), after which it MUST 1400 terminate the TCP connection; this allows the initiating entity 1401 (e.g., an end-user client) to tolerate incorrectly-provided 1402 credentials (e.g., a mistyped password) without being forced to 1403 reconnect. 1405 2. The receiving entity reports failure of the handshake by sending 1406 a element qualified by the 1407 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1408 entity (the particular cause of failure SHOULD be communicated in 1409 an appropriate child element of the element as defined 1410 under SASL Errors (Section 6.4)). If the failure case occurs, the 1411 receiving entity SHOULD allow a configurable but reasonable 1412 number of retries (at least 2), after which it MUST terminate the 1413 TCP connection; this allows the initiating entity (e.g., an 1414 end-user client) to tolerate incorrectly-provided credentials 1415 (e.g., a mistyped password) without being forced to reconnect. 1417 3. The receiving entity reports success of the handshake by sending 1418 a element qualified by the 1419 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1420 entity; this element MAY optionally contain character data (in 1421 SASL terminology, "additional data with success") if required by 1422 the chosen SASL mechanism. Upon receiving the element, 1423 the initiating entity MUST initiate a new stream by sending an 1424 opening XML stream header to the receiving entity (it is not 1425 necessary to send a closing tag first, since the 1426 receiving entity and initiating entity MUST consider the original 1427 stream to be closed upon sending or receiving the 1428 element). Upon receiving the new stream header from the 1429 initiating entity, the receiving entity MUST respond by sending a 1430 new XML stream header to the initiating entity, along with any 1431 available features (but NOT including the STARTTLS feature) or an 1432 empty element (to signify that no additional features 1433 are available); any such additional features not defined herein 1434 MUST be defined by the relevant extension to XMPP. 1436 6.3 SASL Definition 1438 Section 4 of the SASL specification [13] requires that the following 1439 information be supplied by a protocol definition: 1441 service name: "xmpp" 1443 initiation sequence: After the initiating entity provides an opening 1444 XML stream header and the receiving entity replies in kind, the 1445 receiving entity provides a list of acceptable authentication 1446 methods. The initiating entity chooses one method from the list 1447 and sends it to the receiving entity as the value of the 1448 'mechanism' attribute possessed by an element, optionally 1449 including an initial response to avoid a round trip. 1451 exchange sequence: Challenges and responses are carried through the 1452 exchange of elements from receiving entity to 1453 initiating entity and elements from initiating entity 1454 to receiving entity. The receiving entity reports failure by 1455 sending a element and success by sending a 1456 element; the initiating entity aborts the exchange by sending an 1457 element. Upon successful negotiation, both sides consider 1458 the original XML stream to be closed and new stream headers are 1459 sent by both entities. 1461 security layer negotiation: The security layer takes effect 1462 immediately after sending the closing ">" character of the 1463 element for the receiving entity, and immediately after 1464 receiving the closing ">" character of the element for 1465 the initiating entity. The order of layers is first TCP, then TLS, 1466 then SASL, then XMPP. 1468 use of the authorization identity: The authorization identity may be 1469 used by xmpp to denote the of a client or the 1470 sending of a server. 1472 6.4 SASL Errors 1474 The following SASL-related error conditions are defined: 1476 o -- The receiving entity acknowledges an 1477 element sent by the initiating entity; sent in reply to the 1478 element. 1480 o -- The data provided by the initiating 1481 entity could not be processed because the base64 [14] encoding is 1482 incorrect; sent in reply to a element or an 1483 element with initial challenge data. 1485 o -- The authzid provided by the initiating 1486 entity is invalid, either because it is incorrectly formatted or 1487 because the initiating entity does not have permissions to 1488 authorize that ID; sent in reply to a element or an 1489 element with initial challenge data. 1491 o -- The initiating entity did not provide a 1492 mechanism or requested a mechanism that is not supported by the 1493 receiving entity; sent in reply to an element. 1495 o -- The mechanism requested by the initiating 1496 entity is weaker than server policy permits for that initiating 1497 entity; sent in reply to a element or an 1498 element with initial challenge data. 1500 o -- The authentication failed because the 1501 initiating entity did not provide valid credentials (this includes 1502 but is not limited to the case of an unknown username); sent in 1503 reply to a element or an element with initial 1504 challenge data. 1506 o -- The authentication failed because of 1507 a temporary error condition within the receiving entity; sent in 1508 reply to an element or element. 1510 6.5 Client-to-Server Example 1512 The following example shows the data flow for a client authenticating 1513 with a server using SASL, normally after successful TLS negotiation 1514 (note: the alternate steps shown below are provided to illustrate the 1515 protocol for failure cases; they are not exhaustive and would not 1516 necessarily be triggered by the data sent in the example). 1518 Step 1: Client initiates stream to server: 1520 1526 Step 2: Server responds with a stream tag sent to client: 1528 1535 Step 3: Server informs client of available authentication mechanisms: 1537 1538 1539 DIGEST-MD5 1540 PLAIN 1541 1542 1544 Step 4: Client selects an authentication mechanism: 1546 1549 Step 5: Server sends a base64 [14]-encoded challenge to client: 1551 1552 cmVhbG09InNvbWVyZWFsbSIsbm9uY2U9Ik9BNk1HOXRFUUdtMmhoIixxb3A9ImF1dGgi 1553 LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNzCg== 1554 1556 The decoded challenge is: 1558 realm="somerealm",nonce="OA6MG9tEQGm2hh",\ 1559 qop="auth",charset=utf-8,algorithm=md5-sess 1561 Step 5 (alt): Server returns error to client: 1563 1564 1565 1566 1568 Step 6: Client sends a base64 [14]-encoded response to the challenge: 1570 1571 dXNlcm5hbWU9InNvbWVub2RlIixyZWFsbT0ic29tZXJlYWxtIixub25jZT0i 1572 T0E2TUc5dEVRR20yaGgiLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLG5jPTAw 1573 MDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZXhhbXBsZS5jb20i 1574 LHJlc3BvbnNlPWQzODhkYWQ5MGQ0YmJkNzYwYTE1MjMyMWYyMTQzYWY3LGNo 1575 YXJzZXQ9dXRmLTgK 1576 1578 The decoded response is: 1580 username="somenode",realm="somerealm",\ 1581 nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk",\ 1582 nc=00000001,qop=auth,digest-uri="xmpp/example.com",\ 1583 response=d388dad90d4bbd760a152321f2143af7,charset=utf-8 1585 Step 7: Server sends another base64 [14]-encoded challenge to client: 1587 1588 cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZAo= 1589 1591 The decoded challenge is: 1593 rspauth=ea40f60335c427b5527b84dbabcdfffd 1595 Step 7 (alt): Server returns error to client: 1597 1598 1599 1600 1602 Step 8: Client responds to the challenge: 1604 1606 Step 9: Server informs client of successful authentication: 1608 1610 Step 9 (alt): Server informs client of failed authentication: 1612 1613 1614 1615 1617 Step 10: Client initiates a new stream to server: 1619 1625 Step 11: Server responds by sending a stream header to client along 1626 with any additional features (or an empty features element): 1628 1634 1635 1636 1637 1639 6.6 Server-to-Server Example 1641 The following example shows the data flow for a server authenticating 1642 with another server using SASL, normally after successful TLS 1643 negotiation (note: the alternate steps shown below are provided to 1644 illustrate the protocol for failure cases; they are not exhaustive 1645 and would not necessarily be triggered by the data sent in the 1646 example). 1648 Step 1: Server1 initiates stream to Server2: 1650 1656 Step 2: Server2 responds with a stream tag sent to Server1: 1658 1665 Step 3: Server2 informs Server1 of available authentication 1666 mechanisms: 1668 1669 1670 DIGEST-MD5 1671 KERBEROS_V4 1672 1673 1675 Step 4: Server1 selects an authentication mechanism: 1677 1680 Step 5: Server2 sends a base64 [14]-encoded challenge to Server1: 1682 1683 dXNlcm5hbWU9InNvbWVkb21haW4iLHJlYWxtPSJzb21lcmVhbG0iLG5vbmNl 1684 PSJPQTZNRzl0RVFHbTJoaCIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFs 1685 Z29yaXRobT1tZDUtc2Vzcwo= 1686 1688 The decoded challenge is: 1690 username="somedomain",realm="somerealm",\ 1691 nonce="OA6MG9tEQGm2hh",qop="auth",\ 1692 charset=utf-8,algorithm=md5-sess 1694 Step 5 (alt): Server2 returns error to Server1: 1696 1697 1698 1699 1701 Step 6: Server1 sends a base64 [14]-encoded response to the 1702 challenge: 1704 1705 dXNlcm5hbWU9InNvbWVkb21haW4iLHJlYWxtPSJzb21lcmVhbG0iLG5vbmNl 1706 PSJPQTZNRzl0RVFHbTJoaCIsY25vbmNlPSJPQTZNSFhoNlZxVHJSayIsbmM9 1707 MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9leGFtcGxlLmNv 1708 bSIscmVzcG9uc2U9ZDM4OGRhZDkwZDRiYmQ3NjBhMTUyMzIxZjIxNDNhZjcs 1709 Y2hhcnNldD11dGYtOAo= 1710 1712 The decoded response is: 1714 username="somedomain",realm="somerealm",\ 1715 nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk",\ 1716 nc=00000001,qop=auth,digest-uri="xmpp/example.com",\ 1717 response=d388dad90d4bbd760a152321f2143af7,charset=utf-8 1719 Step 7: Server2 sends another base64 [14]-encoded challenge to 1720 Server1: 1722 1723 cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZAo= 1724 1725 The decoded challenge is: 1727 rspauth=ea40f60335c427b5527b84dbabcdfffd 1729 Step 7 (alt): Server2 returns error to Server1: 1731 1732 1733 1734 1736 Step 8: Server1 responds to the challenge: 1738 1740 Step 8 (alt): Server1 aborts negotiation: 1742 1744 Step 9: Server2 informs Server1 of successful authentication: 1746 1748 Step 9 (alt): Server2 informs Server1 of failed authentication: 1750 1751 1752 1753 1755 Step 10: Server1 initiates a new stream to Server2: 1757 1763 Step 11: Server2 responds by sending a stream header to Server1 along 1764 with any additional features (or an empty features element): 1766 1772 1774 7. Resource Binding 1776 After Stream Authentication (Section 6) with the receiving entity, 1777 the initiating entity MAY want or need to bind a specific resource to 1778 that stream. In general this applies only to clients: in order to 1779 conform to the addressing format (Section 3) and stanza delivery 1780 rules (Section 14) specified herein, there MUST be a resource 1781 identifier associated with the of the client (which is 1782 either generated by the server or provided by the client 1783 application); this ensures that the address for use over that stream 1784 is a "full JID" of the form . 1786 Upon receiving a success indication within the SASL negotiation, the 1787 client MUST send a new stream header to the server, to which the 1788 server MUST respond with a stream header as well as a list of 1789 available stream features. Specifically, if the server requires the 1790 client to bind a resource to the stream after successful stream 1791 authentication, it MUST include an empty element qualified by 1792 the 'urn:ietf:params:xml:ns:xmpp-bind' namespace in the stream 1793 features list it presents to the client upon sending the header for 1794 the response stream sent after successful stream authentication (but 1795 not before): 1797 Server advertises resource binding feature to client: 1799 1805 1806 1807 1809 Upon being so informed that resource binding is required, the client 1810 MUST bind a resource to the stream by sending to the server an IQ 1811 stanza of type "set" (see IQ Semantics (Section 9.2.3)) containing 1812 data qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace. 1814 If the client wishes to allow the server to generate the resource 1815 identifier on its behalf, it sends an IQ stanza of type "set" that 1816 contains an empty element: 1818 Client asks server to bind a resource: 1820 1821 1823 1825 A server that supports resource binding MUST be able to generate a 1826 resource identifier on behalf of a client. A resource identifier 1827 generated by the server MUST be unique for that . 1829 If the client wishes to specify the resource identifier, it sends an 1830 IQ stanza of type "set" that contains the desired resource identifier 1831 as the CDATA of a element that is a child of the 1832 element: 1834 Client binds a resource: 1836 1837 1838 someresource 1839 1840 1842 Once the server has generated a resource identifier for the client or 1843 accepted the resource identifier provided by the client, it MUST 1844 return an IQ stanza of type "result" to the client, which MUST 1845 include a child element that specifies the full JID for the 1846 client as determined by the server: 1848 Server informs client of successful resource binding: 1850 1851 1852 somenode@somedomain/someresource 1853 1854 1856 A server is NOT REQUIRED to accept the resource identifier provided 1857 by the client, and MAY override it with a resource identifier that 1858 the server generates; in this case, the server SHOULD NOT return a 1859 stanza error (e.g., ) to the client but instead SHOULD 1860 communicate the generated resource identifier to the client in the IQ 1861 result as shown above. 1863 When a client supplies a resource identifier, the following stanza 1864 error conditions may occur (see Stanza Errors (Section 9.3)): 1866 o The provided resource identifier cannot be processed by the server 1867 in accordance with Resourceprep (Appendix B). 1869 o The client is not allowed to bind a resource to the stream (e.g., 1870 because the client has reached a limit on the number of bound 1871 resources allowed). 1873 o The provided resource identifier is already in use. 1875 The protocol for these error conditions is shown below. 1877 Resource identifier cannot be processed: 1879 1880 1881 someresource 1882 1883 1884 1885 1886 1888 Client is not allowed to bind a resource: 1890 1891 1892 someresource 1893 1894 1895 1896 1897 1899 Resource identifier is in use: 1901 1902 1903 someresource 1904 1905 1906 1907 1908 1910 8. Server Dialback 1912 8.1 Overview 1914 The Jabber protocol from which XMPP was adapted includes a "server 1915 dialback" method for protecting against domain spoofing, thus making 1916 it more difficult to spoof XML stanzas (see Server-to-Server 1917 Communications (Section 13.3) regarding this method's security 1918 characteristics). Server dialback also makes it easier to deploy 1919 systems in which outbound messages and inbound messages are handled 1920 by different machines for the same domain. The server dialback method 1921 is made possible by the existence of the Domain Name System (DNS), 1922 since one server can (normally) discover the authoritative server for 1923 a given domain. 1925 Because dialback depends on DNS, inter-domain communications MUST NOT 1926 proceed until the DNS hostnames asserted by the servers have been 1927 resolved (see Server-to-Server Communications (Section 13.3)). 1929 The method for generating and verifying the keys used in server 1930 dialback MUST take into account the hostnames being used, the random 1931 ID generated for the stream, and a secret known by the authoritative 1932 server's network. 1934 Any error that occurs during dialback negotiation MUST be considered 1935 a stream error, resulting in termination of the stream and of the 1936 underlying TCP connection. The possible error conditions are 1937 specified in the protocol description below. 1939 The following terminology applies: 1941 o Originating Server -- the server that is attempting to establish a 1942 connection between two domains. 1944 o Receiving Server -- the server that is trying to authenticate that 1945 Originating Server represents the domain which it claims to be. 1947 o Authoritative Server -- the server that answers to the DNS 1948 hostname asserted by Originating Server; for basic environments 1949 this will be Originating Server, but it could be a separate 1950 machine in Originating Server's network. 1952 8.2 Order of Events 1954 The following is a brief summary of the order of events in dialback: 1956 1. Originating Server establishes a connection to Receiving Server. 1958 2. Originating Server sends a 'key' value over the connection to 1959 Receiving Server. 1961 3. Receiving Server establishes a connection to Authoritative 1962 Server. 1964 4. Receiving Server sends the same 'key' value to Authoritative 1965 Server. 1967 5. Authoritative Server replies that key is valid or invalid. 1969 6. Receiving Server informs Originating Server whether it is 1970 authenticated or not. 1972 We can represent this flow of events graphically as follows: 1974 Originating Receiving 1975 Server Server 1976 ----------- --------- 1977 | | 1978 | establish connection | 1979 | ----------------------> | 1980 | | 1981 | send stream header | 1982 | ----------------------> | 1983 | | 1984 | send stream header | 1985 | <---------------------- | 1986 | | Authoritative 1987 | send dialback key | Server 1988 | ----------------------> | ------------- 1989 | | | 1990 | establish connection | 1991 | ----------------------> | 1992 | | 1993 | send stream header | 1994 | ----------------------> | 1995 | | 1996 | establish connection | 1997 | <---------------------- | 1998 | | 1999 | send stream header | 2000 | <---------------------- | 2001 | | 2002 | send dialback key | 2003 | ----------------------> | 2004 | | 2005 | validate dialback key | 2006 | <---------------------- | 2007 | 2008 | report dialback result | 2009 | <---------------------- | 2010 | | 2012 8.3 Protocol 2014 The detailed protocol interaction between the servers is as follows: 2016 1. Originating Server establishes TCP connection to Receiving 2017 Server. 2019 2. Originating Server sends a stream header to Receiving Server: 2021 2026 Note: the 'to' and 'from' attributes are NOT REQUIRED on the 2027 root stream element. The inclusion of the xmlns:db namespace 2028 declaration with the name shown indicates to Receiving Server 2029 that Originating Server supports dialback. If the namespace name 2030 is incorrect, then Receiving Server MUST generate an 2031 stream error condition and terminate both 2032 the XML stream and the underlying TCP connection. 2034 3. Receiving Server SHOULD send a stream header back to Originating 2035 Server, including a unique ID for this interaction: 2037 2043 Note: The 'to' and 'from' attributes are NOT REQUIRED on the 2044 root stream element. If the namespace name is incorrect, then 2045 Originating Server MUST generate an stream 2046 error condition and terminate both the XML stream and the 2047 underlying TCP connection. Note well that Receiving Server is 2048 NOT REQUIRED to reply and MAY silently terminate the XML stream 2049 and underlying TCP connection depending on security policies in 2050 place. 2052 4. Originating Server sends a dialback key to Receiving Server: 2054 2057 98AF014EDC0... 2058 2059 Note: this key is not examined by Receiving Server, since 2060 Receiving Server does not keep information about Originating 2061 Server between sessions. The key generated by Originating Server 2062 MUST be based in part on the value of the ID provided by 2063 Receiving Server in the previous step, and in part on a secret 2064 shared by Originating Server and Authoritative Server. If the 2065 value of the 'to' address does not match a hostname recognized 2066 by Receiving Server, then Receiving Server MUST generate a 2067 stream error condition and terminate both the 2068 XML stream and the underlying TCP connection. If the value of 2069 the 'from' address matches a domain with which Receiving Server 2070 already has an established connection, then Receiving Server 2071 MUST maintain the existing connection until it validates whether 2072 the new connection is legitimate; additionally, Receiving Server 2073 MAY choose to generate a stream error 2074 condition for the new connection and then terminate both the XML 2075 stream and the underlying TCP connection related to the new 2076 request. 2078 5. Receiving Server establishes a TCP connection back to the domain 2079 name asserted by Originating Server, as a result of which it 2080 connects to Authoritative Server. (Note: as an optimization, an 2081 implementation MAY reuse an existing trusted connection here 2082 rather than opening a new TCP connection.) 2084 6. Receiving Server sends Authoritative Server a stream header: 2086 2091 Note: the 'to' and 'from' attributes are NOT REQUIRED on the 2092 root stream element. If the namespace name is incorrect, then 2093 Authoritative Server MUST generate an 2094 stream error condition and terminate both the XML stream and the 2095 underlying TCP connection. 2097 7. Authoritative Server sends Receiving Server a stream header: 2099 2105 Note: if the namespace name is incorrect, then Receiving Server 2106 MUST generate an stream error condition and 2107 terminate both the XML stream and the underlying TCP connection 2108 between it and Authoritative Server. If a stream error occurs 2109 between Receiving Server and Authoritative Server, then 2110 Receiving Server MUST generate a 2111 stream error condition and terminate both the XML stream and the 2112 underlying TCP connection between it and Originating Server. 2114 8. Receiving Server sends Authoritative Server a stanza requesting 2115 that Authoritative Server verify a key: 2117 2121 98AF014EDC0... 2122 2124 Note: passed here are the hostnames, the original identifier 2125 from Receiving Server's stream header to Originating Server in 2126 Step 3, and the key that Originating Server sent to Receiving 2127 Server in Step 4. Based on this information as well as shared 2128 secret information within the Authoritative Server's network, 2129 the key is verified. Any verifiable method MAY be used to 2130 generate the key. If the value of the 'to' address does not 2131 match a hostname recognized by Authoritative Server, then 2132 Authoritative Server MUST generate a stream 2133 error condition and terminate both the XML stream and the 2134 underlying TCP connection. If the value of the 'from' address 2135 does not match the hostname represented by Receiving Server when 2136 opening the TCP connection (or any validated domain), then 2137 Authoritative Server MUST generate an stream 2138 error condition and terminate both the XML stream and the 2139 underlying TCP connection. 2141 9. Authoritative Server sends a stanza back to Receiving Server 2142 verifying whether the key was valid or invalid: 2144 2150 or 2152 2158 Note: if the ID does not match that provided by Receiving Server 2159 in Step 3, then Receiving Server MUST generate an 2160 stream error condition and terminate both the XML stream and the 2161 underlying TCP connection. If the value of the 'to' address does 2162 not match a hostname recognized by Receiving Server, then 2163 Receiving Server MUST generate a stream error 2164 condition and terminate both the XML stream and the underlying 2165 TCP connection. If the value of the 'from' address does not 2166 match the hostname represented by Originating Server when 2167 opening the TCP connection (or any validated domain), then 2168 Receiving Server MUST generate an stream error 2169 condition and terminate both the XML stream and the underlying 2170 TCP connection. 2172 10. Receiving Server informs Originating Server of the result: 2174 2179 Note: At this point the connection has either been validated via 2180 a type='valid', or reported as invalid. If the connection is 2181 invalid, then Receiving Server MUST terminate both the XML 2182 stream and the underlying TCP connection. If the connection is 2183 validated, data can be sent by Originating Server and read by 2184 Receiving Server; before that, all data stanzas sent to 2185 Receiving Server SHOULD be silently dropped. 2187 Even if dialback negotiation is successful, a server MUST verify that 2188 all XML stanzas received from the other server include a 'from' 2189 attribute and a 'to' attribute; if a stanza does not meet this 2190 restriction, the server that receives the stanza MUST generate an 2191 stream error condition and terminate both the 2192 XML stream and the underlying TCP connection. Furthermore, a server 2193 MUST verify that the 'from' attribute of stanzas received from the 2194 other server includes a validated domain for the stream; if a stanza 2195 does not meet this restriction, the server that receives the stanza 2196 MUST generate an stream error condition and terminate 2197 both the XML stream and the underlying TCP connection. Both of these 2198 checks help to prevent spoofing related to particular stanzas. 2200 9. XML Stanzas 2202 After Stream Encryption (Section 5) if desired, Stream Authentication 2203 (Section 6), and Resource Binding (Section 7) if necessary, XML 2204 stanzas can be sent over the streams. Three kinds of XML stanza are 2205 defined for the 'jabber:client' and 'jabber:server' namespaces: 2206 , , and . In addition, there are five 2207 common attributes for these kinds of stanza. These common attributes, 2208 as well as the basic semantics of the three stanza kinds, are defined 2209 herein; more detailed information regarding the syntax of XML stanzas 2210 in relation to instant messaging and presence applications is 2211 provided in XMPP IM [21]. 2213 9.1 Common Attributes 2215 The following five attributes are common to message, presence, and IQ 2216 stanzas: 2218 9.1.1 to 2220 The 'to' attribute specifies the JID of the intended recipient for 2221 the stanza. 2223 In the 'jabber:client' namespace, a stanza SHOULD possess a 'to' 2224 attribute, although a stanza sent from a client to a server for 2225 handling by that server (e.g., presence sent to the server for 2226 broadcasting to other entities) SHOULD NOT possess a 'to' attribute. 2228 In the 'jabber:server' namespace, a stanza MUST possess a 'to' 2229 attribute; if a server receives a stanza that does not meet this 2230 restriction, it MUST generate an stream error 2231 condition and terminate both the XML stream and the underlying TCP 2232 connection with the offending server. 2234 If the value of the 'to' attribute is invalid or cannot be contacted, 2235 the entity discovering that fact (usually the sender's or recipient's 2236 server) MUST return an appropriate error to the sender, setting the 2237 'from' attribute of the error stanza to the value provided in the 2238 'to' attribute of the offending stanza. 2240 9.1.2 from 2242 The 'from' attribute specifies the JID of the sender. 2244 When a server receives an XML stanza within the context of an 2245 authenticated stream qualified by the 'jabber:client' namespace, it 2246 MUST do one of the following: 2248 1. validate that the value of the 'from' attribute provided by the 2249 client is that of an authorized resource for the associated 2250 entity 2252 2. add a 'from' address to the stanza whose value is the full JID 2253 () determined by the server for the 2254 connected resource that generated the stanza (see Determination 2255 of Addresses (Section 3.6)) 2257 If a client attempts to send an XML stanza for which the value of the 2258 'from' attribute does not match one of the connected resources for 2259 that entity, the server SHOULD return an stream error 2260 to the client. If a client attempts to send an XML stanza over a 2261 stream that is not yet authenticated, the server SHOULD return a 2262 stream error to the client. If generated, both of 2263 these conditions MUST result in closing of the stream and termination 2264 of the underlying TCP connection; this helps to prevent a denial of 2265 service attack launched from a rogue client. 2267 In the 'jabber:server' namespace, a stanza MUST possess a 'from' 2268 attribute; if a server receives a stanza that does not meet this 2269 restriction, it MUST generate an stream error 2270 condition. Furthermore, the domain identifier portion of the JID 2271 contained in the 'from' attribute MUST match the hostname (or any 2272 validated domain) of the sending server as communicated in the SASL 2273 negotiation or dialback negotiation; if a server receives a stanza 2274 that does not meet this restriction, it MUST generate an 2275 stream error condition. Both of these conditions MUST 2276 result in closing of the stream and termination of the underlying TCP 2277 connection; this helps to prevent a denial of service attack launched 2278 from a rogue server. 2280 9.1.3 id 2282 The optional 'id' attribute MAY be used by a sending entity for 2283 internal tracking of stanzas that it sends and receives (especially 2284 for tracking the request-response interaction inherent in the 2285 semantics of IQ stanzas). The value of the 'id' attribute is NOT 2286 REQUIRED to be unique either globally, within a domain, or within a 2287 stream. The semantics of IQ stanzas impose additional restrictions; 2288 see IQ Semantics (Section 9.2.3). 2290 9.1.4 type 2292 The 'type' attribute specifies detailed information about the purpose 2293 or context of the message, presence, or IQ stanza. The particular 2294 allowable values for the 'type' attribute vary depending on whether 2295 the stanza is a message, presence, or IQ; the values for message and 2296 presence stanzas are specific to instant messaging and presence 2297 applications and therefore are defined in XMPP IM [21], whereas the 2298 values for IQ stanzas specify the role of an IQ stanza in a 2299 structured request-response "conversation" and thus are defined under 2300 IQ Semantics (Section 9.2.3) below. The only 'type' value common to 2301 all three stanzas is "error", for which see Stanza Errors (Section 2302 9.3). 2304 9.1.5 xml:lang 2306 A stanza SHOULD possess an 'xml:lang' attribute (as defined in 2307 Section 2.12 of the XML specification [1]) if the stanza contains XML 2308 character data that is intended to be presented to a human user (as 2309 explained in RFC 2277 [15], "internationalization is for humans"). 2310 The value of the 'xml:lang' attribute specifies the default language 2311 of any such human-readable XML character data, which MAY be 2312 overridden by the 'xml:lang' attribute of a specific child element. 2313 If a stanza does not possess an 'xml:lang' attribute, an 2314 implementation MUST assume that the default language is that 2315 specified for the stream as defined under Stream Attributes (Section 2316 4.2) above. The value of the 'xml:lang' attribute MUST be an NMTOKEN 2317 and MUST conform to the format defined in RFC 3066 [16]. 2319 9.2 Basic Semantics 2321 9.2.1 Message Semantics 2323 The stanza kind can be seen as a "push" mechanism whereby 2324 one entity pushes information to another entity, similar to the 2325 communications that occur in a system such as email. All message 2326 stanzas SHOULD possess a 'to' attribute that specifies the intended 2327 recipient of the message; upon receiving such a stanza, a server 2328 SHOULD route or deliver it to the intended recipient (see Server 2329 Rules for Handling XML Stanzas (Section 14) for general routing and 2330 delivery rules related to XML stanzas). 2332 9.2.2 Presence Semantics 2334 The element can be seen as a basic broadcast or 2335 "publish-subscribe" mechanism, whereby multiple entities receive 2336 information (in this case, presence information) about an entity to 2337 which they have subscribed. In general, a publishing entity SHOULD 2338 send a presence stanza with no 'to' attribute, in which case the 2339 server to which the entity is connected SHOULD broadcast or multiplex 2340 that stanza to all subscribing entities. However, a publishing entity 2341 MAY also send a presence stanza with a 'to' attribute, in which case 2342 the server SHOULD route or deliver that stanza to the intended 2343 recipient. See Server Rules for Handling XML Stanzas (Section 14) for 2344 general routing and delivery rules related to XML stanzas, and XMPP 2345 IM [21] for presence-specific rules in the context of an instant 2346 messaging and presence application. 2348 9.2.3 IQ Semantics 2350 Info/Query, or IQ, is a request-response mechanism, similar in some 2351 ways to HTTP [22]. The semantics of IQ enable an entity to make a 2352 request of, and receive a response from, another entity. The data 2353 content of the request and response is defined by the namespace 2354 declaration of a direct child element of the IQ element, and the 2355 interaction is tracked by the requesting entity through use of the 2356 'id' attribute. Thus IQ interactions follow a common pattern of 2357 structured data exchange such as get/result or set/result (although 2358 an error may be returned in reply to a request if appropriate): 2360 Requesting Responding 2361 Entity Entity 2362 ---------- ---------- 2363 | | 2364 | | 2365 | ------------------------> | 2366 | | 2367 | | 2368 | <------------------------ | 2369 | | 2370 | | 2371 | ------------------------> | 2372 | | 2373 | | 2374 | <------------------------ | 2375 | | 2377 In order to enforce these semantics, the following rules apply: 2379 1. The 'id' attribute is REQUIRED for IQ stanzas. 2381 2. The 'type' attribute is REQUIRED for IQ stanzas. The value SHOULD 2382 be one of the following (all other values SHOULD be ignored): 2384 * get -- The stanza is a request for information or 2385 requirements. 2387 * set -- The stanza provides required data, sets new values, or 2388 replaces existing values. 2390 * result -- The stanza is a response to a successful get or set 2391 request. 2393 * error -- An error has occurred regarding processing or 2394 delivery of a previously-sent get or set (see Stanza Errors 2395 (Section 9.3)). 2397 3. An entity that receives an IQ request of type "get" or "set" MUST 2398 reply with an IQ response of type "result" or "error" (which 2399 response MUST preserve the 'id' attribute of the request). 2401 4. An entity that receives a stanza of type "result" or "error" MUST 2402 NOT respond to the stanza by sending a further IQ response of 2403 type "result" or "error"; however, as shown above, the requesting 2404 entity MAY send another request (e.g., an IQ of type "set" in 2405 order to provide required information discovered through a get/ 2406 result pair). 2408 5. An IQ stanza of type "get" or "set" MUST contain one and only one 2409 child element (properly-namespaced as defined in XMPP IM [21]) 2410 that specifies the semantics of the particular request or 2411 response. 2413 6. An IQ stanza of type "result" MUST include zero or one child 2414 elements. 2416 7. An IQ stanza of type "error" SHOULD include the child element 2417 contained in the associated "get" or "set" and MUST include an 2418 child; for details, see Stanza Errors (Section 9.3). 2420 9.3 Stanza Errors 2422 Stanza-related errors are handled in a manner similar to stream 2423 errors (Section 4.6). However, stanza errors are not unrecoverable, 2424 as stream errors are; therefore error stanzas include hints regarding 2425 actions that the original sender can take in order to remedy the 2426 error. 2428 9.3.1 Rules 2430 The following rules apply to stanza-related errors: 2432 o The receiving or processing entity that detects an error condition 2433 in relation to a stanza MUST return to the sending entity a stanza 2434 of the same kind (message, presence, or IQ) whose 'type' attribute 2435 is set to a value of "error" (such a stanza is called an "error 2436 stanza" herein). 2438 o The entity that generates an error stanza SHOULD (but is NOT 2439 REQUIRED to) include the original XML sent so that the sender can 2440 inspect and if necessary correct the XML before attempting to 2441 resend. 2443 o An error stanza MUST contain an child element. 2445 o An child MUST NOT be included if the 'type' attribute has 2446 a value other than "error" (or if there is no 'type' attribute). 2448 o An entity that receives an error stanza MUST NOT respond to the 2449 stanza with a further error stanza; this helps to prevent looping. 2451 9.3.2 Syntax 2453 The syntax for stanza-related errors is as follows: 2455 2456 [RECOMMENDED to include sender XML here] 2457 2458 2459 2460 OPTIONAL descriptive text 2461 2462 [OPTIONAL application-specific condition element] 2463 2464 2466 The stanza-name is one of message, presence, or iq. 2468 The value of the element's 'type' attribute MUST be one of 2469 the following: 2471 o cancel -- do not retry (the error is unrecoverable) 2473 o continue -- proceed (the condition was only a warning) 2475 o modify -- retry after changing the data sent 2477 o auth -- retry after providing credentials 2479 o wait -- retry after waiting (the error is temporary) 2481 The element: 2483 o MUST contain a child element corresponding to one of the defined 2484 stanza error conditions specified below; this element MUST be 2485 qualified by the 'urn:ietf:params:xml:ns:xmpp-stanzas' namespace. 2487 o MAY contain a child containing CDATA that describes the 2488 error in more detail; this element MUST be qualified by the 2489 'urn:ietf:params:xml:ns:xmpp-stanzas' namespace and SHOULD possess 2490 an 'xml:lang' attribute. 2492 o MAY contain a child element for an application-specific error 2493 condition; this element MUST be qualified by an 2494 application-defined namespace, and its structure is defined by 2495 that namespace. 2497 The element is OPTIONAL. If included, it SHOULD be used only 2498 to provide descriptive or diagnostic information that supplements the 2499 meaning of a defined condition or application-specific condition. It 2500 SHOULD NOT be interpreted programmatically by an application. It 2501 SHOULD NOT be used as the error message presented to a user, but MAY 2502 be shown in addition to the error message associated with the 2503 included condition element (or elements). 2505 Note: the XML namespace name 'urn:ietf:params:xml:ns:xmpp-stanzas' 2506 that qualifies the descriptive element adheres to the format defined 2507 in The IETF XML Registry [24]. 2509 9.3.3 Defined Conditions 2511 The following stanza-related error conditions are defined for use in 2512 stanza errors. 2514 o -- the sender has sent XML that is malformed or 2515 that cannot be processed (e.g., an IQ stanza that includes an 2516 unrecognized value of the 'type' attribute); the associated error 2517 type SHOULD be "modify". 2519 o -- access cannot be granted because an existing 2520 resource or session exists with the same name or address; the 2521 associated error type SHOULD be "cancel". 2523 o -- the feature requested is not 2524 implemented by the recipient or server and therefore cannot be 2525 processed; the associated error type SHOULD be "cancel". 2527 o -- the requesting entity does not possess the 2528 required permissions to perform the action; the associated error 2529 type SHOULD be "auth". 2531 o -- the recipient or server can no longer be contacted at 2532 this address (the error stanza MAY contain a new address in the 2533 CDATA of the element); the associated error type SHOULD 2534 be "modify". 2536 o -- the server could not process the 2537 stanza because of a misconfiguration or an otherwise-undefined 2538 internal server error; the associated error type SHOULD be "wait". 2540 o -- the addressed JID or item requested cannot be 2541 found; the associated error type SHOULD be "cancel". 2543 o -- the value of the 'to' attribute in the 2544 sender's stanza does not adhere to the syntax defined in 2545 Addressing Scheme (Section 3); the associated error type SHOULD be 2546 "modify". 2548 o -- the recipient or server understands the 2549 request but is refusing to process it because it does not meet 2550 criteria defined by the recipient or server (e.g., a local policy 2551 regarding acceptable words in messages); the associated error type 2552 SHOULD be "cancel". 2554 o -- the recipient or server does not allow any 2555 entity to perform the action; the associated error type SHOULD be 2556 "cancel". 2558 o -- the requesting entity is not authorized to 2559 access the requested service because payment is required; the 2560 associated error type SHOULD be "auth". 2562 o -- the intended recipient is temporarily 2563 unavailable; the associated error type SHOULD be "wait" (note: an 2564 application MUST NOT return this error if doing so would provide 2565 information about the intended recipient's network availability to 2566 an entity that is not authorized to know such information). 2568 o -- the recipient or server is redirecting requests for 2569 this information to another entity, usually temporarily (the error 2570 stanza MAY contain a new address in the CDATA of the 2571 element); the associated error type SHOULD be "modify". 2573 o -- the requesting entity is not 2574 authorized to access the requested service because registration is 2575 required; the associated error type SHOULD be "auth". 2577 o -- a remote server or service specified 2578 as part or all of the JID of the intended recipient does not 2579 exist; the associated error type SHOULD be "cancel". 2581 o -- a remote server or service specified 2582 as part or all of the JID of the intended recipient could not be 2583 contacted within a reasonable amount of time; the associated error 2584 type SHOULD be "wait". 2586 o -- the server or recipient lacks the system 2587 resources necessary to service the request; the associated error 2588 type SHOULD be "wait". 2590 o -- the server or recipient does not 2591 currently provide the requested service; the associated error type 2592 SHOULD be "cancel". 2594 o -- the requesting entity is not 2595 authorized to access the requested service because a subscription 2596 is required; the associated error type SHOULD be "auth". 2598 o -- the error condition is not one of those 2599 defined by the other conditions in this list; any error type may 2600 be associated with this condition, and it SHOULD be used only in 2601 conjunction with an application-specific condition. 2603 o -- the recipient or server understood the 2604 request but was not expecting it at this time (e.g., the request 2605 was out of order); the associated error type SHOULD be "wait". 2607 9.3.4 Application-Specific Conditions 2609 As noted, an application MAY provide application-specific stanza 2610 error information by including a properly-namespaced child in the 2611 error element. The application-specific element SHOULD supplement or 2612 further qualify a defined element. Thus the element will 2613 contain two or three child elements: 2615 2616 2617 2618 2619 2620 2622 2623 2624 2626 2628 Some special application diagnostic information... 2629 2630 2631 2632 2634 10. XML Usage within XMPP 2636 10.1 Restrictions 2638 XMPP is a simplified and specialized protocol for streaming XML 2639 elements in order to exchange structured information in close to real 2640 time. Because XMPP does not require the parsing of arbitrary and 2641 complete XML documents, there is no requirement that XMPP needs to 2642 support the full XML specification [1]. In particular, the following 2643 restrictions apply. 2645 With regard to XML generation, an XMPP implementation MUST NOT inject 2646 into an XML stream any of the following: 2648 o comments (as defined in Section 2.5 of the XML specification [1]) 2650 o processing instructions (Section 2.6 therein) 2652 o internal or external DTD subsets (Section 2.8 therein) 2654 o internal or external entity references (Section 4.2 therein) with 2655 the exception of predefined entities (Section 4.6 therein) 2657 o character data or attribute values containing unescaped characters 2658 that map to the predefined entities (Section 4.6 therein); such 2659 characters MUST be escaped 2661 With regard to XML processing, if an XMPP implementation receives 2662 such restricted XML data, it MUST ignore the data. 2664 10.2 XML Namespace Names and Prefixes 2666 XML Namespaces [10] are used within all XMPP-compliant XML to create 2667 strict boundaries of data ownership. The basic function of namespaces 2668 is to separate different vocabularies of XML elements that are 2669 structurally mixed together. Ensuring that XMPP-compliant XML is 2670 namespace-aware enables any allowable XML to be structurally mixed 2671 with any data element within XMPP. Rules for XML namespace names and 2672 prefixes are defined in the following subsections. 2674 10.2.1 Streams Namespace 2676 A streams namespace declaration is REQUIRED in all XML stream 2677 headers. The name of the streams namespace MUST be 'http:// 2678 etherx.jabber.org/streams'. The element names of the 2679 element and its and children MUST be qualified 2680 by the streams namespace prefix in all instances. An implementation 2681 SHOULD generate only the 'stream:' prefix for these elements, and for 2682 historical reasons MAY accept only the 'stream:' prefix. 2684 10.2.2 Default Namespace 2686 A default namespace declaration is REQUIRED and is used in all XML 2687 streams in order to define the allowable first-level children of the 2688 root stream element. This namespace declaration MUST be the same for 2689 the initial stream and the response stream so that both streams are 2690 qualified consistently. The default namespace declaration applies to 2691 the stream and all stanzas sent within a stream (unless explicitly 2692 qualified by another namespace, or by the prefix of the streams 2693 namespace or the dialback namespace). 2695 A server implementation MUST support the following two default 2696 namespaces (for historical reasons, some implementations MAY support 2697 only these two default namespaces): 2699 o jabber:client -- this default namespace is declared when the 2700 stream is used for communications between a client and a server 2702 o jabber:server -- this default namespace is declared when the 2703 stream is used for communications between two servers 2705 A client implementation MUST support the 'jabber:client' default 2706 namespace, and for historical reasons MAY support only that default 2707 namespace. 2709 An implementation MUST NOT generate namespace prefixes for elements 2710 in the default namespace if the default namespace is 'jabber:client' 2711 or 'jabber:server'. An implementation SHOULD NOT generate namespace 2712 prefixes for elements qualified by content (as opposed to stream) 2713 namespaces other than 'jabber:client' and 'jabber:server'. 2715 Note: the 'jabber:client' and 'jabber:server' namespaces are nearly 2716 identical but are used in different contexts (client-to-server 2717 communications for 'jabber:client' and server-to-server 2718 communications for 'jabber:server'). The only difference between the 2719 two is that the 'to' and 'from' attributes are OPTIONAL on stanzas 2720 sent within 'jabber:client', whereas they are REQUIRED on stanzas 2721 sent within 'jabber:server'. If a compliant implementation accepts a 2722 stream that is qualified by the 'jabber:client' or 'jabber:server' 2723 namespace, it MUST support the common attributes (Section 9.1) and 2724 basic semantics (Section 9.2) of all three core stanza kinds 2725 (message, presence, and IQ). 2727 10.2.3 Dialback Namespace 2729 A dialback namespace declaration is REQUIRED for all elements used in 2730 server dialback (Section 8). The name of the dialback namespace MUST 2731 be 'jabber:server:dialback'. All elements qualified by this namespace 2732 MUST be prefixed. An implementation SHOULD generate only the 'db:' 2733 prefix for such elements and MAY accept only the 'db:' prefix. 2735 10.3 Validation 2737 Except as noted with regard to 'to' and 'from' addresses for stanzas 2738 within the 'jabber:server' namespace, a server is not responsible for 2739 validating the XML elements forwarded to a client or another server; 2740 an implementation MAY choose to provide only validated data elements 2741 but is NOT REQUIRED to do so (although an implementation MUST NOT 2742 accept XML that is not well-formed). Clients SHOULD NOT rely on the 2743 ability to send data which does not conform to the schemas, and 2744 SHOULD ignore any non-conformant elements or attributes on the 2745 incoming XML stream. Validation of XML streams and stanzas is NOT 2746 REQUIRED or recommended, and schemas are included herein for 2747 descriptive purposes only. 2749 10.4 Inclusion of Text Declaration 2751 Implementations SHOULD send a text declaration before sending a 2752 stream header. Applications MUST follow the rules in the XML 2753 specification [1] regarding the circumstances under which a text 2754 declaration is included. 2756 10.5 Character Encoding 2758 Implementations MUST support the UTF-8 (RFC 2279 [17]) transformation 2759 of Universal Character Set (ISO/IEC 10646-1 [18]) characters, as 2760 required by RFC 2277 [15]. Implementations MUST NOT attempt to use 2761 any other encoding. 2763 11. IANA Considerations 2765 11.1 XML Namespace Name for TLS Data 2767 A URN sub-namespace for TLS-related data in the Extensible Messaging 2768 and Presence Protocol (XMPP) is defined as follows. 2770 URI: urn:ietf:params:xml:ns:xmpp-tls 2772 Specification: [RFCXXXX] 2774 Description: This is the XML namespace name for TLS-related data in 2775 the Extensible Messaging and Presence Protocol (XMPP) as defined 2776 by [RFCXXXX]. 2778 Registrant Contact: IETF, XMPP Working Group, 2780 11.2 XML Namespace Name for SASL Data 2782 A URN sub-namespace for SASL-related data in the Extensible Messaging 2783 and Presence Protocol (XMPP) is defined as follows. 2785 URI: urn:ietf:params:xml:ns:xmpp-sasl 2787 Specification: [RFCXXXX] 2789 Description: This is the XML namespace name for SASL-related data in 2790 the Extensible Messaging and Presence Protocol (XMPP) as defined 2791 by [RFCXXXX]. 2793 Registrant Contact: IETF, XMPP Working Group, 2795 11.3 XML Namespace Name for Stream Errors 2797 A URN sub-namespace for stream-related error data in the Extensible 2798 Messaging and Presence Protocol (XMPP) is defined as follows. 2800 URI: urn:ietf:params:xml:ns:xmpp-streams 2802 Specification: [RFCXXXX] 2804 Description: This is the XML namespace name for stream-related error 2805 data in the Extensible Messaging and Presence Protocol (XMPP) as 2806 defined by [RFCXXXX]. 2808 Registrant Contact: IETF, XMPP Working Group, 2810 11.4 XML Namespace Name for Resource Binding 2812 A URN sub-namespace for resource binding in the Extensible Messaging 2813 and Presence Protocol (XMPP) is defined as follows. 2815 URI: urn:ietf:params:xml:ns:xmpp-bind 2817 Specification: [RFCXXXX] 2819 Description: This is the XML namespace name for resource binding in 2820 the Extensible Messaging and Presence Protocol (XMPP) as defined 2821 by [RFCXXXX]. 2823 Registrant Contact: IETF, XMPP Working Group, 2825 11.5 XML Namespace Name for Stanza Errors 2827 A URN sub-namespace for stanza-related error data in the Extensible 2828 Messaging and Presence Protocol (XMPP) is defined as follows. 2830 URI: urn:ietf:params:xml:ns:xmpp-stanzas 2832 Specification: [RFCXXXX] 2834 Description: This is the XML namespace name for stanza-related error 2835 data in the Extensible Messaging and Presence Protocol (XMPP) as 2836 defined by [RFCXXXX]. 2838 Registrant Contact: IETF, XMPP Working Group, 2840 11.6 Nodeprep Profile of Stringprep 2842 The Nodeprep profile of stringprep is defined under Nodeprep 2843 (Appendix A). The IANA registers Nodeprep in the stringprep profile 2844 registry. 2846 Name of this profile: 2848 Nodeprep 2850 RFC in which the profile is defined: 2852 [RFCXXXX] 2854 Indicator whether or not this is the newest version of the profile: 2856 This is the first version of Nodeprep 2858 11.7 Resourceprep Profile of Stringprep 2860 The Resourceprep profile of stringprep is defined under Resourceprep 2861 (Appendix B). The IANA registers Resourceprep in the stringprep 2862 profile registry. 2864 Name of this profile: 2866 Resourceprep 2868 RFC in which the profile is defined: 2870 [RFCXXXX] 2872 Indicator whether or not this is the newest version of the profile: 2874 This is the first version of Resourceprep 2876 11.8 GSSAPI Service Name 2878 The IANA registers "xmpp" as a GSSAPI [19] service name, as defined 2879 under SASL Definition (Section 6.3). 2881 11.9 Port Numbers 2883 The IANA currently registers "jabber-client" and "jabber-server" as 2884 keywords for TCP ports 5222 and 5269 respectively. The IANA shall 2885 change these registrations to "xmpp-client" and "xmpp-server" 2886 respectively. 2888 These ports SHOULD be used for client-to-server and server-to-server 2889 communications respectively, but their use is NOT REQUIRED. 2891 12. Internationalization Considerations 2893 XML streams MUST be encoded in UTF-8 as specified under Character 2894 Encoding (Section 10.5). As specified under Stream Attributes 2895 (Section 4.2), an XML stream SHOULD include an 'xml:lang' attribute 2896 that is treated as the default language for any XML character data 2897 sent over the stream that is intended to be presented to a human 2898 user. As specified under xml:lang (Section 9.1.5), an XML stanza 2899 SHOULD include an 'xml:lang' attribute if the stanza contains XML 2900 character data that is intended to be presented to a human user. A 2901 server SHOULD apply the default 'xml:lang' attribute to stanzas it 2902 routes or delivers on behalf of connected entities, and MUST NOT 2903 modify or delete 'xml:lang' attributes from stanzas it receives from 2904 other entities. 2906 13. Security Considerations 2908 13.1 High Security 2910 For the purposes of XMPP communications (client-to-server and 2911 server-to-server), the term "high security" refers to the use of 2912 security technologies that provide both mutual authentication and 2913 integrity-checking; in particular, when using certificate-based 2914 authentication to provide high security, a chain-of-trust SHOULD be 2915 established out-of-band, although a shared certificate authority 2916 signing certificates could allow a previously unknown certificate to 2917 establish trust in-band. 2919 Standalone, self-signed service certificates SHOULD NOT be used; 2920 rather, an entity that wishes to generate a self-signed service 2921 certificate SHOULD first generate a self-signed Root CA certificate 2922 and then generate a signed service certificate. Entities that 2923 communicate with the service SHOULD be configured with the Root CA 2924 certificate rather than the service certificate; this avoids problems 2925 associated with simple comparison of service certificates. If a 2926 self-signed service certificate is used, an entity SHOULD NOT trust 2927 it if it is changed to another self-signed certificate or a 2928 certificate signed by an unrecognized authority. 2930 Implementations MUST support high security. Service provisioning 2931 SHOULD use high security, subject to local security policies. 2933 13.2 Client-to-Server Communications 2935 A compliant implementation MUST support both TLS and SASL for 2936 connections to a server. 2938 The TLS protocol for encrypting XML streams (defined under Stream 2939 Encryption (Section 5)) provides a reliable mechanism for helping to 2940 ensure the confidentiality and data integrity of data exchanged 2941 between two entities. 2943 The SASL protocol for authenticating XML streams (defined under 2944 Stream Authentication (Section 6)) provides a reliable mechanism for 2945 validating that a client connecting to a server is who it claims to 2946 be. 2948 Client-to-server communications MUST NOT proceed until the DNS 2949 hostname asserted by the server has been resolved. Such resolutions 2950 SHOULD first attempt to resolve the hostname using an SRV [20] 2951 Service of "xmpp-client" and Proto of "tcp", resulting in resource 2952 records such as "_xmpp-client._tcp.example.com." (the use of the 2953 string "xmpp-client" for the service identifier is consistent with 2954 the IANA registration). If the SRV lookup fails, the fallback is a 2955 normal IPv4/IPv6 address record resolution to determine the IP 2956 address, using the "xmpp-client" port of 5222 assigned by the 2957 Internet Assigned Numbers Authority [5]. 2959 The IP address and method of access of clients MUST NOT be made 2960 available by a server, nor are any connections other than the 2961 original server connection required. This helps to protect the 2962 client's server from direct attack or identification by third 2963 parties. 2965 13.3 Server-to-Server Communications 2967 A compliant implementation MUST support both TLS and SASL for 2968 inter-domain communications. For historical reasons, a compliant 2969 implementation SHOULD also support Server Dialback (Section 8). 2971 Because service provisioning is a matter of policy, it is OPTIONAL 2972 for any given domain to communicate with other domains, and 2973 server-to-server communications MAY be disabled by the administrator 2974 of any given deployment. If a particular domain enables inter-domain 2975 communications, it SHOULD enable high security. 2977 Administrators may want to require use of SASL for server-to-server 2978 communications in order to ensure both authentication and 2979 confidentiality (e.g., on an organization's private network). 2980 Compliant implementations SHOULD support SASL for this purpose. 2982 Inter-domain connections MUST NOT proceed until the DNS hostnames 2983 asserted by the servers have been resolved. Such resolutions MUST 2984 first attempt to resolve the hostname using an SRV [20] Service of 2985 "xmpp-server" and Proto of "tcp", resulting in resource records such 2986 as "_xmpp-server._tcp.example.com." (the use of the string 2987 "xmpp-server" for the service identifier is consistent with the IANA 2988 registration; note well that the "xmpp-server" service identifier 2989 supersedes the earlier use of a "jabber" service identifier, since 2990 the earlier usage did not conform to RFC 2782 [20]; implementations 2991 desiring to be backwards compatible should continue to look for or 2992 answer to the "jabber" service identifier as well). If the SRV lookup 2993 fails, the fallback is a normal IPv4/IPv6 address record resolution 2994 to determine the IP address, using the "xmpp-server" port of 5269 2995 assigned by the Internet Assigned Numbers Authority [5]. 2997 Server dialback helps protect against domain spoofing, thus making it 2998 more difficult to spoof XML stanzas. It is not a mechanism for 2999 authenticating, securing, or encrypting streams between servers as is 3000 done via SASL and TLS. Furthermore, it is susceptible to DNS 3001 poisoning attacks unless DNSSec [29] is used, and even if the DNS 3002 information is accurate, dialback cannot protect from attacks where 3003 the attacker is capable of hijacking the IP address of the remote 3004 domain. Domains requiring robust security SHOULD use TLS and SASL. If 3005 SASL is used for server-to-server authentication, dialback SHOULD NOT 3006 be used since it is unnecessary. 3008 13.4 Order of Layers 3010 The order of layers in which protocols MUST be stacked is as follows: 3012 1. TCP 3014 2. TLS 3016 3. SASL 3018 4. XMPP 3020 The rationale for this order is that TCP is the base connection layer 3021 used by all of the protocols stacked on top of TCP, TLS is often 3022 provided at the operating system layer, SASL is often provided at the 3023 application layer, and XMPP is the application itself. 3025 13.5 Mandatory-to-Implement Technologies 3027 At a minimum, all implementations MUST support the following 3028 mechanisms: 3030 for authentication: the SASL DIGEST-MD5 mechanism 3032 for confidentiality: TLS (using the TLS_RSA_WITH_3DES_EDE_CBC_SHA 3033 cipher) 3035 for both: TLS plus SASL EXTERNAL(using the 3036 TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher supporting client-side 3037 certificates) 3039 13.6 Firewalls 3041 Communications using XMPP normally occur over TCP sockets on port 3042 5222 (client-to-server) or port 5269 (server-to-server), as 3043 registered with the IANA [5] (see IANA Considerations (Section 11)). 3044 Use of these well-known ports allows administrators to easily enable 3045 or disable XMPP activity through existing and commonly-deployed 3046 firewalls. 3048 13.7 Use of base64 in SASL 3050 Both the client and the server SHOULD verify any base64 [14] data 3051 received during SASL negotiation. An implementation MUST reject (not 3052 ignore) any characters that are not explicitly allowed by the base64 3053 alphabet; this helps to guard against creation of a covert channel 3054 that could be used to "leak" information. An implementation MUST NOT 3055 break on invalid input and MUST reject any sequence of base64 3056 characters containing the pad ('=') character if that character is 3057 included as something other than the last character of the data (e.g. 3058 "=AAA" or "BBBB=CCC"); this helps to guard against buffer overflow 3059 attacks and other attacks on the implementation. Base encoding 3060 visually hides otherwise easily recognized information, such as 3061 passwords, but does not provide any computational confidentiality. 3062 Base 64 encoding MUST follow the definition in Section 3 of RFC 3548 3063 [14]. 3065 13.8 Stringprep Profiles 3067 XMPP makes use of the Nameprep [6] profile of stringprep [7] for 3068 processing of domain identifiers; for security considerations related 3069 to Nameprep, refer to the appropriate section of RFC 3491. 3071 In addition, XMPP defines two profiles of stringprep [7]: Nodeprep 3072 (Appendix A) for node identifiers and Resourceprep (Appendix B) for 3073 resource identifiers. 3075 The Unicode and ISO/IEC 10646 repertoires have many characters that 3076 look similar. In many cases, users of security protocols might do 3077 visual matching, such as when comparing the names of trusted third 3078 parties. Because it is impossible to map similar-looking characters 3079 without a great deal of context such as knowing the fonts used, 3080 stringprep does nothing to map similar-looking characters together 3081 nor to prohibit some characters because they look like others. 3083 A node identifier can be employed as one part of an entity's address 3084 in XMPP. One common usage is as the username of an instant messaging 3085 user; another is as the name of a multi-user chat room; and many 3086 other kinds of entities could use node identifiers as part of their 3087 addresses. The security of such services could be compromised based 3088 on different interpretations of the internationalized node 3089 identifier; for example, a user entering a single internationalized 3090 node identifier could access another user's account information, or a 3091 user could gain access to an otherwise restricted chat room or 3092 service. 3094 A resource identifier can be employed as one part of an entity's 3095 address in XMPP. One common usage is as the name for an instant 3096 messaging user's active session; another is as the nickname of a user 3097 in a multi-user chat room; and many other kinds of entities could use 3098 resource identifiers as part of their addresses. The security of such 3099 services could be compromised based on different interpretations of 3100 the internationalized resource identifier; for example, a user could 3101 attempt to initiate multiple sessions with the same name, or a user 3102 could send a message to someone other than the intended recipient in 3103 a multi-user chat room. 3105 14. Server Rules for Handling XML Stanzas 3107 Each server implementation will contain its own "delivery tree" for 3108 handling stanzas it receives. Such a tree determines whether a stanza 3109 needs to be routed to another domain, processed internally, or 3110 delivered to a resource associated with a connected node. The 3111 following rules apply: 3113 14.1 No 'to' Address 3115 If the stanza possesses no 'to' attribute, the server SHOULD process 3116 it on behalf of the entity that sent it. Because all stanzas received 3117 from other servers MUST possess a 'to' attribute, this rule applies 3118 only to stanzas received from a registered entity (such as a client) 3119 that is connected to the server. If the server receives a presence 3120 stanza with no 'to' attribute, the server SHOULD broadcast it to the 3121 entities that are subscribed to the sending entity's presence, if 3122 applicable (the semantics of presence broadcast for instant messaging 3123 and presence applications are defined in XMPP IM [21]). If the server 3124 receives an IQ stanza of type "get" or "set" with no 'to' attribute 3125 and it understands the namespace that qualifies the content of the 3126 stanza, it MUST either process the stanza on behalf of sending entity 3127 (where the meaning of "process" is determined by the semantics of the 3128 qualifying namespace) or return an error to the sending entity. 3130 14.2 Foreign Domain 3132 If the hostname of the domain identifier portion of the JID contained 3133 in the 'to' attribute does not match one of the configured hostnames 3134 of the server itself or a subdomain thereof, the server SHOULD route 3135 the stanza to the foreign domain (subject to local service 3136 provisioning and security policies regarding inter-domain 3137 communication). There are two possible cases: 3139 A server-to-server stream already exists between the two domains: The 3140 sender's server routes the stanza to the authoritative server for 3141 the foreign domain over the existing stream 3143 There exists no server-to-server stream between the two domains: The 3144 sender's server (1) resolves the hostname of the foreign domain 3145 (as defined under Server-to-Server Communications (Section 13.3)), 3146 (2) negotiates a server-to-server stream between the two domains 3147 (as defined under Stream Encryption (Section 5) and Stream 3148 Authentication (Section 6)), and (3) routes the stanza to the 3149 authoritative server for the foreign domain over the 3150 newly-established stream 3152 If routing to the recipient's server is unsuccessful, the sender's 3153 server MUST return an error to the sender; if the recipient's server 3154 can be contacted but delivery by the recipient's server to the 3155 recipient is unsuccessful, the recipient's server MUST return an 3156 error to the sender by way of the sender's server. 3158 14.3 Subdomain 3160 If the hostname of the domain identifier portion of the JID contained 3161 in the 'to' attribute matches a subdomain of one of the configured 3162 hostnames of the server itself, the server MUST either process the 3163 stanza itself or route the stanza to a specialized service that is 3164 responsible for that subdomain (if the subdomain is configured), or 3165 return an error to the sender (if the subdomain is not configured). 3167 14.4 Mere Domain or Specific Resource 3169 If the hostname of the domain identifier portion of the JID contained 3170 in the 'to' attribute matches a configured hostname of the server 3171 itself and the JID contained in the 'to' attribute is of the form 3172 or , the server (or a defined resource 3173 thereof) MUST either process the stanza as appropriate for the stanza 3174 kind or return an error stanza to the sender. 3176 14.5 Node in Same Domain 3178 If the hostname of the domain identifier portion of the JID contained 3179 in the 'to' attribute matches a configured hostname of the server 3180 itself and the JID contained in the 'to' attribute is of the form 3181 or , the server SHOULD deliver 3182 the stanza to the intended recipient of the stanza as represented by 3183 the JID contained in the 'to' attribute. The following rules apply: 3185 1. If the JID contains a resource identifier (i.e., is of the form 3186 ) and there is an available resource that 3187 matches the full JID, the recipient's server SHOULD deliver the 3188 stanza to the stream or session that exactly matches the resource 3189 identifier. 3191 2. If the JID contains a resource identifier and there is no 3192 available resource that matches the full JID, the recipient's 3193 server SHOULD return to the sender a 3194 stanza error. 3196 3. If the JID is of the form and there is at least one 3197 available resource available for the node, the recipient's server 3198 MUST deliver the stanza to at least one of the available 3199 resources, according to application-specific rules (a set of 3200 delivery rules for instant messaging and presence applications is 3201 defined in XMPP IM [21]). 3203 15. Compliance Requirements 3205 This section summarizes the specific aspects of the Extensible 3206 Messaging and Presence Protocol that MUST be supported by servers and 3207 clients in order to be considered compliant implementations, as well 3208 as additional protocol aspects that SHOULD be supported. For 3209 compliance purposes, we draw a distinction between core protocols 3210 (which MUST be supported by any server or client, regardless of the 3211 specific application) and instant messaging protocols (which MUST be 3212 supported only by instant messaging and presence applications built 3213 on top of the core protocols). Compliance requirements that apply to 3214 all servers and clients are specified in this section; compliance 3215 requirements for instant messaging servers and clients are specified 3216 in the corresponding section of XMPP IM [21]. 3218 15.1 Servers 3220 In addition to all defined requirements with regard to security, XML 3221 usage, and internationalization, a server MUST support the following 3222 core protocols in order to be considered compliant: 3224 o Enforcement of the Nameprep [6], Nodeprep (Appendix A), and 3225 Resourceprep (Appendix B) profiles of stringprep 3227 o XML streams (Section 4), including stream encryption (Section 5) 3228 using TLS, stream authentication (Section 6) using SASL, and 3229 resource binding (Section 7) 3231 o The basic semantics of the three defined stanza kinds (i.e., 3232 , , and ) as specified in stanza 3233 semantics (Section 9.2) 3235 o Generation (and, where appropriate, handling) of error syntax and 3236 semantics related to streams, TLS, SASL, and XML stanzas 3238 In addition, a server SHOULD support the following core protocol: 3240 o Server dialback (Section 8) 3242 15.2 Clients 3244 A client MUST support the following core protocols in order to be 3245 considered compliant: 3247 o XML streams (Section 4), including stream encryption (Section 5) 3248 using TLS, stream authentication (Section 6) using SASL, and 3249 resource binding (Section 7) 3251 o The basic semantics of the three defined stanza kinds (i.e., 3252 , , and ) as specified in stanza 3253 semantics (Section 9.2) 3255 o Handling (and, where appropriate, generation) of error syntax and 3256 semantics related to streams, TLS, SASL, and XML stanzas 3258 In addition, a client SHOULD support the following core protocols: 3260 o Generation of addresses in accordance with the Nameprep [6], 3261 Nodeprep (Appendix A), and Resourceprep (Appendix B) profiles of 3262 stringprep 3264 Normative References 3266 [1] Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, 3267 "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC-xml, 3268 October 2000, . 3270 [2] Day, M., Aggarwal, S. and J. Vincent, "Instant Messaging / 3271 Presence Protocol Requirements", RFC 2779, February 2000. 3273 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement 3274 Levels", BCP 14, RFC 2119, March 1997. 3276 [4] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, 3277 September 1981. 3279 [5] Internet Assigned Numbers Authority, "Internet Assigned Numbers 3280 Authority", January 1998, . 3282 [6] Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep Profile 3283 for Internationalized Domain Names (IDN)", RFC 3491, March 3284 2003. 3286 [7] Hoffman, P. and M. Blanchet, "Preparation of Internationalized 3287 Strings ("stringprep")", RFC 3454, December 2002. 3289 [8] Crocker, D. and P. Overell, "Augmented BNF for Syntax 3290 Specifications: ABNF", RFC 2234, November 1997. 3292 [9] Hinden, R. and S. Deering, "IP Version 6 Addressing 3293 Architecture", RFC 2373, July 1998. 3295 [10] Bray, T., Hollander, D. and A. Layman, "Namespaces in XML", W3C 3296 REC-xml-names, January 1999, . 3299 [11] Dierks, T., Allen, C., Treese, W., Karlton, P., Freier, A. and 3300 P. Kocher, "The TLS Protocol Version 1.0", RFC 2246, January 3301 1999. 3303 [12] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 3305 [13] Myers, J., "Simple Authentication and Security Layer (SASL)", 3306 RFC 2222, October 1997. 3308 [14] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", 3309 RFC 3548, July 2003. 3311 [15] Alvestrand, H., "IETF Policy on Character Sets and Languages", 3312 BCP 18, RFC 2277, January 1998. 3314 [16] Alvestrand, H., "Tags for the Identification of Languages", BCP 3315 47, RFC 3066, January 2001. 3317 [17] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 3318 2279, January 1998. 3320 [18] International Organization for Standardization, "Information 3321 Technology - Universal Multiple-octet coded Character Set (UCS) 3322 - Amendment 2: UCS Transformation Format 8 (UTF-8)", ISO 3323 Standard 10646-1 Addendum 2, October 1996. 3325 [19] Linn, J., "Generic Security Service Application Program 3326 Interface, Version 2", RFC 2078, January 1997. 3328 [20] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for 3329 specifying the location of services (DNS SRV)", RFC 2782, 3330 February 2000. 3332 Informative References 3334 [21] Saint-Andre, P. and J. Miller, "XMPP Instant Messaging", 3335 draft-ietf-xmpp-im-18 (work in progress), October 2003. 3337 [22] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., 3338 Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- 3339 HTTP/1.1", RFC 2616, June 1999. 3341 [23] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform 3342 Resource Identifiers (URI): Generic Syntax", RFC 2396, August 3343 1998. 3345 [24] Mealling, M., "The IETF XML Registry", 3346 draft-mealling-iana-xmlns-registry-05 (work in progress), June 3347 2003. 3349 [25] Crispin, M., "Internet Message Access Protocol - Version 3350 4rev1", RFC 2060, December 1996. 3352 [26] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD 3353 53, RFC 1939, May 1996. 3355 [27] Newman, C. and J. Myers, "ACAP -- Application Configuration 3356 Access Protocol", RFC 2244, November 1997. 3358 [28] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595, 3359 June 1999. 3361 [29] Eastlake, D., "Domain Name System Security Extensions", RFC 3362 2535, March 1999. 3364 [30] Jabber Software Foundation, "Jabber Software Foundation", 3365 . 3367 Authors' Addresses 3369 Peter Saint-Andre 3370 Jabber Software Foundation 3372 EMail: stpeter@jabber.org 3374 Jeremie Miller 3375 Jabber Software Foundation 3377 EMail: jeremie@jabber.org 3379 Appendix A. Nodeprep 3381 A.1 Introduction 3383 This appendix defines the "Nodeprep" profile of stringprep (RFC 3454 3384 [7]). As such, it specifies processing rules that will enable users 3385 to enter internationalized node identifiers in the Extensible 3386 Messaging and Presence Protocol (XMPP) and have the highest chance of 3387 getting the content of the strings correct. (An XMPP node identifier 3388 is the optional portion of an XMPP address that precedes a domain 3389 identifier and the '@' separator; it is often but not exclusively 3390 associated with an instant messaging username.) These processing 3391 rules are intended only for XMPP node identifiers and are not 3392 intended for arbitrary text or any other aspect of an XMPP address. 3394 This profile defines the following, as required by RFC 3454 [7]: 3396 o The intended applicability of the profile: internationalized node 3397 identifiers within XMPP 3399 o The character repertoire that is the input and output to 3400 stringprep: Unicode 3.2, specified in Section 2 of this Appendix 3402 o The mappings used: specified in Section 3 3404 o The Unicode normalization used: specified in Section 4 3406 o The characters that are prohibited as output: specified in Section 3407 5 3409 o Bidirectional character handling: specified in Section 6 3411 A.2 Character Repertoire 3413 This profile uses Unicode 3.2 with the list of unassigned code points 3414 being Table A.1, both defined in Appendix A of RFC 3454 [7]. 3416 A.3 Mapping 3418 This profile specifies mapping using the following tables from RFC 3419 3454 [7]: 3421 Table B.1 3423 Table B.2 3425 A.4 Normalization 3427 This profile specifies using Unicode normalization form KC, as 3428 described in RFC 3454 [7]. 3430 A.5 Prohibited Output 3432 This profile specifies prohibiting use of the following tables from 3433 RFC 3454 [7]. 3435 Table C.1.1 3437 Table C.1.2 3439 Table C.2.1 3441 Table C.2.2 3443 Table C.3 3445 Table C.4 3447 Table C.5 3449 Table C.6 3451 Table C.7 3453 Table C.8 3455 Table C.9 3457 In addition, the following Unicode characters are also prohibited: 3459 #x22 (") 3461 #x26 (&) 3463 #x27 (') 3465 #x2F (/) 3467 #x3A (:) 3469 #x3C (<) 3471 #x3E (>) 3473 #x40 (@) 3475 A.6 Bidirectional Characters 3477 This profile specifies checking bidirectional strings as described in 3478 Section 6 of RFC 3454 [7]. 3480 Appendix B. Resourceprep 3481 B.1 Introduction 3483 This appendix defines the "Resourceprep" profile of stringprep (RFC 3484 3454 [7]). As such, it specifies processing rules that will enable 3485 users to enter internationalized resource identifiers in the 3486 Extensible Messaging and Presence Protocol (XMPP) and have the 3487 highest chance of getting the content of the strings correct. (An 3488 XMPP resource identifier is the optional portion of an XMPP address 3489 that follows a domain identifier and the '/' separator; it is often 3490 but not exclusively associated with an instant messaging session 3491 name.) These processing rules are intended only for XMPP resource 3492 identifiers and are not intended for arbitrary text or any other 3493 aspect of an XMPP address. 3495 This profile defines the following, as required by RFC 3454 [7]: 3497 o The intended applicability of the profile: internationalized 3498 resource identifiers within XMPP 3500 o The character repertoire that is the input and output to 3501 stringprep: Unicode 3.2, specified in Section 2 of this Appendix 3503 o The mappings used: specified in Section 3 3505 o The Unicode normalization used: specified in Section 4 3507 o The characters that are prohibited as output: specified in Section 3508 5 3510 o Bidirectional character handling: specified in Section 6 3512 B.2 Character Repertoire 3514 This profile uses Unicode 3.2 with the list of unassigned code points 3515 being Table A.1, both defined in Appendix A of RFC 3454 [7]. 3517 B.3 Mapping 3519 This profile specifies mapping using the following tables from RFC 3520 3454 [7]: 3522 Table B.1 3524 B.4 Normalization 3526 This profile specifies using Unicode normalization form KC, as 3527 described in RFC 3454 [7]. 3529 B.5 Prohibited Output 3531 This profile specifies prohibiting use of the following tables from 3532 RFC 3454 [7]. 3534 Table C.1.2 3536 Table C.2.1 3538 Table C.2.2 3540 Table C.3 3542 Table C.4 3544 Table C.5 3546 Table C.6 3548 Table C.7 3550 Table C.8 3552 Table C.9 3554 B.6 Bidirectional Characters 3556 This profile specifies checking bidirectional strings as described in 3557 Section 6 of RFC 3454 [7]. 3559 Appendix C. XML Schemas 3561 The following XML schemas are descriptive, not normative. For schemas 3562 defining the 'jabber:client' and 'jabber:server' namespaces, refer to 3563 XMPP IM [21]. 3565 C.1 Streams namespace 3567 3569 3575 3578 3579 3580 3581 3582 3583 3586 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3600 3601 3602 3603 3607 3608 3609 3611 3612 3613 3614 3616 3620 3621 3622 3624 3626 C.2 Stream error namespace 3628 3630 3637 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3676 3678 C.3 TLS namespace 3680 3682 3688 3689 3690 3691 3695 3696 3697 3699 3700 3701 3703 3704 3705 3706 3707 3709 3711 C.4 SASL namespace 3713 3715 3721 3722 3723 3724 3725 3726 3727 3729 3731 3732 3733 3736 3737 3739 3740 3741 3742 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3758 3759 3760 3761 3762 3763 3764 3766 3767 3768 3769 3770 3772 3774 C.5 Resource binding namespace 3776 3777 3783 3784 3785 3786 3787 3788 3789 3790 3792 3793 3795 3797 C.6 Dialback namespace 3799 3801 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3846 3848 C.7 Stanza error namespace 3850 3852 3859 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3884 3885 3886 3887 3888 3890 3891 3892 3893 3894 3896 3898 Appendix D. Differences Between Core Jabber Protocol and XMPP 3900 This section is non-normative. 3902 XMPP has been adapted from the protocols originally developed in the 3903 Jabber open-source community, which can be thought of as "XMPP 0.9". 3905 Because there exists a large installed base of Jabber implementations 3906 and deployments, it may be helpful to specify the key differences 3907 between Jabber and XMPP in order to expedite and encourage upgrades 3908 of those implementations and deployments to XMPP. This section 3909 summarizes the core differences, while the corresponding section of 3910 XMPP IM [21] summarizes the differences that relate specifically to 3911 instant messaging and presence applications. 3913 D.1 Channel Encryption 3915 It is common practice in the Jabber community to use SSL for channel 3916 encryption on ports other than 5222 and 5269 (the convention is to 3917 use ports 5223 and 5270). XMPP uses TLS over the IANA-registered 3918 ports for channel encryption, as defined under Stream Encryption 3919 (Section 5) herein. 3921 D.2 Authentication 3923 The client-server authentication protocol developed in the Jabber 3924 community uses a basic IQ interaction qualified by the 3925 'jabber:iq:auth' namespace (documentation of this protocol is 3926 contained in "JEP-0078: Non-SASL Authentication", published by the 3927 Jabber Software Foundation [30]). XMPP uses SASL for authentication, 3928 as defined under Stream Authentication (Section 6) herein. 3930 The Jabber community does not currently possess an authentication 3931 protocol for server-to-server communications, only the Server 3932 Dialback (Section 8) protocol to prevent server spoofing. XMPP 3933 augments Server Dialback with a true server-to-server authentication 3934 protocol, as defined under Stream Authentication (Section 6) herein. 3936 D.3 Resource Binding 3938 Resource binding in the Jabber community is handled via the 3939 'jabber:iq:auth' namespace that is also used for client 3940 authentication with a server. XMPP defines a dedicated namespace for 3941 resource binding as well as the ability for a server to generate a 3942 resource identifier on behalf of a client, as defined under Resource 3943 Binding (Section 7). 3945 D.4 JID Processing 3947 JID processing was somewhat loosely defined by the Jabber community 3948 (documentation of forbidden characters and case handling is contained 3949 in "JEP-0029: Definition of Jabber Identifiers", published by the 3950 Jabber Software Foundation [30]). XMPP specifies the use of Nameprep 3951 [6] for domain identifiers and supplements Nameprep with two 3952 additional stringprep [7] profiles for JID processing: Nodeprep 3953 (Appendix A) for node identifiers and Resourceprep (Appendix B) for 3954 resource identifiers . 3956 D.5 Error Handling 3958 Stream-related errors are handled in the Jabber community via simple 3959 CDATA text in a element. In XMPP, stream-related 3960 errors are handled via an extensible mechanism defined under Stream 3961 Errors (Section 4.6) herein. 3963 Stanza-related errors are handled in the Jabber community via 3964 HTTP-style error codes. In XMPP, stanza-related errors are handled 3965 via an extensible mechanism defined under Stanza Errors (Section 9.3) 3966 herein. (Documentation of a mapping between Jabber and XMPP error 3967 handling mechanisms is contained in "JEP-0086: Legacy Errors", 3968 published by the Jabber Software Foundation [30].) 3970 D.6 Internationalization 3972 Although use of UTF-8 has always been standard practice within the 3973 Jabber community, the community did not define mechanisms for 3974 specifying the language of human-readable text provided in CDATA 3975 sections. XMPP specifies the use of the 'xml:lang' attribute in such 3976 contexts, as defined under Stream Attributes (Section 4.2) and 3977 xml:lang (Section 9.1.5) herein. 3979 D.7 Stream Version Attribute 3981 The Jabber community does not include a 'version' attribute in stream 3982 headers. XMPP specifies inclusion of that attribute, with a value of 3983 '1.0', as a way to signal support for the stream features 3984 (authentication, encryption, etc.) defined under Version Support 3985 (Section 4.2.1) herein. 3987 Appendix E. Revision History 3989 Note to RFC Editor: please remove this entire appendix, and the 3990 corresponding entries in the table of contents, prior to publication. 3992 E.1 Changes from draft-ietf-xmpp-core-18 3994 o Added the 'xml:lang' attribute to the root element per 3995 previous consensus and list discussion. 3997 o Added the , , and stanza 3998 errors. 4000 o Changed dataype of stream error and of 4001 and stanza errors to xs:string so that these elements 4002 may contain programmatic information. 4004 o Removed and SASL errors. 4006 o Removed references to RFC 952 and RFC 1123 (domain name format is 4007 handled by reference to Nameprep). 4009 o Changed address record resolution text so that it is not specific 4010 to IPv4. 4012 o Clarified text in appendices regarding scope of Nodeprep and 4013 Resourceprep. 4015 o Removed requirement that receiving entity terminate the TCP 4016 connection upon receiving an element from or sending a 4017 element to the initiating entity during SASL 4018 negotiation. 4020 o Removed recommendation that TLS and SASL security layer should not 4021 both be used simultaneously. 4023 o Added subsection to Security Considerations regarding use of 4024 base64 in SASL. 4026 o Specified rules regarding inclusion of username in SASL 4027 negotiation. 4029 o Adjusted content related to SASL authorization identities, since 4030 the previous text did not track RFC2222bis. 4032 o Added section on resource binding to compensate for changes to 4033 SASL authorization identity text. 4035 o Specified ABNF for JIDs. 4037 o Checked all references. 4039 o Completed a thorough proofreading and consistency check of the 4040 entire text. 4042 E.2 Changes from draft-ietf-xmpp-core-17 4044 o Specified that UTF-8 is the only allowable encoding. 4046 o Added stream errors for , , 4047 and , as well as a error for 4048 generic XML error conditions. 4050 o Folded Nodeprep and Resourceprep profiles into this document. 4052 o Moved most delivery handling rules from XMPP IM to XMPP Core. 4054 o Moved detailed stanza syntax descriptions from XMPP Core to XMPP 4055 IM. 4057 o Moved stanza schemas from XMPP Core to XMPP IM. 4059 E.3 Changes from draft-ietf-xmpp-core-16 4061 o Added and stream errors. 4063 o Changed the datatype for the and 4064 stream errors from 'xs:string' to 'empty'. 4066 o Further clarified server handling of the basic stanza kinds. 4068 o Further clarified character encoding rules per list discussion. 4070 o Specified meaning of version='1.0' flag in stream headers. 4072 o Added stream closure to SASL failure cases in order to mirror 4073 handling of TLS failures. 4075 o Added section on compliance requirements for server and client 4076 implementations. 4078 o Added non-normative section on differences between Jabber usage 4079 and XMPP specifications. 4081 E.4 Changes from draft-ietf-xmpp-core-15 4083 o Added and stream errors. 4085 o Added SASL error and clarified error. 4087 o Made 'id' required for IQ stanzas. 4089 E.5 Changes from draft-ietf-xmpp-core-14 4091 o Added SRV lookup for client-to-server communications. 4093 o Changed server SRV record to conform to RFC 2782; specifically, 4094 the service identifier was changed from 'jabber' to 4095 'jabber-server'. 4097 E.6 Changes from draft-ietf-xmpp-core-13 4099 o Clarified stream restart after successful TLS and SASL 4100 negotiation. 4102 o Clarified requirement for resolution of DNS hostnames. 4104 o Clarified text regarding namespaces. 4106 o Clarified examples regarding empty element. 4108 o Added several more SASL error conditions. 4110 o Changed stream error to and 4111 added to schema. 4113 o Made small editorial changes and fixed several schema errors. 4115 E.7 Changes from draft-ietf-xmpp-core-12 4117 o Moved server dialback to a separate section; clarified its 4118 security characteristics and its role in the protocol. 4120 o Adjusted error handling syntax and semantics per list discussion. 4122 o Further clarified length of node identifiers and total length of 4123 JIDs. 4125 o Documented message type='normal'. 4127 o Corrected several small errors in the TLS and SASL sections. 4129 o Corrected several errors in the schemas. 4131 E.8 Changes from draft-ietf-xmpp-core-11 4133 o Corrected several small errors in the TLS and SASL sections. 4135 o Made small editorial changes and fixed several schema errors. 4137 E.9 Changes from draft-ietf-xmpp-core-10 4139 o Adjusted TLS content regarding certificate validation process. 4141 o Specified that stanza error extensions for specific applications 4142 are to be properly namespaced children of the relevant descriptive 4143 element. 4145 o Clarified rules for inclusion of the 'id' attribute. 4147 o Specified that the 'xml:lang' attribute SHOULD be included (per 4148 list discussion). 4150 o Made small editorial changes and fixed several schema errors. 4152 E.10 Changes from draft-ietf-xmpp-core-09 4154 o Fixed several dialback error conditions. 4156 o Cleaned up rules regarding TLS and certificate processing based on 4157 off-list feedback. 4159 o Changed and elements to 4160 . 4162 o Added or modified several stream and stanza error conditions. 4164 o Specified only one child allowed for IQ, or two if type="error". 4166 o Fixed several errors in the schemas. 4168 E.11 Changes from draft-ietf-xmpp-core-08 4170 o Incorporated list discussion regarding addressing, SASL, TLS, TCP, 4171 dialback, namespaces, extensibility, and the meaning of 'ignore' 4172 for routers and recipients. 4174 o Specified dialback error conditions. 4176 o Made small editorial changes to address RFC Editor requirements. 4178 E.12 Changes from draft-ietf-xmpp-core-07 4180 o Made several small editorial changes. 4182 E.13 Changes from draft-ietf-xmpp-core-06 4184 o Added text regarding certificate validation in TLS negotiation per 4185 list discussion. 4187 o Clarified nature of XML restrictions per discussion with W3C, and 4188 moved XML Restrictions subsection under "XML Usage within XMPP". 4190 o Further clarified that XML streams are unidirectional. 4192 o Changed stream error and stanza error namespace names to conform 4193 to the format defined in The IETF XML Registry [24]. 4195 o Removed note to RFC Editor regarding provisional namespace names. 4197 E.14 Changes from draft-ietf-xmpp-core-05 4199 o Added as a stream error condition. 4201 o Adjusted security considerations per discussion at IETF 56 and on 4202 list. 4204 E.15 Changes from draft-ietf-xmpp-core-04 4206 o Added server-to-server examples for TLS and SASL. 4208 o Changed error syntax, rules, and examples based on list 4209 discussion. 4211 o Added schemas for the TLS, stream error, and stanza error 4212 namespaces. 4214 o Added note to RFC Editor regarding provisional namespace names. 4216 o Made numerous small editorial changes and clarified text 4217 throughout. 4219 E.16 Changes from draft-ietf-xmpp-core-03 4221 o Clarified rules and procedures for TLS and SASL. 4223 o Amplified stream error code syntax per list discussion. 4225 o Made numerous small editorial changes. 4227 E.17 Changes from draft-ietf-xmpp-core-02 4229 o Added dialback schema. 4231 o Removed all DTDs since schemas provide more complete definitions. 4233 o Added stream error codes. 4235 o Clarified error code "philosophy". 4237 E.18 Changes from draft-ietf-xmpp-core-01 4239 o Updated the addressing restrictions per list discussion and added 4240 references to the new Nodeprep and Resourceprep profiles. 4242 o Corrected error in Stream Authentication regarding 'version' 4243 attribute. 4245 o Made numerous small editorial changes. 4247 E.19 Changes from draft-ietf-xmpp-core-00 4249 o Added information about TLS from list discussion. 4251 o Clarified meaning of "ignore" based on list discussion. 4253 o Clarified information about Universal Character Set data and 4254 character encodings. 4256 o Provided base64-decoded information for examples. 4258 o Fixed several errors in the schemas. 4260 o Made numerous small editorial fixes. 4262 E.20 Changes from draft-miller-xmpp-core-02 4264 o Brought Stream Authentication section into line with discussion on 4265 list and at IETF 55 meeting. 4267 o Added information about the optional 'xml:lang' attribute per 4268 discussion on list and at IETF 55 meeting. 4270 o Specified that validation is neither required nor recommended, and 4271 that the formal definitions (DTDs and schemas) are included for 4272 descriptive purposes only. 4274 o Specified that the response to an IQ stanza of type "get" or "set" 4275 must be an IQ stanza of type "result" or "error". 4277 o Specified that compliant server implementations must process 4278 stanzas in order. 4280 o Specified that for historical reasons some server implementations 4281 may accept 'stream:' as the only valid namespace prefix on the 4282 root stream element. 4284 o Clarified the difference between 'jabber:client' and 4285 'jabber:server' namespaces, namely, that 'to' and 'from' 4286 attributes are required on all stanzas in the latter but not the 4287 former. 4289 o Fixed typo in Step 9 of the dialback protocol (changed db:result 4290 to db:verify). 4292 o Removed references to TLS pending list discussion. 4294 o Removed the non-normative appendix on OpenPGP usage pending its 4295 inclusion in a separate I-D. 4297 o Simplified the architecture diagram, removed most references to 4298 services, and removed references to the 'jabber:component:*' 4299 namespaces. 4301 o Noted that XMPP activity respects firewall administration 4302 policies. 4304 o Further specified the scope and uniqueness of the 'id' attribute 4305 in all stanza kinds and the element in message stanzas. 4307 o Nomenclature changes: (1) from "chunks" to "stanzas"; (2) from 4308 "host" to "server" and from "node" to "client" (except with regard 4309 to definition of the addressing scheme). 4311 Intellectual Property Statement 4313 The IETF takes no position regarding the validity or scope of any 4314 intellectual property or other rights that might be claimed to 4315 pertain to the implementation or use of the technology described in 4316 this document or the extent to which any license under such rights 4317 might or might not be available; neither does it represent that it 4318 has made any effort to identify any such rights. Information on the 4319 IETF's procedures with respect to rights in standards-track and 4320 standards-related documentation can be found in BCP-11. Copies of 4321 claims of rights made available for publication and any assurances of 4322 licenses to be made available, or the result of an attempt made to 4323 obtain a general license or permission for the use of such 4324 proprietary rights by implementors or users of this specification can 4325 be obtained from the IETF Secretariat. 4327 The IETF invites any interested party to bring to its attention any 4328 copyrights, patents or patent applications, or other proprietary 4329 rights which may cover technology that may be required to practice 4330 this standard. Please address the information to the IETF Executive 4331 Director. 4333 Full Copyright Statement 4335 Copyright (C) The Internet Society (2003). All Rights Reserved. 4337 This document and translations of it may be copied and furnished to 4338 others, and derivative works that comment on or otherwise explain it 4339 or assist in its implementation may be prepared, copied, published 4340 and distributed, in whole or in part, without restriction of any 4341 kind, provided that the above copyright notice and this paragraph are 4342 included on all such copies and derivative works. However, this 4343 document itself may not be modified in any way, such as by removing 4344 the copyright notice or references to the Internet Society or other 4345 Internet organizations, except as needed for the purpose of 4346 developing Internet standards in which case the procedures for 4347 copyrights defined in the Internet Standards process must be 4348 followed, or as required to translate it into languages other than 4349 English. 4351 The limited permissions granted above are perpetual and will not be 4352 revoked by the Internet Society or its successors or assignees. 4354 This document and the information contained herein is provided on an 4355 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 4356 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 4357 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 4358 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 4359 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4361 Acknowledgment 4363 Funding for the RFC Editor function is currently provided by the 4364 Internet Society.