idnits 2.17.1 draft-ietf-xmpp-core-22.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 : ---------------------------------------------------------------------------- == 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 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 (January 20, 2004) is 7401 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) -- Looks like a reference, but probably isn't: '43' on line 376 -- Looks like a reference, but probably isn't: '3' on line 1205 ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 3548 (ref. 'BASE64') (Obsoleted by RFC 4648) ** Obsolete normative reference: RFC 2831 (ref. 'DIGEST-MD5') (Obsoleted by RFC 6331) ** Obsolete normative reference: RFC 2078 (ref. 'GSS-API') (Obsoleted by RFC 2743) ** Obsolete normative reference: RFC 2818 (ref. 'HTTP-TLS') (Obsoleted by RFC 9110) ** Downref: Normative reference to an Informational RFC: RFC 2779 (ref. 'IMP-REQS') ** Obsolete normative reference: RFC 2373 (ref. 'IPv6') (Obsoleted by RFC 3513) ** Obsolete normative reference: RFC 3066 (ref. 'LANGTAGS') (Obsoleted by RFC 4646, RFC 4647) ** Obsolete normative reference: RFC 3490 (ref. 'IDNA') (Obsoleted by RFC 5890, RFC 5891) ** Obsolete normative reference: RFC 3491 (ref. 'NAMEPREP') (Obsoleted by RFC 5891) ** Obsolete normative reference: RFC 2222 (ref. 'SASL') (Obsoleted by RFC 4422, RFC 4752) ** Obsolete normative reference: RFC 3454 (ref. 'STRINGPREP') (Obsoleted by RFC 7564) ** Obsolete normative reference: RFC 793 (ref. 'TCP') (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) -- Possible downref: Non-RFC (?) normative reference: ref. 'UCS2' ** Obsolete normative reference: RFC 3280 (ref. 'X509') (Obsoleted by RFC 5280) -- Possible downref: Non-RFC (?) normative reference: ref. 'XML' -- Possible downref: Non-RFC (?) normative reference: ref. 'XML-NAMES' -- Obsolete informational reference (is this intentional?): RFC 2535 (ref. 'DNSSEC') (Obsoleted by RFC 4033, RFC 4034, RFC 4035) -- Obsolete informational reference (is this intentional?): RFC 2616 (ref. 'HTTP') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 2060 (ref. 'IMAP') (Obsoleted by RFC 3501) -- Obsolete informational reference (is this intentional?): RFC 1750 (ref. 'RANDOM') (Obsoleted by RFC 4086) -- Obsolete informational reference (is this intentional?): RFC 2396 (ref. 'URI') (Obsoleted by RFC 3986) == Outdated reference: A later version (-22) exists of draft-ietf-xmpp-im-21 Summary: 16 errors (**), 0 flaws (~~), 5 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 XMPP Working Group P. Saint-Andre (ed.) 2 Internet-Draft Jabber Software Foundation 3 Expires: July 20, 2004 January 20, 2004 5 Extensible Messaging and Presence Protocol (XMPP): Core 6 draft-ietf-xmpp-core-22 8 Status of this Memo 10 This document is an Internet-Draft and is in full conformance with 11 all provisions of Section 10 of RFC2026. 13 Internet-Drafts are working documents of the Internet Engineering 14 Task Force (IETF), its areas, and its working groups. Note that other 15 groups may also distribute working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or obsoleted by other documents at any 19 time. It is inappropriate to use Internet-Drafts as reference 20 material or to cite them other than as "work in progress." 22 The list of current Internet-Drafts can be accessed at http:// 23 www.ietf.org/ietf/1id-abstracts.txt. 25 The list of Internet-Draft Shadow Directories can be accessed at 26 http://www.ietf.org/shadow.html. 28 This Internet-Draft will expire on July 20, 2004. 30 Copyright Notice 32 Copyright (C) The Internet Society (2004). All Rights Reserved. 34 Abstract 36 This memo defines the core features of the Extensible Messaging and 37 Presence Protocol (XMPP), a protocol for streaming Extensible Markup 38 Language (XML) elements in order to exchange structured information 39 in close to real time between any two network endpoints. While XMPP 40 provides a generalized, extensible framework for exchanging XML data, 41 it is used mainly for the purpose of building instant messaging and 42 presence applications that meet the requirements of RFC 2779. 44 Table of Contents 46 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 47 2. Generalized Architecture . . . . . . . . . . . . . . . . . . . 4 48 3. Addressing Scheme . . . . . . . . . . . . . . . . . . . . . . 6 49 4. XML Streams . . . . . . . . . . . . . . . . . . . . . . . . . 8 50 5. Use of TLS . . . . . . . . . . . . . . . . . . . . . . . . . . 19 51 6. Use of SASL . . . . . . . . . . . . . . . . . . . . . . . . . 26 52 7. Resource Binding . . . . . . . . . . . . . . . . . . . . . . . 37 53 8. Server Dialback . . . . . . . . . . . . . . . . . . . . . . . 39 54 9. XML Stanzas . . . . . . . . . . . . . . . . . . . . . . . . . 46 55 10. Server Rules for Handling XML Stanzas . . . . . . . . . . . . 55 56 11. XML Usage within XMPP . . . . . . . . . . . . . . . . . . . . 57 57 12. Core Compliance Requirements . . . . . . . . . . . . . . . . . 60 58 13. Internationalization Considerations . . . . . . . . . . . . . 61 59 14. Security Considerations . . . . . . . . . . . . . . . . . . . 62 60 15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 67 61 Normative References . . . . . . . . . . . . . . . . . . . . . 69 62 Informative References . . . . . . . . . . . . . . . . . . . . 71 63 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 72 64 A. Nodeprep . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 65 B. Resourceprep . . . . . . . . . . . . . . . . . . . . . . . . . 74 66 C. XML Schemas . . . . . . . . . . . . . . . . . . . . . . . . . 76 67 D. Differences Between Core Jabber Protocol and XMPP . . . . . . 84 68 E. Revision History . . . . . . . . . . . . . . . . . . . . . . . 85 69 Intellectual Property and Copyright Statements . . . . . . . . 95 71 1. Introduction 73 1.1 Overview 75 The Extensible Messaging and Presence Protocol (XMPP) is an open XML 76 [XML] protocol for near-real-time messaging, presence, and 77 request-response services. The basic syntax and semantics were 78 developed originally within the Jabber open-source community, mainly 79 in 1999. In 2002, the XMPP WG was chartered with developing an 80 adaptation of the Jabber protocol that would be suitable as an IETF 81 instant messaging (IM) and presence technology. As a result of work 82 by the XMPP WG, the current memo defines the core features of XMPP; 83 Extensible Messaging and Presence Protocol (XMPP): Instant Messaging 84 and Presence [XMPP-IM] defines the extensions required to provide the 85 instant messaging and presence functionality defined in RFC 2779 86 [IMP-REQS]. 88 1.2 Terminology 90 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 91 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 92 "OPTIONAL" in this document are to be interpreted as described in RFC 93 2119 [TERMS]. 95 1.3 Contributors 97 Most of the core aspects of the Extensible Messaging and Presence 98 Protocol were developed originally within the Jabber open-source 99 community in 1999. This community was founded by Jeremie Miller, who 100 released source code for the initial version of the jabberd server in 101 January 1999. Major early contributors to the base protocol also 102 included Ryan Eatmon, Peter Millard, Thomas Muldowney, and Dave 103 Smith. Work by the XMPP Working Group has concentrated especially on 104 security and internationalization; in these areas, protocols for the 105 use of TLS and SASL were originally contributed by Rob Norris, and 106 stringprep profiles were originally contributed by Joe Hildebrand. 107 The error code syntax was suggested by Lisa Dusseault. 109 1.4 Acknowledgements 111 Thanks are due to a number of individuals in addition to the 112 contributors listed. Although it is difficult to provide a complete 113 list, the following individuals were particularly helpful in defining 114 the protocols or in commenting on the specifications in this memo: 115 Thomas Charron, Richard Dobson, Sam Hartman, Schuyler Heath, Jonathan 116 Hogg, Cullen Jennings, Craig Kaes, Jacek Konieczny, Alexey Melnikov, 117 Keith Minkler, Julian Missig, Pete Resnick, Marshall Rose, Alexey 118 Shchepin, Jean-Louis Seguineau, Iain Shigeoka, Greg Troxel, and David 119 Waite. Thanks also to members of the XMPP Working Group and the IETF 120 community for comments and feedback provided throughout the life of 121 this memo. 123 2. Generalized Architecture 125 2.1 Overview 127 Although XMPP is not wedded to any specific network architecture, to 128 date it usually has been implemented via a typical client-server 129 architecture, wherein a client utilizing XMPP accesses a server over 130 a TCP [TCP] connection. 132 The following diagram provides a high-level overview of this 133 architecture (where "-" represents communications that use XMPP and 134 "=" represents communications that use any other protocol). 136 C1 - S1 - S2 - C3 137 / \ 138 C2 - G1 = FN1 = FC1 140 The symbols are as follows: 142 o C1, C2, C3 -- XMPP clients 144 o S1, S2 -- XMPP servers 146 o G1 -- A gateway that translates between XMPP and the protocol(s) 147 used on a foreign (non-XMPP) messaging network 149 o FN1 -- A foreign messaging network 151 o FC1 -- A client on a foreign messaging network 153 2.2 Server 155 A server acts as an intelligent abstraction layer for XMPP 156 communications. Its primary responsibilities are: 158 o to manage connections from or sessions for other entities, in the 159 form of XML streams (Section 4) to and from authorized clients, 160 servers, and other entities 162 o to route appropriately-addressed XML stanzas (Section 9) among 163 such entities over XML streams 165 Most XMPP-compliant servers also assume responsibility for the 166 storage of data that is used by clients (e.g., contact lists for 167 users of XMPP-based instant messaging and presence applications); in 168 this case, the XML data is processed directly by the server itself on 169 behalf of the client and is not routed to another entity. 171 2.3 Client 173 Most clients connect directly to a server over a [TCP] connection and 174 use XMPP to take full advantage of the functionality provided by a 175 server and any associated services. Although there is no necessary 176 coupling of an XML stream to a TCP connection (e.g., a client could 177 connect via HTTP [HTTP] polling or some other mechanism), this 178 specification defines a binding of XMPP to TCP only. Multiple 179 resources (e.g., devices or locations) MAY connect simultaneously to 180 a server on behalf of each authorized client, with each resource 181 differentiated by the resource identifier of an XMPP address (e.g., 182 vs. ) as defined under 183 Addressing Scheme (Section 3). The RECOMMENDED port for connections 184 between a client and a server is 5222, as registered with the IANA 185 (see Port Numbers (Section 15.9)). 187 2.4 Gateway 189 A gateway is a special-purpose server-side service whose primary 190 function is to translate XMPP into the protocol used by a foreign 191 (non-XMPP) messaging system, as well as to translate the return data 192 back into XMPP. Examples are gateways to Internet Relay Chat (IRC), 193 Short Message Service (SMS), SIMPLE, SMTP, and legacy instant 194 messaging networks such as AIM, ICQ, MSN Messenger, and Yahoo! 195 Instant Messenger. Communications between gateways and servers, and 196 between gateways and the foreign messaging system, are not defined in 197 this document. 199 2.5 Network 201 Because each server is identified by a network address and because 202 server-to-server communications are a straightforward extension of 203 the client-to-server protocol, in practice the system consists of a 204 network of servers that inter-communicate. Thus user-a@domain1 is 205 able to exchange messages, presence, and other information with 206 user-b@domain2. This pattern is familiar from messaging protocols 207 (such as SMTP) that make use of network addressing standards. 208 Communications between any two servers are OPTIONAL. If enabled, 209 such communications SHOULD occur over XML streams that are bound to 210 [TCP] connections. The RECOMMENDED port for connections between 211 servers is 5269, as registered with the IANA (see Port Numbers 212 (Section 15.9)). 214 3. Addressing Scheme 216 3.1 Overview 218 An entity is anything that can be considered a network endpoint 219 (i.e., an ID on the network) and that can communicate using XMPP. 220 All such entities are uniquely addressable in a form that is 221 consistent with RFC 2396 [URI]. For historical reasons, the address 222 of an XMPP entity is called a Jabber Identifier or JID. A valid JID 223 contains a set of ordered elements formed of a domain identifier, 224 node identifier, and resource identifier. 226 The syntax for a JID is defined below using Augmented Backus-Naur 227 Form as defined in [ABNF]. The IPv4address and IPv6address rules are 228 defined in Appendix B of [IPv6]; the allowable character sequences 229 that conform to the node rule are defined by the Nodeprep (Appendix 230 A) profile of [STRINGPREP] as documented in this memo; the allowable 231 character sequences that conform to the resource rule are defined by 232 the Resourceprep (Appendix B) profile of [STRINGPREP] as documented 233 in this memo; and the sub-domain rule makes reference to the concept 234 of a domain label as described in [IDNA]. 236 jid = [ node "@" ] domain [ "/" resource ] 237 domain = fqdn / address-literal 238 fqdn = (sub-domain 1*("." sub-domain)) 239 sub-domain = ([IDNA] conformant domain label) 240 address-literal = IPv4address / IPv6address 242 All JIDs are based on the foregoing structure. The most common use 243 of this structure is to identify an instant messaging user, the 244 server to which the user connects, and the user's connected resource 245 (e.g., a specific client) in the form of . 246 However, node types other than clients are possible; for example, a 247 specific chat room offered by a multi-user chat service could be 248 addressed as (where "room" is the name of the chat 249 room and "service" is the hostname of the multi-user chat service) 250 and a specific occupant of such a room could be addressed as 251 (where "nick" is the occupant's room nickname). 252 Many other JID types are possible (e.g., could be a 253 server-side script or service). 255 Each allowable portion of a JID (node identifier, domain identifier, 256 and resource identifier) MUST NOT be more than 1023 bytes in length, 257 resulting in a maximum total size (including the '@' and '/' 258 separators) of 3071 bytes. 260 3.2 Domain Identifier 261 The domain identifier is the primary identifier and is the only 262 REQUIRED element of a JID (a mere domain identifier is a valid JID). 263 It usually represents the network gateway or "primary" server to 264 which other entities connect for XML routing and data management 265 capabilities. However, the entity referenced by a domain identifier 266 is not always a server, and may be a service that is addressed as a 267 subdomain of a server and that provides functionality above and 268 beyond the capabilities of a server (e.g., a multi-user chat service, 269 a user directory, or a gateway to a foreign messaging system). 271 The domain identifier for every server or service that will 272 communicate over a network MAY be an IP address but SHOULD be a fully 273 qualified domain name (see [DNS]). A domain identifier MUST be an 274 "internationalized domain name" as defined in [IDNA], to which the 275 Nameprep [NAMEPREP] profile of stringprep [STRINGPREP] can be applied 276 without failing. Before comparing two domain identifiers, a server 277 MUST (and a client SHOULD) first apply the Nameprep profile to the 278 labels (as defined in [IDNA]) that make up each identifier. 280 3.3 Node Identifier 282 The node identifier is an optional secondary identifier placed before 283 the domain identifier and separated from the latter by the '@' 284 character. It usually represents the entity requesting and using 285 network access provided by the server or gateway (i.e., a client), 286 although it can also represent other kinds of entities (e.g., a chat 287 room associated with a multi-user chat service). The entity 288 represented by a node identifier is addressed within the context of a 289 specific domain; within instant messaging and presence applications 290 of XMPP this address is called a "bare JID" and is of the form 291 . 293 A node identifier MUST be formatted such that the Nodeprep (Appendix 294 A) profile of [STRINGPREP] can be applied to it without failing. 295 Before comparing two node identifiers, a server MUST (and a client 296 SHOULD) first apply the Nodeprep profile to each identifier. 298 3.4 Resource Identifier 300 The resource identifier is an optional tertiary identifier placed 301 after the domain identifier and separated from the latter by the '/' 302 character. A resource identifier may modify either a 303 or mere address. It usually represents a specific session, 304 connection (e.g., a device or location), or object (e.g., a 305 participant in a multi-user chat room) belonging to the entity 306 associated with a node identifier. A resource identifier is opaque 307 to both servers and other clients, and is typically defined by a 308 client implementation when it provides the information necessary to 309 complete Resource Binding (Section 7) (although it may be generated 310 by a server on behalf of a client), after which it is referred to as 311 a "connected resource". An entity MAY maintain multiple connected 312 resources simultaneously, with each connected resource differentiated 313 by a distinct resource identifier. 315 A resource identifier MUST be formatted such that the Resourceprep 316 (Appendix B) profile of [STRINGPREP] can be applied to it without 317 failing. Before comparing two resource identifiers, a server MUST 318 (and a client SHOULD) first apply the Resourceprep profile to each 319 identifier. 321 3.5 Determination of Addresses 323 After SASL negotiation (Section 6) and, if appropriate, Resource 324 Binding (Section 7), the receiving entity for a stream MUST determine 325 the initiating entity's JID. 327 For server-to-server communications, the initiating entity's JID 328 SHOULD be the authorization identity, derived from the authentication 329 identity as defined by the Simple Authentication and Security Layer 330 (SASL) specification [SASL] if no authorization identity was 331 specified during SASL negotiation (Section 6). 333 For client-to-server communications, the "bare JID" () 334 SHOULD be the authorization identity, derived from the authentication 335 identity as defined in [SASL] if no authorization identity was 336 specified during SASL negotiation (Section 6); the resource 337 identifier portion of the "full JID" () SHOULD 338 be the resource identifier negotiated by the client and server during 339 Resource Binding (Section 7). 341 The receiving entity MUST ensure that the resulting JID (including 342 node identifier, domain identifier, resource identifier, and 343 separator characters) conforms to the rules and formats defined 344 earlier in this section; to meet this restriction, the receiving 345 entity may need to replace the JID sent by the initiating entity with 346 the canonicalized JID as determined by the receiving entity. 348 4. XML Streams 350 4.1 Overview 352 Two fundamental concepts make possible the rapid, asynchronous 353 exchange of relatively small payloads of structured information 354 between presence-aware entities: XML streams and XML stanzas. These 355 terms are defined as follows: 357 Definition of XML Stream: An XML stream is a container for the 358 exchange of XML elements between any two entities over a network. 359 An XML stream is negotiated from an initiating entity (usually a 360 client or server) to a receiving entity (usually a server), 361 normally over a [TCP] connection, and corresponds to the 362 initiating entity's "session" with the receiving entity. The 363 start of the XML stream is denoted unambiguously by an opening XML 364 tag (with appropriate attributes and namespace 365 declarations), while the end of the XML stream is denoted 366 unambiguously by a closing XML tag. An XML stream is 367 unidirectional; in order to enable bidirectional information 368 exchange, the initiating entity and receiving entity MUST 369 negotiate one stream in each direction (the "initial stream" and 370 the "response stream"), normally over the same TCP connection. 372 Definition of XML Stanza: An XML stanza is a discrete semantic unit 373 of structured information that is sent from one entity to another 374 over an XML stream. An XML stanza exists at the direct child 375 level of the root element and is said to be 376 well-balanced if it matches production [43] content of [XML]. The 377 start of any XML stanza is denoted unambiguously by the element 378 start tag at depth=1 of the XML stream (e.g., ), and the 379 end of any XML stanza is denoted unambiguously by the 380 corresponding close tag at depth=1 (e.g., ). An XML 381 stanza MAY contain child elements (with accompanying attributes, 382 elements, and CDATA) as necessary in order to convey the desired 383 information. The only defined XML stanzas are , 384 , and as defined under XML Stanzas (Section 9); 385 an XML element sent for the purpose of Transport Layer Security 386 (TLS) negotiation (Section 5), Simple Authentication and Security 387 Layer (SASL) negotiation (Section 6), or server dialback (Section 388 8) is not considered to be an XML stanza. 390 Consider the example of a client's session with a server. In order 391 to connect to a server, a client MUST initiate an XML stream by 392 sending an opening tag to the server, optionally preceded by 393 a text declaration specifying the XML version and the character 394 encoding supported (see Inclusion of Text Declaration (Section 11.4); 395 see also Character Encoding (Section 11.5)). Subject to local 396 policies and service provisioning, the server SHOULD then reply with 397 a second XML stream back to the client, again optionally preceded by 398 a text declaration. Once the client has completed SASL negotiation 399 (Section 6), the client MAY send an unbounded number of XML stanzas 400 over the stream to any recipient on the network. When the client 401 desires to close the stream, it simply sends a closing tag 402 to the server (alternatively, the stream may be closed by the 403 server), after which both the client and server SHOULD close the 404 underlying TCP connection as well. 406 Those who are accustomed to thinking of XML in a document-centric 407 manner may wish to view a client's session with a server as 408 consisting of two open-ended XML documents: one from the client to 409 the server and one from the server to the client. From this 410 perspective, the root element can be considered the 411 document entity for each "document", and the two "documents" are 412 built up through the accumulation of XML stanzas sent over the two 413 XML streams. However, this perspective is a convenience only, and 414 XMPP does not deal in documents but in XML streams and XML stanzas. 416 In essence, then, an XML stream acts as an envelope for all the XML 417 stanzas sent during a session. We can represent this in a simplistic 418 fashion as follows: 420 |--------------------| 421 | | 422 |--------------------| 423 | | 424 | | 425 | | 426 |--------------------| 427 | | 428 | | 429 | | 430 |--------------------| 431 | | 432 | | 433 | | 434 |--------------------| 435 | ... | 436 |--------------------| 437 | | 438 |--------------------| 440 4.2 Stream Attributes 442 The attributes of the stream element are as follows: 444 o to -- The 'to' attribute SHOULD be used only in the XML stream 445 header from the initiating entity to the receiving entity, and 446 MUST be set to a hostname serviced by the receiving entity. There 447 SHOULD be no 'to' attribute set in the XML stream header by which 448 the receiving entity replies to the initiating entity; however, if 449 a 'to' attribute is included, it SHOULD be silently ignored by the 450 initiating entity. 452 o from -- The 'from' attribute SHOULD be used only in the XML stream 453 header from the receiving entity to the initiating entity, and 454 MUST be set to a hostname serviced by the receiving entity that is 455 granting access to the initiating entity. There SHOULD be no 456 'from' attribute on the XML stream header sent from the initiating 457 entity to the receiving entity; however, if a 'from' attribute is 458 included, it SHOULD be silently ignored by the receiving entity. 460 o id -- The 'id' attribute SHOULD be used only in the XML stream 461 header from the receiving entity to the initiating entity. This 462 attribute is a unique identifier created by the receiving entity 463 to function as a session key for the initiating entity's streams 464 with the receiving entity, and MUST be unique within the receiving 465 application (normally a server). Note well that the stream ID may 466 be security-critical and therefore MUST be both unpredictable and 467 nonrepeating (see [RANDOM] for recommendations regarding 468 randomness for security purposes). There SHOULD be no 'id' 469 attribute on the XML stream header sent from the initiating entity 470 to the receiving entity; however, if an 'id' attribute is 471 included, it SHOULD be silently ignored by the receiving entity. 473 o xml:lang -- An 'xml:lang' attribute (as defined in Section 2.12 of 474 [XML]) SHOULD be included by the initiating entity on the header 475 for the initial stream to specify the default language of any 476 human-readable XML character data it sends over that stream. If 477 the attribute is included, the receiving entity SHOULD remember 478 that value as the default for both the initial stream and the 479 response stream; if the attribute is not included, the receiving 480 entity SHOULD use a configurable default value for both streams, 481 which it MUST communicate in the header for the response stream. 482 For all stanzas sent over the initial stream, if the initiating 483 entity does not include an 'xml:lang' attribute, the receiving 484 entity SHOULD apply the default value; if the initiating entity 485 does include an 'xml:lang' attribute, the receiving entity MUST 486 NOT modify or delete it (see also xml:lang (Section 9.1.5)). The 487 value of the 'xml:lang' attribute MUST be an NMTOKEN (as defined 488 in Section 2.3 of [XML]) and MUST conform to the format defined in 489 RFC 3066 [LANGTAGS]. 491 o version -- The presence of the version attribute set to a value of 492 "1.0" signals support for the stream-related protocols (including 493 stream features) defined in this specification. Detailed rules 494 regarding generation and handling of this attribute are defined 495 below. 497 We can summarize as follows: 499 | initiating to receiving | receiving to initiating 500 ---------+---------------------------+----------------------- 501 to | hostname of receiver | silently ignored 502 from | silently ignored | hostname of receiver 503 id | silently ignored | session key 504 xml:lang | default language | default language 505 version | signals XMPP 1.0 support | signals XMPP 1.0 support 507 4.2.1 Version Support 509 The version of XMPP specified herein is "1.0"; in particular, this 510 encapsulates the stream-related protocols (Use of TLS (Section 5), 511 Use of SASL (Section 6), and Stream Errors (Section 4.6)) as well as 512 the semantics of the three defined XML stanza types (, 513 , and ). The numbering scheme for XMPP versions is 514 ".". The major and minor numbers MUST be treated as 515 separate integers and each number MAY be incremented higher than a 516 single digit. Thus, "XMPP 2.4" would be a lower version than "XMPP 517 2.13", which in turn would be lower than "XMPP 12.3". Leading zeros 518 (e.g., "XMPP 6.01") MUST be ignored by recipients and MUST NOT be 519 sent. 521 The major version number should be incremented only if the stream and 522 stanza formats or required actions have changed so dramatically that 523 an older version entity would not be able to interoperate with a 524 newer version entity if it simply ignored the elements and attributes 525 it did not understand and took the actions specified in the older 526 specification. The minor version number indicates new capabilities, 527 and MUST be ignored by an entity with a smaller minor version number, 528 but used for informational purposes by the node with the larger minor 529 version number. For example, a minor version number might indicate 530 the ability to process a newly defined value of the 'type' attribute 531 for message, presence, or IQ stanzas; the node with the larger minor 532 version number would simply note that its correspondent would not be 533 able to understand that value of the 'type' attribute and therefore 534 would not send it. 536 The following rules apply to the generation and handling by 537 implementations of the 'version' attribute within stream headers: 539 1. The initiating entity MUST set the value of the 'version' 540 attribute on the initial stream header to the highest version 541 number it supports (e.g., if the highest version number it 542 supports is that defined in this specification, it MUST set the 543 value to "1.0"). 545 2. The receiving entity MUST set the value of the 'version' 546 attribute on the response stream header to either the value 547 supplied by the initiating entity or highest version number 548 supported by the receiving entity, whichever is lower. The 549 receiving entity MUST perform a numeric comparison on the major 550 and minor version numbers, not a string match on 551 ".". 553 3. If the version number included in the response stream header is 554 at least one major version lower than the version number included 555 in the initial stream header and newer version entities cannot 556 interoperate with older version entities as described above, the 557 initiating entity SHOULD generate an 558 stream error and terminate the XML stream and underlying TCP 559 connection. 561 4. If either entity receives a stream header with no 'version' 562 attribute, the entity MUST consider the version supported by the 563 other entity to be "0.0" and SHOULD NOT include a 'version' 564 attribute in the stream header it sends in reply. 566 4.3 Namespace Declarations 568 The stream element MUST possess both a streams namespace declaration 569 and a default namespace declaration (as "namespace declaration" is 570 defined in the XML namespaces specification [XML-NAMES]). For 571 detailed information regarding the streams namespace and default 572 namespace, see Namespace Names and Prefixes (Section 11.2). 574 4.4 Stream Features 576 If the initiating entity includes the 'version' attribute set to a 577 value of "1.0" in the initial stream header, the receiving entity 578 MUST send a child element (prefixed by the streams 579 namespace prefix) to the initiating entity in order to announce any 580 stream-level features that can be negotiated (or capabilities that 581 otherwise need to be advertised). Currently this is used only to 582 advertise Use of TLS (Section 5), Use of SASL (Section 6), and 583 Resource Binding (Section 7) as defined herein, and for Session 584 Establishment as defined in [XMPP-IM]; however, the stream features 585 functionality could be used to advertise other negotiable features in 586 the future. If an entity does not understand or support some 587 features, it SHOULD silently ignore them. 589 4.5 Stream Security 591 When negotiating XML streams in XMPP 1.0, TLS SHOULD be used as 592 defined under Use of TLS (Section 5) and SASL MUST be used as defined 593 under Use of SASL (Section 6). If the initiating entity attempts to 594 send an XML Stanza (Section 9) before the stream has been 595 authenticated, the receiving entity SHOULD return a 596 stream error to the initiating entity and then terminate both the XML 597 stream and the underlying TCP connection. 599 4.6 Stream Errors 601 The root stream element MAY contain an child element that is 602 prefixed by the streams namespace prefix. The error child MUST be 603 sent by a compliant entity (usually a server rather than a client) if 604 it perceives that a stream-level error has occurred. 606 4.6.1 Rules 608 The following rules apply to stream-level errors: 610 o It is assumed that all stream-level errors are unrecoverable; 611 therefore, if an error occurs at the level of the stream, the 612 entity that detects the error MUST send a stream error to the 613 other entity, send a closing tag, and terminate the 614 underlying TCP connection. 616 o If the error occurs while the stream is being set up, the 617 receiving entity MUST still send the opening tag, include 618 the element as a child of the stream element, send the 619 closing tag, and terminate the underlying TCP 620 connection. In this case, if the initiating entity provides an 621 unknown host in the 'to' attribute (or provides no 'to' attribute 622 at all), the server SHOULD provide the server's authoritative 623 hostname in the 'from' attribute of the stream header sent before 624 termination. 626 4.6.2 Syntax 628 The syntax for stream errors is as follows: 630 631 632 633 OPTIONAL descriptive text 634 635 [OPTIONAL application-specific condition element] 636 638 The element: 640 o MUST contain a child element corresponding to one of the defined 641 stanza error conditions defined below; this element MUST be 642 qualified by the 'urn:ietf:params:xml:ns:xmpp-streams' namespace 644 o MAY contain a child containing XML character data that 645 describes the error in more detail; this element MUST be qualified 646 by the 'urn:ietf:params:xml:ns:xmpp-streams' namespace and SHOULD 647 possess an 'xml:lang' attribute specifying the natural language of 648 the XML character data 650 o MAY contain a child element for an application-specific error 651 condition; this element MUST be qualified by an 652 application-defined namespace, and its structure is defined by 653 that namespace 655 The element is OPTIONAL. If included, it SHOULD be used only 656 to provide descriptive or diagnostic information that supplements the 657 meaning of a defined condition or application-specific condition. It 658 SHOULD NOT be interpreted programmatically by an application. It 659 SHOULD NOT be used as the error message presented to a user, but MAY 660 be shown in addition to the error message associated with the 661 included condition element (or elements). 663 4.6.3 Defined Conditions 665 The following stream-level error conditions are defined: 667 o -- the entity has sent XML that cannot be processed; 668 this error MAY be used rather than more specific XML-related 669 errors such as , , 670 , , and 671 , although the more specific errors are 672 preferred. 674 o -- the entity has sent a namespace prefix 675 that is unsupported, or has sent no namespace prefix on an element 676 that requires such a prefix (see XML Namespace Names and Prefixes 677 (Section 11.2)). 679 o -- the server is closing the active stream for this 680 entity because a new stream has been initiated that conflicts with 681 the existing stream. 683 o -- the entity has not generated any traffic 684 over the stream for some period of time (configurable according to 685 a local service policy). 687 o -- the value of the 'to' attribute provided by the 688 initiating entity in the stream header corresponds to a hostname 689 that is no longer hosted by the server. 691 o -- the value of the 'to' attribute provided by the 692 initiating entity in the stream header does not correspond to a 693 hostname that is hosted by the server. 695 o -- a stanza sent between two servers lacks 696 a 'to' or 'from' attribute (or the attribute has no value). 698 o -- the server has experienced a 699 misconfiguration or an otherwise-undefined internal error that 700 prevents it from servicing the stream. 702 o -- the JID or hostname provided in a 'from' 703 address does not match an authorized JID or validated domain 704 negotiated between servers via SASL or dialback, or between a 705 client and a server via authentication and resource binding. 707 o -- the stream ID or dialback ID is invalid or does 708 not match an ID previously provided. 710 o -- the streams namespace name is something 711 other than "http://etherx.jabber.org/streams" or the dialback 712 namespace name is something other than "jabber:server:dialback" 713 (see XML Namespace Names and Prefixes (Section 11.2)). 715 o -- the entity has sent invalid XML over the stream 716 to a server that performs validation (see Validation (Section 717 11.3)). 719 o -- the entity has attempted to send data before 720 the stream has been authenticated, or otherwise is not authorized 721 to perform an action related to stream negotiation; the receiving 722 entity MUST NOT process the offending stanza before sending the 723 stream error. 725 o -- the entity has violated some local service 726 policy; the server MAY choose to specify the policy in the 727 element. 729 o -- the server is unable to properly 730 connect to a remote entity that is required for authentication or 731 authorization. 733 o -- the server lacks the system resources 734 necessary to service the stream. 736 o -- the entity has attempted to send restricted 737 XML features such as a comment, processing instruction, DTD, 738 entity reference, or unescaped character (see Restrictions 739 (Section 11.1)). 741 o -- the server will not provide service to the 742 initiating entity but is redirecting traffic to another host; the 743 server SHOULD specify the alternate hostname or IP address (which 744 MUST be a valid domain identifier) in the CDATA of the 745 element. 747 o -- the server is being shut down and all active 748 streams are being closed. 750 o -- the error condition is not one of those 751 defined by the other conditions in this list; this error condition 752 SHOULD be used only in conjunction with an application-specific 753 condition. 755 o -- the initiating entity has encoded the 756 stream in an encoding that is not supported by the server (see 757 Character Encoding (Section 11.5)). 759 o -- the initiating entity has sent a 760 first-level child of the stream that is not supported by the 761 server. 763 o -- the value of the 'version' attribute 764 provided by the initiating entity in the stream header specifies a 765 version of XMPP that is not supported by the server; the server 766 MAY specify the version(s) it supports in the element. 768 o -- the initiating entity has sent XML that 769 is not well-formed as defined by [XML]. 771 4.6.4 Application-Specific Conditions 773 As noted, an application MAY provide application-specific stream 774 error information by including a properly-namespaced child in the 775 error element. The application-specific element SHOULD supplement or 776 further qualify a defined element. Thus the element will 777 contain two or three child elements: 779 780 782 783 Some special application diagnostic information! 784 785 787 788 790 4.7 Simplified Stream Examples 792 This section contains two simplified examples of a stream-based 793 "session" of a client on a server (where the "C" lines are sent from 794 the client to the server, and the "S" lines are sent from the server 795 to the client); these examples are included for the purpose of 796 illustrating the concepts introduced thus far. 798 A basic "session": 800 C: 801 806 S: 807 813 ... encryption, authentication, and resource binding ... 814 C: 817 C: Art thou not Romeo, and a Montague? 818 C: 819 S: 822 S: Neither, fair saint, if either thee dislike. 823 S: 824 C: 825 S: 827 A "session" gone bad: 829 C: 830 835 S: 836 842 ... encryption, authentication, and resource binding ... 843 C: 844 Bad XML, no closing body tag! 845 846 S: 847 849 850 S: 852 5. Use of TLS 854 5.1 Overview 856 XMPP includes a method for securing the stream from tampering and 857 eavesdropping. This channel encryption method makes use of the 858 Transport Layer Security (TLS) protocol [TLS], along with a 859 "STARTTLS" extension that is modelled after similar extensions for 860 the IMAP [IMAP], POP3 [POP3], and ACAP [ACAP] protocols as described 861 in RFC 2595 [USINGTLS]. The namespace name for the STARTTLS 862 extension is 'urn:ietf:params:xml:ns:xmpp-tls'. 864 An administrator of a given domain MAY require the use of TLS for 865 client-to-server communications, server-to-server communications, or 866 both. Clients SHOULD use TLS to secure the streams prior to 867 attempting to complete SASL negotiation (Section 6), and servers 868 SHOULD use TLS between two domains for the purpose of securing 869 server-to-server communications. 871 The following rules apply: 873 1. An initiating entity that complies with this specification MUST 874 include the 'version' attribute set to a value of "1.0" in the 875 initial stream header. 877 2. If the TLS negotiation occurs between two servers, 878 communications MUST NOT proceed until the Domain Name System 879 (DNS) hostnames asserted by the servers have been resolved (see 880 Server-to-Server Communications (Section 14.4)). 882 3. When a receiving entity that complies with this specification 883 receives an initial stream header that includes the 'version' 884 attribute set to a value of "1.0", after sending a stream header 885 in reply (including the version flag) it MUST include a 886 element (qualified by the 887 'urn:ietf:params:xml:ns:xmpp-tls' namespace) along with the list 888 of other stream features it supports. 890 4. If the initiating entity chooses to use TLS, TLS negotiation 891 MUST be completed before proceeding to SASL negotiation; this 892 order of negotiation is required in order to help safeguard 893 authentication information sent during SASL negotiation, as well 894 as to make it possible to base the use of the SASL EXTERNAL 895 mechanism on a certificate provided during prior TLS 896 negotiation. 898 5. During TLS negotiation, an entity MUST NOT send any white space 899 characters (matching production [3] content of [XML]) within the 900 root stream element as separators between elements (any white 901 space characters shown in the TLS examples below are included 902 for the sake of readability only); this prohibition helps to 903 ensure proper security layer byte precision. 905 6. The receiving entity MUST consider the TLS negotiation to have 906 begun immediately after sending the closing ">" character of the 907 element. The initiating entity MUST consider the TLS 908 negotiation to have begun immediately after receiving the 909 closing ">" character of the element from the 910 receiving entity. 912 7. The initiating entity MUST validate the certificate presented by 913 the receiving entity; see Certificate Validation (Section 14.2) 914 regarding certificate validation procedures. 916 8. Certificates MUST be checked against the hostname as provided by 917 the initiating entity (e.g., a user), not the hostname as 918 resolved via the Domain Name System; e.g., if the user specifies 919 a hostname of "example.com" but a DNS SRV [SRV] lookup returned 920 "im.example.com", the certificate MUST be checked as 921 "example.com". If a JID for any kind of XMPP entity (e.g., 922 client or server) is represented in a certificate, it SHOULD be 923 encoded as a GeneralName entry of type otherName inside the 924 subjectAltName, along with a type-id whose value is "xmpp" (as 925 these terms are profiled in [X509]). 927 9. If the TLS negotiation is successful, the receiving entity MUST 928 discard any knowledge obtained in an insecure manner from the 929 initiating entity before TLS takes effect. 931 10. If the TLS negotiation is successful, the initiating entity MUST 932 discard any knowledge obtained in an insecure manner from the 933 receiving entity before TLS takes effect. 935 11. If the TLS negotiation is successful, the receiving entity MUST 936 NOT offer the STARTTLS extension to the initiating entity along 937 with the other stream features that are offered when the stream 938 is restarted. 940 12. If the TLS negotiation is successful, the initiating entity MUST 941 continue with SASL negotiation. 943 13. If the TLS negotiation results in failure, the receiving entity 944 MUST terminate both the XML stream and the underlying TCP 945 connection. 947 14. See Mandatory-to-Implement Technologies (Section 14.7) regarding 948 mechanisms that MUST be supported. 950 5.2 Narrative 952 When an initiating entity secures a stream with a receiving entity, 953 the steps involved are as follows: 955 1. The initiating entity opens a TCP connection and initiates the 956 stream by sending the opening XML stream header to the receiving 957 entity, including the 'version' attribute set to a value of 958 "1.0". 960 2. The receiving entity responds by opening a TCP connection and 961 sending an XML stream header to the initiating entity, including 962 the 'version' attribute set to a value of "1.0". 964 3. The receiving entity offers the STARTTLS extension to the 965 initiating entity by including it with the list of other 966 supported stream features (if TLS is required for interaction 967 with the receiving entity, it SHOULD signal that fact by 968 including a element as a child of the 969 element). 971 4. The initiating entity issues the STARTTLS command (i.e., a 972 element qualified by the 973 'urn:ietf:params:xml:ns:xmpp-tls' namespace) to instruct the 974 receiving entity that it wishes to begin a TLS negotiation to 975 secure the stream. 977 5. The receiving entity MUST reply with either a element 978 or a element qualified by the 979 'urn:ietf:params:xml:ns:xmpp-tls' namespace. If the failure case 980 occurs, the receiving entity MUST terminate both the XML stream 981 and the underlying TCP connection. If the proceed case occurs, 982 the entities MUST attempt to complete the TLS negotiation over 983 the TCP connection and MUST NOT send any further XML data until 984 the TLS negotiation is complete. 986 6. The initiating entity and receiving entity attempt to complete a 987 TLS negotiation in accordance with [TLS]. 989 7. If the TLS negotiation is unsuccessful, the receiving entity MUST 990 terminate the TCP connection (it is not necessary to send a 991 closing tag first, since the receiving entity and 992 initiating entity MUST consider the original stream to be closed 993 upon sending or receiving the element). If the TLS 994 negotiation is successful, the initiating entity MUST initiate a 995 new stream by sending an opening XML stream header to the 996 receiving entity. 998 8. Upon receiving the new stream header from the initiating entity, 999 the receiving entity MUST respond by sending a new XML stream 1000 header to the initiating entity along with the available features 1001 (but NOT including the STARTTLS feature). 1003 5.3 Client-to-Server Example 1005 The following example shows the data flow for a client securing a 1006 stream using STARTTLS (note: the alternate steps shown below are 1007 provided to illustrate the protocol for failure cases; they are not 1008 exhaustive and would not necessarily be triggered by the data sent in 1009 the example). 1011 Step 1: Client initiates stream to server: 1013 1019 Step 2: Server responds by sending a stream tag to client: 1021 1028 Step 3: Server sends the STARTTLS extension to client along with 1029 authentication mechanisms and any other stream features: 1031 1032 1033 1034 1035 1036 DIGEST-MD5 1037 PLAIN 1038 1039 1041 Step 4: Client sends the STARTTLS command to server: 1043 1045 Step 5: Server informs client that it is allowed to proceed: 1047 1049 Step 5 (alt): Server informs client that TLS negotiation has failed 1050 and closes both stream and TCP connection: 1052 1053 1055 Step 6: Client and server attempt to complete TLS negotiation over 1056 the existing TCP connection. 1058 Step 7: If TLS negotiation is successful, client initiates a new 1059 stream to server: 1061 1067 Step 7 (alt): If TLS negotiation is unsuccessful, Server2 closes TCP 1068 connection. 1070 Step 8: Server responds by sending a stream header to client along 1071 with any available stream features: 1073 1079 1080 1081 DIGEST-MD5 1082 PLAIN 1083 EXTERNAL 1084 1085 1087 Step 9: Client continues with SASL negotiation (Section 6). 1089 5.4 Server-to-Server Example 1091 The following example shows the data flow for two servers securing a 1092 stream using STARTTLS (note: the alternate steps shown below are 1093 provided to illustrate the protocol for failure cases; they are not 1094 exhaustive and would not necessarily be triggered by the data sent in 1095 the example). 1097 Step 1: Server1 initiates stream to Server2: 1099 1105 Step 2: Server2 responds by sending a stream tag to Server1: 1107 1114 Step 3: Server2 sends the STARTTLS extension to Server1 along with 1115 authentication mechanisms and any other stream features: 1117 1118 1119 1120 1121 1122 DIGEST-MD5 1123 KERBEROS_V4 1124 1125 1127 Step 4: Server1 sends the STARTTLS command to Server2: 1129 1131 Step 5: Server2 informs Server1 that it is allowed to proceed: 1133 1135 Step 5 (alt): Server2 informs Server1 that TLS negotiation has failed 1136 and closes stream: 1138 1139 1141 Step 6: Server1 and Server2 attempt to complete TLS negotiation via 1142 TCP. 1144 Step 7: If TLS negotiation is successful, Server1 initiates a new 1145 stream to Server2: 1147 1153 Step 7 (alt): If TLS negotiation is unsuccessful, server closes TCP 1154 connection. 1156 Step 8: Server2 responds by sending a stream header to Server1 along 1157 with any available stream features: 1159 1165 1166 1167 DIGEST-MD5 1168 KERBEROS_V4 1169 EXTERNAL 1170 1171 1173 Step 9: Server1 continues with SASL negotiation (Section 6). 1175 6. Use of SASL 1177 6.1 Overview 1179 XMPP includes a method for authenticating a stream by means of an 1180 XMPP-specific profile of the Simple Authentication and Security Layer 1181 (SASL) protocol [SASL]. SASL provides a generalized method for 1182 adding authentication support to connection-based protocols, and XMPP 1183 uses a generic XML namespace profile for SASL that conforms to the 1184 profiling requirements of [SASL]. 1186 The following rules apply: 1188 1. If the SASL negotiation occurs between two servers, 1189 communications MUST NOT proceed until the Domain Name System 1190 (DNS) hostnames asserted by the servers have been resolved (see 1191 Server-to-Server Communications (Section 14.4)). 1193 2. If the initiating entity is capable of SASL negotiation, it MUST 1194 include the 'version' attribute set to a value of "1.0" in the 1195 initial stream header. 1197 3. If the receiving entity is capable of SASL negotiation, it MUST 1198 send one or more authentication mechanisms within a element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' 1200 namespace in reply to the opening stream tag received from the 1201 initiating entity (if the opening stream tag included the 1202 'version' attribute set to a value of "1.0"). 1204 4. During SASL negotiation, an entity MUST NOT send any white space 1205 characters (matching production [3] content of [XML]) within the 1206 root stream element as separators between elements (any white 1207 space characters shown in the SASL examples below are included 1208 for the sake of readability only); this prohibition helps to 1209 ensure proper security layer byte precision. 1211 5. Any character data contained within the XML elements used during 1212 SASL negotiation MUST be encoded using base64, where the 1213 encoding adheres to the definition in Section 3 of RFC 3548 1214 [BASE64]. 1216 6. If provision of a "simple username" is supported by the selected 1217 SASL mechanism (e.g., this is supported by the DIGEST-MD5 and 1218 CRAM-MD5 mechanisms but not by the EXTERNAL and GSSAPI 1219 mechanisms), during authentication the initiating entity SHOULD 1220 provide as the simple username its sending domain (IP address or 1221 fully qualified domain name as contained in a domain identifier) 1222 in the case of server-to-server communications or its registered 1223 account name (user or node name as contained in an XMPP node 1224 identifer) in the case of client-to-server communications. 1226 7. If the initiating entity wishes to act on behalf of another 1227 entity and the selected SASL mechanism supports transmission of 1228 an authorization identity, the initiating entity MUST provide an 1229 authorization identity during SASL negotiation. If the 1230 initiating entity does not wish to act on behalf of another 1231 entity, it MUST NOT provide an authorization identity. As 1232 specified in [SASL], the initiating entity MUST NOT provide an 1233 authorization identity unless the authorization identity is 1234 different from the default authorization identity derived from 1235 the authentication identity as described in [SASL]. If 1236 provided, the value of the authorization identity MUST be of the 1237 form (i.e., a domain identifier only) for servers and 1238 of the form (i.e., node identifier and domain 1239 identifier) for clients. 1241 8. Upon successful SASL negotiation that involves negotiation of a 1242 security layer, the receiving entity MUST discard any knowledge 1243 obtained from the initiating entity which was not obtained from 1244 the SASL negotiation itself. 1246 9. Upon successful SASL negotiation that involves negotiation of a 1247 security layer, the initiating entity MUST discard any knowledge 1248 obtained from the receiving entity which was not obtained from 1249 the SASL negotiation itself. 1251 10. See Mandatory-to-Implement Technologies (Section 14.7) regarding 1252 mechanisms that MUST be supported. 1254 6.2 Narrative 1256 When an initiating entity authenticates with a receiving entity, the 1257 steps involved are as follows: 1259 1. The initiating entity requests SASL authentication by including 1260 the 'version' attribute in the opening XML stream header sent to 1261 the receiving entity, with the value set to "1.0". 1263 2. After sending an XML stream header in reply, the receiving entity 1264 sends a list of available SASL authentication mechanisms; each of 1265 these is a element included as a child within a 1266 container element qualified by the 1267 'urn:ietf:params:xml:ns:xmpp-sasl' namespace, which in turn is a 1268 child of a element in the streams namespace. If Use 1269 of TLS (Section 5) needs to be established before a particular 1270 authentication mechanism may be used, the receiving entity MUST 1271 NOT provide that mechanism in the list of available SASL 1272 authentication mechanisms prior to TLS negotiation. If the 1273 initiating entity presents a valid certificate during prior TLS 1274 negotiation, the receiving entity SHOULD offer the SASL EXTERNAL 1275 mechanism to the initiating entity during SASL negotiation (refer 1276 to [SASL]), although the EXTERNAL mechanism MAY be offered under 1277 other circumstances as well. 1279 3. The initiating entity selects a mechanism by sending an 1280 element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' 1281 namespace to the receiving entity and including an appropriate 1282 value for the 'mechanism' attribute; this element MAY contain 1283 character data (in SASL terminology, the "initial response") if 1284 the mechanism supports or requires it. If the initiating entity 1285 selects the EXTERNAL mechanism for authentication and presented a 1286 certificate during prior TLS negotiation, the authentication 1287 credentials SHOULD be taken from that certificate. 1289 4. If necessary, the receiving entity challenges the initiating 1290 entity by sending a element qualified by the 1291 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1292 entity; this element MAY contain character data (which MUST be 1293 computed in accordance with the definition of the SASL mechanism 1294 chosen by the initiating entity). 1296 5. The initiating entity responds to the challenge by sending a 1297 element qualified by the 1298 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the receiving 1299 entity; this element MAY contain character data (which MUST be 1300 computed in accordance with the definition of the SASL mechanism 1301 chosen by the initiating entity). 1303 6. If necessary, the receiving entity sends more challenges and the 1304 initiating entity sends more responses. 1306 This series of challenge/response pairs continues until one of three 1307 things happens: 1309 1. The initiating entity aborts the handshake by sending an 1310 element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' 1311 namespace to the receiving entity. Upon receiving an 1312 element, the receiving entity SHOULD allow a configurable but 1313 reasonable number of retries (at least 2), after which it MUST 1314 terminate the TCP connection; this allows the initiating entity 1315 (e.g., an end-user client) to tolerate incorrectly-provided 1316 credentials (e.g., a mistyped password) without being forced to 1317 reconnect. 1319 2. The receiving entity reports failure of the handshake by sending 1320 a element qualified by the 1321 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1322 entity (the particular cause of failure SHOULD be communicated in 1323 an appropriate child element of the element as defined 1324 under SASL Errors (Section 6.4)). If the failure case occurs, 1325 the receiving entity SHOULD allow a configurable but reasonable 1326 number of retries (at least 2), after which it MUST terminate the 1327 TCP connection; this allows the initiating entity (e.g., an 1328 end-user client) to tolerate incorrectly-provided credentials 1329 (e.g., a mistyped password) without being forced to reconnect. 1331 3. The receiving entity reports success of the handshake by sending 1332 a element qualified by the 1333 'urn:ietf:params:xml:ns:xmpp-sasl' namespace to the initiating 1334 entity; this element MAY contain character data (in SASL 1335 terminology, "additional data with success") if required by the 1336 chosen SASL mechanism. Upon receiving the element, 1337 the initiating entity MUST initiate a new stream by sending an 1338 opening XML stream header to the receiving entity (it is not 1339 necessary to send a closing tag first, since the 1340 receiving entity and initiating entity MUST consider the original 1341 stream to be closed upon sending or receiving the 1342 element). Upon receiving the new stream header from the 1343 initiating entity, the receiving entity MUST respond by sending a 1344 new XML stream header to the initiating entity, along with any 1345 available features (but NOT including the STARTTLS feature) or an 1346 empty element (to signify that no additional features 1347 are available); any such additional features not defined herein 1348 MUST be defined by the relevant extension to XMPP. 1350 6.3 SASL Definition 1352 The profiling requirements of [SASL] require that the following 1353 information be supplied by a protocol definition: 1355 service name: "xmpp" 1356 initiation sequence: After the initiating entity provides an opening 1357 XML stream header and the receiving entity replies in kind, the 1358 receiving entity provides a list of acceptable authentication 1359 methods. The initiating entity chooses one method from the list 1360 and sends it to the receiving entity as the value of the 1361 'mechanism' attribute possessed by an element, optionally 1362 including an initial response to avoid a round trip. 1364 exchange sequence: Challenges and responses are carried through the 1365 exchange of elements from receiving entity to 1366 initiating entity and elements from initiating entity 1367 to receiving entity. The receiving entity reports failure by 1368 sending a element and success by sending a 1369 element; the initiating entity aborts the exchange by sending an 1370 element. Upon successful negotiation, both sides 1371 consider the original XML stream to be closed and new stream 1372 headers are sent by both entities. 1374 security layer negotiation: The security layer takes effect 1375 immediately after sending the closing ">" character of the 1376 element for the receiving entity, and immediately after 1377 receiving the closing ">" character of the element for 1378 the initiating entity. The order of layers is first [TCP], then 1379 [TLS], then [SASL], then XMPP. 1381 use of the authorization identity: The authorization identity may be 1382 used by xmpp to denote the of a client or the 1383 sending of a server. 1385 6.4 SASL Errors 1387 The following SASL-related error conditions are defined: 1389 o -- The receiving entity acknowledges an 1390 element sent by the initiating entity; sent in reply to the 1391 element. 1393 o -- The data provided by the initiating 1394 entity could not be processed because the [BASE64] encoding is 1395 incorrect (e.g., because the encoding does not adhere to the the 1396 definition in Section 3 of [BASE64]); sent in reply to a 1397 element or an element with initial challenge 1398 data. 1400 o -- The authzid provided by the initiating 1401 entity is invalid, either because it is incorrectly formatted or 1402 because the initiating entity does not have permissions to 1403 authorize that ID; sent in reply to a element or an 1404 element with initial challenge data. 1406 o -- The initiating entity did not provide a 1407 mechanism or requested a mechanism that is not supported by the 1408 receiving entity; sent in reply to an element. 1410 o -- The mechanism requested by the initiating 1411 entity is weaker than server policy permits for that initiating 1412 entity; sent in reply to a element or an 1413 element with initial challenge data. 1415 o -- The authentication failed because the 1416 initiating entity did not provide valid credentials (this includes 1417 but is not limited to the case of an unknown username); sent in 1418 reply to a element or an element with initial 1419 challenge data. 1421 o -- The authentication failed because of 1422 a temporary error condition within the receiving entity; sent in 1423 reply to an element or element. 1425 6.5 Client-to-Server Example 1427 The following example shows the data flow for a client authenticating 1428 with a server using SASL, normally after successful TLS negotiation 1429 (note: the alternate steps shown below are provided to illustrate the 1430 protocol for failure cases; they are not exhaustive and would not 1431 necessarily be triggered by the data sent in the example). 1433 Step 1: Client initiates stream to server: 1435 1441 Step 2: Server responds with a stream tag sent to client: 1443 1450 Step 3: Server informs client of available authentication mechanisms: 1452 1453 1454 DIGEST-MD5 1455 PLAIN 1456 1457 1459 Step 4: Client selects an authentication mechanism: 1461 1464 Step 5: Server sends a [BASE64] encoded challenge to client: 1466 1467 cmVhbG09InNvbWVyZWFsbSIsbm9uY2U9Ik9BNk1HOXRFUUdtMmhoIixxb3A9ImF1dGgi 1468 LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNzCg== 1469 1471 The decoded challenge is: 1473 realm="somerealm",nonce="OA6MG9tEQGm2hh",\ 1474 qop="auth",charset=utf-8,algorithm=md5-sess 1476 Step 5 (alt): Server returns error to client: 1478 1479 1480 1481 1483 Step 6: Client sends a [BASE64] encoded response to the challenge: 1485 1486 dXNlcm5hbWU9InNvbWVub2RlIixyZWFsbT0ic29tZXJlYWxtIixub25jZT0i 1487 T0E2TUc5dEVRR20yaGgiLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLG5jPTAw 1488 MDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZXhhbXBsZS5jb20i 1489 LHJlc3BvbnNlPWQzODhkYWQ5MGQ0YmJkNzYwYTE1MjMyMWYyMTQzYWY3LGNo 1490 YXJzZXQ9dXRmLTgK 1491 1493 The decoded response is: 1495 username="somenode",realm="somerealm",\ 1496 nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk",\ 1497 nc=00000001,qop=auth,digest-uri="xmpp/example.com",\ 1498 response=d388dad90d4bbd760a152321f2143af7,charset=utf-8 1500 Step 7: Server sends another [BASE64] encoded challenge to client: 1502 1503 cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZAo= 1504 1506 The decoded challenge is: 1508 rspauth=ea40f60335c427b5527b84dbabcdfffd 1510 Step 7 (alt): Server returns error to client: 1512 1513 1514 1515 1517 Step 8: Client responds to the challenge: 1519 1521 Step 9: Server informs client of successful authentication: 1523 1525 Step 9 (alt): Server informs client of failed authentication: 1527 1528 1529 1530 1532 Step 10: Client initiates a new stream to server: 1534 1540 Step 11: Server responds by sending a stream header to client along 1541 with any additional features (or an empty features element): 1543 1549 1550 1551 1552 1554 6.6 Server-to-Server Example 1556 The following example shows the data flow for a server authenticating 1557 with another server using SASL, normally after successful TLS 1558 negotiation (note: the alternate steps shown below are provided to 1559 illustrate the protocol for failure cases; they are not exhaustive 1560 and would not necessarily be triggered by the data sent in the 1561 example). 1563 Step 1: Server1 initiates stream to Server2: 1565 1571 Step 2: Server2 responds with a stream tag sent to Server1: 1573 1580 Step 3: Server2 informs Server1 of available authentication 1581 mechanisms: 1583 1584 1585 DIGEST-MD5 1586 KERBEROS_V4 1587 1588 1590 Step 4: Server1 selects an authentication mechanism: 1592 1595 Step 5: Server2 sends a [BASE64] encoded challenge to Server1: 1597 1598 dXNlcm5hbWU9ImV4YW1wbGUuY29tIixyZWFsbT0ic29tZXJlYWxtIixub25j 1599 ZT0iT0E2TUc5dEVRR20yaGgiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxh 1600 bGdvcml0aG09bWQ1LXNlc3MK 1601 1603 The decoded challenge is: 1605 username="example.com",realm="somerealm",\ 1606 nonce="OA6MG9tEQGm2hh",qop="auth",\ 1607 charset=utf-8,algorithm=md5-sess 1609 Step 5 (alt): Server2 returns error to Server1: 1611 1612 1613 1614 1616 Step 6: Server1 sends a [BASE64] encoded response to the challenge: 1618 1619 dXNlcm5hbWU9ImV4YW1wbGUuY29tIixyZWFsbT0ic29tZXJlYWxtIixub25j 1620 ZT0iT0E2TUc5dEVRR20yaGgiLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLG5j 1621 PTAwMDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZXhhbXBsZS5j 1622 b20iLHJlc3BvbnNlPWQzODhkYWQ5MGQ0YmJkNzYwYTE1MjMyMWYyMTQzYWY3 1623 LGNoYXJzZXQ9dXRmLTgK 1624 1626 The decoded response is: 1628 username="example.com",realm="somerealm",\ 1629 nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk",\ 1630 nc=00000001,qop=auth,digest-uri="xmpp/example.com",\ 1631 response=d388dad90d4bbd760a152321f2143af7,charset=utf-8 1633 Step 7: Server2 sends another [BASE64] encoded challenge to Server1: 1635 1636 cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZAo= 1637 1639 The decoded challenge is: 1641 rspauth=ea40f60335c427b5527b84dbabcdfffd 1643 Step 7 (alt): Server2 returns error to Server1: 1645 1646 1647 1648 1650 Step 8: Server1 responds to the challenge: 1652 1654 Step 8 (alt): Server1 aborts negotiation: 1656 1658 Step 9: Server2 informs Server1 of successful authentication: 1660 1662 Step 9 (alt): Server2 informs Server1 of failed authentication: 1664 1665 1666 1667 1669 Step 10: Server1 initiates a new stream to Server2: 1671 1677 Step 11: Server2 responds by sending a stream header to Server1 along 1678 with any additional features (or an empty features element): 1680 1686 1688 7. Resource Binding 1690 After SASL negotiation (Section 6) with the receiving entity, the 1691 initiating entity MAY want or need to bind a specific resource to 1692 that stream. In general this applies only to clients: in order to 1693 conform to the addressing format (Section 3) and stanza delivery 1694 rules (Section 10) specified herein, there MUST be a resource 1695 identifier associated with the of the client (which is 1696 either generated by the server or provided by the client 1697 application); this ensures that the address for use over that stream 1698 is a "full JID" of the form . 1700 Upon receiving a success indication within the SASL negotiation, the 1701 client MUST send a new stream header to the server, to which the 1702 server MUST respond with a stream header as well as a list of 1703 available stream features. Specifically, if the server requires the 1704 client to bind a resource to the stream after successful SASL 1705 negotiation, it MUST include an empty element qualified by 1706 the 'urn:ietf:params:xml:ns:xmpp-bind' namespace in the stream 1707 features list it presents to the client upon sending the header for 1708 the response stream sent after successful SASL negotiation (but not 1709 before): 1711 Server advertises resource binding feature to client: 1713 1719 1720 1721 1723 Upon being so informed that resource binding is required, the client 1724 MUST bind a resource to the stream by sending to the server an IQ 1725 stanza of type "set" (see IQ Semantics (Section 9.2.3)) containing 1726 data qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace. 1728 If the client wishes to allow the server to generate the resource 1729 identifier on its behalf, it sends an IQ stanza of type "set" that 1730 contains an empty element: 1732 Client asks server to bind a resource: 1734 1735 1737 1739 A server that supports resource binding MUST be able to generate a 1740 resource identifier on behalf of a client. A resource identifier 1741 generated by the server MUST be unique for that . 1743 If the client wishes to specify the resource identifier, it sends an 1744 IQ stanza of type "set" that contains the desired resource identifier 1745 as the CDATA of a element that is a child of the 1746 element: 1748 Client binds a resource: 1750 1751 1752 someresource 1753 1754 1756 Once the server has generated a resource identifier for the client or 1757 accepted the resource identifier provided by the client, it MUST 1758 return an IQ stanza of type "result" to the client, which MUST 1759 include a child element that specifies the full JID for the 1760 connected resource as determined by the server: 1762 Server informs client of successful resource binding: 1764 1765 1766 somenode@example.com/someresource 1767 1768 1770 A server SHOULD accept the resource identifier provided by the 1771 client, but MAY override it with a resource identifier that the 1772 server generates; in this case, the server SHOULD NOT return a stanza 1773 error (e.g., ) to the client but instead SHOULD 1774 communicate the generated resource identifier to the client in the IQ 1775 result as shown above. 1777 When a client supplies a resource identifier, the following stanza 1778 error conditions are possible (see Stanza Errors (Section 9.3)): 1780 o The provided resource identifier cannot be processed by the server 1781 in accordance with Resourceprep (Appendix B). 1783 o The client is not allowed to bind a resource to the stream (e.g., 1784 because the client has reached a limit on the number of connected 1785 resources allowed). 1787 o The provided resource identifier is already in use but the server 1788 does not allow binding of multiple connected resources with the 1789 same identifier. 1791 The protocol for these error conditions is shown below. 1793 Resource identifier cannot be processed: 1795 1796 1797 someresource 1798 1799 1800 1801 1802 1804 Client is not allowed to bind a resource: 1806 1807 1808 someresource 1809 1810 1811 1812 1813 1815 Resource identifier is in use: 1817 1818 1819 someresource 1820 1821 1822 1823 1824 1826 8. Server Dialback 1828 8.1 Overview 1830 The Jabber protocols from which XMPP was adapted include a "server 1831 dialback" method for protecting against domain spoofing, thus making 1832 it more difficult to spoof XML stanzas (see Server-to-Server 1833 Communications (Section 14.4) regarding this method's security 1834 characteristics). Server dialback also makes it easier to deploy 1835 systems in which outbound messages and inbound messages are handled 1836 by different machines for the same domain. Server dialback is not a 1837 security mechanism, and domains requiring robust security SHOULD use 1838 TLS and SASL; see Server-to-Server Communications (Section 14.4) for 1839 details. 1841 The server dialback method is made possible by the existence of the 1842 Domain Name System (DNS), since one server can (normally) discover 1843 the authoritative server for a given domain. Because dialback depends 1844 on DNS, inter-domain communications MUST NOT proceed until the Domain 1845 Name System (DNS) hostnames asserted by the servers have been 1846 resolved (see Server-to-Server Communications (Section 14.4)). 1848 The method for generating and verifying the keys used in server 1849 dialback MUST take into account the hostnames being used, the stream 1850 ID generated by the receiving server, and a secret known by the 1851 authoritative server's network. The stream ID is security-critical in 1852 server dialback and therefore MUST be both unpredictable and 1853 non-repeating (see [RANDOM] for recommendations regarding randomness 1854 for security purposes). 1856 Any error that occurs during dialback negotiation MUST be considered 1857 a stream error, resulting in termination of the stream and of the 1858 underlying TCP connection. The possible error conditions are 1859 specified in the protocol description below. 1861 The following terminology applies: 1863 o Originating Server -- the server that is attempting to establish a 1864 connection between two domains. 1866 o Receiving Server -- the server that is trying to authenticate that 1867 Originating Server represents the domain which it claims to be. 1869 o Authoritative Server -- the server that answers to the DNS 1870 hostname asserted by Originating Server; for basic environments 1871 this will be Originating Server, but it could be a separate 1872 machine in Originating Server's network. 1874 8.2 Order of Events 1876 The following is a brief summary of the order of events in dialback: 1878 1. Originating Server establishes a connection to Receiving Server. 1880 2. Originating Server sends a 'key' value over the connection to 1881 Receiving Server. 1883 3. Receiving Server establishes a connection to Authoritative 1884 Server. 1886 4. Receiving Server sends the same 'key' value to Authoritative 1887 Server. 1889 5. Authoritative Server replies that key is valid or invalid. 1891 6. Receiving Server informs Originating Server whether it is 1892 authenticated or not. 1894 We can represent this flow of events graphically as follows: 1896 Originating Receiving 1897 Server Server 1898 ----------- --------- 1899 | | 1900 | establish connection | 1901 | ----------------------> | 1902 | | 1903 | send stream header | 1904 | ----------------------> | 1905 | | 1906 | send stream header | 1907 | <---------------------- | 1908 | | Authoritative 1909 | send dialback key | Server 1910 | ----------------------> | ------------- 1911 | | | 1912 | establish connection | 1913 | ----------------------> | 1914 | | 1915 | send stream header | 1916 | ----------------------> | 1917 | | 1918 | send stream header | 1919 | <---------------------- | 1920 | | 1921 | send verify request | 1922 | ----------------------> | 1923 | | 1924 | send verify response | 1925 | <---------------------- | 1926 | 1927 | report dialback result | 1928 | <---------------------- | 1929 | | 1931 8.3 Protocol 1933 The detailed protocol interaction between the servers is as follows: 1935 1. Originating Server establishes TCP connection to Receiving 1936 Server. 1938 2. Originating Server sends a stream header to Receiving Server: 1940 1945 Note: The 'to' and 'from' attributes are OPTIONAL on the root 1946 stream element. The inclusion of the xmlns:db namespace 1947 declaration with the name shown indicates to Receiving Server 1948 that Originating Server supports dialback. If the namespace 1949 name is incorrect, then Receiving Server MUST generate an 1950 stream error condition and terminate both 1951 the XML stream and the underlying TCP connection. 1953 3. Receiving Server SHOULD send a stream header back to Originating 1954 Server, including a unique ID for this interaction: 1956 1962 Note: The 'to' and 'from' attributes are OPTIONAL on the root 1963 stream element. If the namespace name is incorrect, then 1964 Originating Server MUST generate an stream 1965 error condition and terminate both the XML stream and the 1966 underlying TCP connection. Note well that Receiving Server 1967 SHOULD reply but MAY silently terminate the XML stream and 1968 underlying TCP connection depending on security policies in 1969 place; however, if Receiving Server desires to proceed, it MUST 1970 send a stream header back to Originating Server. 1972 4. Originating Server sends a dialback key to Receiving Server: 1974 1977 98AF014EDC0... 1978 1980 Note: This key is not examined by Receiving Server, since 1981 Receiving Server does not keep information about Originating 1982 Server between sessions. The key generated by Originating 1983 Server MUST be based in part on the value of the ID provided by 1984 Receiving Server in the previous step, and in part on a secret 1985 shared by Originating Server and Authoritative Server. If the 1986 value of the 'to' address does not match a hostname recognized 1987 by Receiving Server, then Receiving Server MUST generate a 1988 stream error condition and terminate both the 1989 XML stream and the underlying TCP connection. If the value of 1990 the 'from' address matches a domain with which Receiving Server 1991 already has an established connection, then Receiving Server 1992 MUST maintain the existing connection until it validates whether 1993 the new connection is legitimate; additionally, Receiving Server 1994 MAY choose to generate a stream error 1995 condition for the new connection and then terminate both the XML 1996 stream and the underlying TCP connection related to the new 1997 request. 1999 5. Receiving Server establishes a TCP connection back to the domain 2000 name asserted by Originating Server, as a result of which it 2001 connects to Authoritative Server. (Note: As an optimization, an 2002 implementation MAY reuse an existing trusted connection here 2003 rather than opening a new TCP connection.) 2005 6. Receiving Server sends Authoritative Server a stream header: 2007 2012 Note: The 'to' and 'from' attributes are OPTIONAL on the root 2013 stream element. If the namespace name is incorrect, then 2014 Authoritative Server MUST generate an 2015 stream error condition and terminate both the XML stream and the 2016 underlying TCP connection. 2018 7. Authoritative Server sends Receiving Server a stream header: 2020 2026 Note: If the namespace name is incorrect, then Receiving Server 2027 MUST generate an stream error condition and 2028 terminate both the XML stream and the underlying TCP connection 2029 between it and Authoritative Server. If a stream error occurs 2030 between Receiving Server and Authoritative Server, then 2031 Receiving Server MUST generate a 2032 stream error condition and terminate both the XML stream and the 2033 underlying TCP connection between it and Originating Server. 2035 8. Receiving Server sends Authoritative Server a stanza requesting 2036 that Authoritative Server verify a key: 2038 2042 98AF014EDC0... 2043 2045 Note: Passed here are the hostnames, the original identifier 2046 from Receiving Server's stream header to Originating Server in 2047 Step 3, and the key that Originating Server sent to Receiving 2048 Server in Step 4. Based on this information as well as shared 2049 secret information within the Authoritative Server's network, 2050 the key is verified. Any verifiable method MAY be used to 2051 generate the key. If the value of the 'to' address does not 2052 match a hostname recognized by Authoritative Server, then 2053 Authoritative Server MUST generate a stream 2054 error condition and terminate both the XML stream and the 2055 underlying TCP connection. If the value of the 'from' address 2056 does not match the hostname represented by Receiving Server when 2057 opening the TCP connection (or any validated domain), then 2058 Authoritative Server MUST generate an stream 2059 error condition and terminate both the XML stream and the 2060 underlying TCP connection. 2062 9. Authoritative Server sends a stanza back to Receiving Server 2063 verifying whether the key was valid or invalid: 2065 2070 or 2072 2078 Note: If the ID does not match that provided by Receiving Server 2079 in Step 3, then Receiving Server MUST generate an 2080 stream error condition and terminate both the XML stream and the 2081 underlying TCP connection. If the value of the 'to' address 2082 does not match a hostname recognized by Receiving Server, then 2083 Receiving Server MUST generate a stream error 2084 condition and terminate both the XML stream and the underlying 2085 TCP connection. If the value of the 'from' address does not 2086 match the hostname represented by Originating Server when 2087 opening the TCP connection (or any validated domain), then 2088 Receiving Server MUST generate an stream error 2089 condition and terminate both the XML stream and the underlying 2090 TCP connection. After returning the verification to Receiving 2091 Server, Authoritative Server SHOULD terminate the stream between 2092 them. 2094 10. Receiving Server informs Originating Server of the result: 2096 2101 Note: At this point the connection has either been validated via 2102 a type='valid', or reported as invalid. If the connection is 2103 invalid, then Receiving Server MUST terminate both the XML 2104 stream and the underlying TCP connection. If the connection is 2105 validated, data can be sent by Originating Server and read by 2106 Receiving Server; before that, all data stanzas sent to 2107 Receiving Server SHOULD be silently dropped. 2109 Even if dialback negotiation is successful, a server MUST verify that 2110 all XML stanzas received from the other server include a 'from' 2111 attribute and a 'to' attribute; if a stanza does not meet this 2112 restriction, the server that receives the stanza MUST generate an 2113 stream error condition and terminate both the 2114 XML stream and the underlying TCP connection. Furthermore, a server 2115 MUST verify that the 'from' attribute of stanzas received from the 2116 other server includes a validated domain for the stream; if a stanza 2117 does not meet this restriction, the server that receives the stanza 2118 MUST generate an stream error condition and terminate 2119 both the XML stream and the underlying TCP connection. Both of these 2120 checks help to prevent spoofing related to particular stanzas. 2122 9. XML Stanzas 2124 After TLS negotiation (Section 5) if desired, SASL negotiation 2125 (Section 6), and Resource Binding (Section 7) if necessary, XML 2126 stanzas can be sent over the streams. Three kinds of XML stanza are 2127 defined for the 'jabber:client' and 'jabber:server' namespaces: 2128 , , and . In addition, there are five 2129 common attributes for these kinds of stanza. These common 2130 attributes, as well as the basic semantics of the three stanza kinds, 2131 are defined herein; more detailed information regarding the syntax of 2132 XML stanzas in relation to instant messaging and presence 2133 applications is provided in [XMPP-IM]. 2135 9.1 Common Attributes 2137 The following five attributes are common to message, presence, and IQ 2138 stanzas: 2140 9.1.1 to 2142 The 'to' attribute specifies the JID of the intended recipient for 2143 the stanza. 2145 In the 'jabber:client' namespace, a stanza SHOULD possess a 'to' 2146 attribute, although a stanza sent from a client to a server for 2147 handling by that server (e.g., presence sent to the server for 2148 broadcasting to other entities) SHOULD NOT possess a 'to' attribute. 2150 In the 'jabber:server' namespace, a stanza MUST possess a 'to' 2151 attribute; if a server receives a stanza that does not meet this 2152 restriction, it MUST generate an stream error 2153 condition and terminate both the XML stream and the underlying TCP 2154 connection with the offending server. 2156 If the value of the 'to' attribute is invalid or cannot be contacted, 2157 the entity discovering that fact (usually the sender's or recipient's 2158 server) MUST return an appropriate error to the sender, setting the 2159 'from' attribute of the error stanza to the value provided in the 2160 'to' attribute of the offending stanza. 2162 9.1.2 from 2164 The 'from' attribute specifies the JID of the sender. 2166 When a server receives an XML stanza within the context of an 2167 authenticated stream qualified by the 'jabber:client' namespace, it 2168 MUST do one of the following: 2170 1. validate that the value of the 'from' attribute provided by the 2171 client is that of a connected resource for the associated entity 2173 2. add a 'from' address to the stanza whose value is the full JID 2174 () determined by the server for the 2175 connected resource that generated the stanza (see Determination 2176 of Addresses (Section 3.5)) 2178 If a client attempts to send an XML stanza for which the value of the 2179 'from' attribute does not match one of the connected resources for 2180 that entity, the server SHOULD return an stream error 2181 to the client. If a client attempts to send an XML stanza over a 2182 stream that is not yet authenticated, the server SHOULD return a 2183 stream error to the client. If generated, both of 2184 these conditions MUST result in closing of the stream and termination 2185 of the underlying TCP connection; this helps to prevent a denial of 2186 service attack launched from a rogue client. 2188 When a server generates a stanza from the server itself for delivery 2189 to a connected client (e.g., in the context of data storage services 2190 provided by the server on behalf of the client), the stanza MUST 2191 either (1) not include a 'from' attribute or (2) include a 'from' 2192 attribute whose value is the account's bare JID () or 2193 client's full JID (). A server MUST NOT send 2194 to the client a stanza without a 'from' attribute if the stanza was 2195 not generated by the server itself. When a client receives a stanza 2196 that does not include a 'from' attribute, it MUST assume that the 2197 stanza is from the server to which the client is connected. 2199 In the 'jabber:server' namespace, a stanza MUST possess a 'from' 2200 attribute; if a server receives a stanza that does not meet this 2201 restriction, it MUST generate an stream error 2202 condition. Furthermore, the domain identifier portion of the JID 2203 contained in the 'from' attribute MUST match the hostname (or any 2204 validated domain) of the sending server as communicated in the SASL 2205 negotiation or dialback negotiation; if a server receives a stanza 2206 that does not meet this restriction, it MUST generate an 2207 stream error condition. Both of these conditions 2208 MUST result in closing of the stream and termination of the 2209 underlying TCP connection; this helps to prevent a denial of service 2210 attack launched from a rogue server. 2212 9.1.3 id 2213 The optional 'id' attribute MAY be used by a sending entity for 2214 internal tracking of stanzas that it sends and receives (especially 2215 for tracking the request-response interaction inherent in the 2216 semantics of IQ stanzas). It is OPTIONAL for the value of the 'id' 2217 attribute to be unique globally, within a domain, or within a stream. 2218 The semantics of IQ stanzas impose additional restrictions; see IQ 2219 Semantics (Section 9.2.3). 2221 9.1.4 type 2223 The 'type' attribute specifies detailed information about the purpose 2224 or context of the message, presence, or IQ stanza. The particular 2225 allowable values for the 'type' attribute vary depending on whether 2226 the stanza is a message, presence, or IQ; the values for message and 2227 presence stanzas are specific to instant messaging and presence 2228 applications and therefore are defined in [XMPP-IM], whereas the 2229 values for IQ stanzas specify the role of an IQ stanza in a 2230 structured request-response "conversation" and thus are defined under 2231 IQ Semantics (Section 9.2.3) below. The only 'type' value common to 2232 all three stanzas is "error", for which see Stanza Errors (Section 2233 9.3). 2235 9.1.5 xml:lang 2237 A stanza SHOULD possess an 'xml:lang' attribute (as defined in 2238 Section 2.12 of [XML]) if the stanza contains XML character data that 2239 is intended to be presented to a human user (as explained in RFC 2277 2240 [CHARSET], "internationalization is for humans"). The value of the 2241 'xml:lang' attribute specifies the default language of any such 2242 human-readable XML character data, which MAY be overridden by the 2243 'xml:lang' attribute of a specific child element. If a stanza does 2244 not possess an 'xml:lang' attribute, an implementation MUST assume 2245 that the default language is that specified for the stream as defined 2246 under Stream Attributes (Section 4.2) above. The value of the 2247 'xml:lang' attribute MUST be an NMTOKEN and MUST conform to the 2248 format defined in RFC 3066 [LANGTAGS]. 2250 9.2 Basic Semantics 2252 9.2.1 Message Semantics 2254 The stanza kind can be seen as a "push" mechanism whereby 2255 one entity pushes information to another entity, similar to the 2256 communications that occur in a system such as email. All message 2257 stanzas SHOULD possess a 'to' attribute that specifies the intended 2258 recipient of the message; upon receiving such a stanza, a server 2259 SHOULD route or deliver it to the intended recipient (see Server 2260 Rules for Handling XML Stanzas (Section 10) for general routing and 2261 delivery rules related to XML stanzas). 2263 9.2.2 Presence Semantics 2265 The element can be seen as a basic broadcast or 2266 "publish-subscribe" mechanism, whereby multiple entities receive 2267 information (in this case, presence information) about an entity to 2268 which they have subscribed. In general, a publishing entity SHOULD 2269 send a presence stanza with no 'to' attribute, in which case the 2270 server to which the entity is connected SHOULD broadcast or multiplex 2271 that stanza to all subscribing entities. However, a publishing 2272 entity MAY also send a presence stanza with a 'to' attribute, in 2273 which case the server SHOULD route or deliver that stanza to the 2274 intended recipient. See Server Rules for Handling XML Stanzas 2275 (Section 10) for general routing and delivery rules related to XML 2276 stanzas, and [XMPP-IM] for presence-specific rules in the context of 2277 an instant messaging and presence application. 2279 9.2.3 IQ Semantics 2281 Info/Query, or IQ, is a request-response mechanism, similar in some 2282 ways to [HTTP]. The semantics of IQ enable an entity to make a 2283 request of, and receive a response from, another entity. The data 2284 content of the request and response is defined by the namespace 2285 declaration of a direct child element of the IQ element, and the 2286 interaction is tracked by the requesting entity through use of the 2287 'id' attribute. Thus IQ interactions follow a common pattern of 2288 structured data exchange such as get/result or set/result (although 2289 an error may be returned in reply to a request if appropriate): 2291 Requesting Responding 2292 Entity Entity 2293 ---------- ---------- 2294 | | 2295 | | 2296 | ------------------------> | 2297 | | 2298 | | 2299 | <------------------------ | 2300 | | 2301 | | 2302 | ------------------------> | 2303 | | 2304 | | 2305 | <------------------------ | 2306 | | 2308 In order to enforce these semantics, the following rules apply: 2310 1. The 'id' attribute is REQUIRED for IQ stanzas. 2312 2. The 'type' attribute is REQUIRED for IQ stanzas. The value MUST 2313 be one of the following: 2315 3. 2317 * get -- The stanza is a request for information or 2318 requirements. 2320 * set -- The stanza provides required data, sets new values, or 2321 replaces existing values. 2323 * result -- The stanza is a response to a successful get or set 2324 request. 2326 * error -- An error has occurred regarding processing or 2327 delivery of a previously-sent get or set (see Stanza Errors 2328 (Section 9.3)). 2330 4. An entity that receives an IQ request of type "get" or "set" MUST 2331 reply with an IQ response of type "result" or "error" (which 2332 response MUST preserve the 'id' attribute of the request). 2334 5. An entity that receives a stanza of type "result" or "error" MUST 2335 NOT respond to the stanza by sending a further IQ response of 2336 type "result" or "error"; however, as shown above, the requesting 2337 entity MAY send another request (e.g., an IQ of type "set" in 2338 order to provide required information discovered through a get/ 2339 result pair). 2341 6. An IQ stanza of type "get" or "set" MUST contain one and only one 2342 child element (properly-namespaced as defined in [XMPP-IM]) that 2343 specifies the semantics of the particular request or response. 2345 7. An IQ stanza of type "result" MUST include zero or one child 2346 elements. 2348 8. An IQ stanza of type "error" SHOULD include the child element 2349 contained in the associated "get" or "set" and MUST include an 2350 child; for details, see Stanza Errors (Section 9.3). 2352 9.3 Stanza Errors 2354 Stanza-related errors are handled in a manner similar to stream 2355 errors (Section 4.6). However, unlike stream errors, stanza errors 2356 are recoverable; therefore error stanzas include hints regarding 2357 actions that the original sender can take in order to remedy the 2358 error. 2360 9.3.1 Rules 2362 The following rules apply to stanza-related errors: 2364 o The receiving or processing entity that detects an error condition 2365 in relation to a stanza MUST return to the sending entity a stanza 2366 of the same kind (message, presence, or IQ) whose 'type' attribute 2367 is set to a value of "error" (such a stanza is called an "error 2368 stanza" herein). 2370 o The entity that generates an error stanza SHOULD include the 2371 original XML sent so that the sender can inspect and if necessary 2372 correct the XML before attempting to resend. 2374 o An error stanza MUST contain an child element. 2376 o An child MUST NOT be included if the 'type' attribute has 2377 a value other than "error" (or if there is no 'type' attribute). 2379 o An entity that receives an error stanza MUST NOT respond to the 2380 stanza with a further error stanza; this helps to prevent looping. 2382 9.3.2 Syntax 2384 The syntax for stanza-related errors is as follows: 2386 2387 [RECOMMENDED to include sender XML here] 2388 2389 2390 2391 OPTIONAL descriptive text 2392 2393 [OPTIONAL application-specific condition element] 2394 2395 2397 The stanza-name is one of message, presence, or iq. 2399 The value of the element's 'type' attribute MUST be one of 2400 the following: 2402 o cancel -- do not retry (the error is unrecoverable) 2403 o continue -- proceed (the condition was only a warning) 2405 o modify -- retry after changing the data sent 2407 o auth -- retry after providing credentials 2409 o wait -- retry after waiting (the error is temporary) 2411 The element: 2413 o MUST contain a child element corresponding to one of the defined 2414 stanza error conditions specified below; this element MUST be 2415 qualified by the 'urn:ietf:params:xml:ns:xmpp-stanzas' namespace. 2417 o MAY contain a child containing CDATA that describes the 2418 error in more detail; this element MUST be qualified by the 2419 'urn:ietf:params:xml:ns:xmpp-stanzas' namespace and SHOULD possess 2420 an 'xml:lang' attribute. 2422 o MAY contain a child element for an application-specific error 2423 condition; this element MUST be qualified by an 2424 application-defined namespace, and its structure is defined by 2425 that namespace. 2427 The element is OPTIONAL. If included, it SHOULD be used only 2428 to provide descriptive or diagnostic information that supplements the 2429 meaning of a defined condition or application-specific condition. It 2430 SHOULD NOT be interpreted programmatically by an application. It 2431 SHOULD NOT be used as the error message presented to a user, but MAY 2432 be shown in addition to the error message associated with the 2433 included condition element (or elements). 2435 Finally, to maintain backward compatibility, the schema (specified in 2436 [XMPP-IM]) allows the optional inclusion of a 'code' attribute on the 2437 element. 2439 9.3.3 Defined Conditions 2441 The following stanza-related error conditions are defined for use in 2442 stanza errors. 2444 o -- the sender has sent XML that is malformed or 2445 that cannot be processed (e.g., an IQ stanza that includes an 2446 unrecognized value of the 'type' attribute); the associated error 2447 type SHOULD be "modify". 2449 o -- access cannot be granted because an existing 2450 resource or session exists with the same name or address; the 2451 associated error type SHOULD be "cancel". 2453 o -- the feature requested is not 2454 implemented by the recipient or server and therefore cannot be 2455 processed; the associated error type SHOULD be "cancel". 2457 o -- the requesting entity does not possess the 2458 required permissions to perform the action; the associated error 2459 type SHOULD be "auth". 2461 o -- the recipient or server can no longer be contacted at 2462 this address (the error stanza MAY contain a new address in the 2463 CDATA of the element); the associated error type SHOULD be 2464 "modify". 2466 o -- the server could not process the 2467 stanza because of a misconfiguration or an otherwise-undefined 2468 internal server error; the associated error type SHOULD be "wait". 2470 o -- the addressed JID or item requested cannot be 2471 found; the associated error type SHOULD be "cancel". 2473 o -- the sending entity has provided or 2474 communicated an XMPP address (e.g., a value of the 'to' attribute) 2475 or aspect thereof (e.g., a resource identifier) that does not 2476 adhere to the syntax defined in Addressing Scheme (Section 3); the 2477 associated error type SHOULD be "modify". 2479 o -- the recipient or server understands the 2480 request but is refusing to process it because it does not meet 2481 criteria defined by the recipient or server (e.g., a local policy 2482 regarding acceptable words in messages); the associated error type 2483 SHOULD be "modify". 2485 o -- the recipient or server does not allow any 2486 entity to perform the action; the associated error type SHOULD be 2487 "cancel". 2489 o -- the sender must provide proper credentials 2490 before being allowed to perform the action, or has provided 2491 improper credentials; the associated error type SHOULD be "auth". 2493 o -- the requesting entity is not authorized to 2494 access the requested service because payment is required; the 2495 associated error type SHOULD be "auth". 2497 o -- the intended recipient is temporarily 2498 unavailable; the associated error type SHOULD be "wait" (note: an 2499 application MUST NOT return this error if doing so would provide 2500 information about the intended recipient's network availability to 2501 an entity that is not authorized to know such information). 2503 o -- the recipient or server is redirecting requests for 2504 this information to another entity, usually temporarily (the error 2505 stanza SHOULD contain the alternate address, which MUST be a valid 2506 JID, in the CDATA of the element); the associated 2507 error type SHOULD be "modify". 2509 o -- the requesting entity is not 2510 authorized to access the requested service because registration is 2511 required; the associated error type SHOULD be "auth". 2513 o -- a remote server or service specified 2514 as part or all of the JID of the intended recipient does not 2515 exist; the associated error type SHOULD be "cancel". 2517 o -- a remote server or service specified 2518 as part or all of the JID of the intended recipient could not be 2519 contacted within a reasonable amount of time; the associated error 2520 type SHOULD be "wait". 2522 o -- the server or recipient lacks the system 2523 resources necessary to service the request; the associated error 2524 type SHOULD be "wait". 2526 o -- the server or recipient does not 2527 currently provide the requested service; the associated error type 2528 SHOULD be "cancel". 2530 o -- the requesting entity is not 2531 authorized to access the requested service because a subscription 2532 is required; the associated error type SHOULD be "auth". 2534 o -- the error condition is not one of those 2535 defined by the other conditions in this list; any error type may 2536 be associated with this condition, and it SHOULD be used only in 2537 conjunction with an application-specific condition. 2539 o -- the recipient or server understood the 2540 request but was not expecting it at this time (e.g., the request 2541 was out of order); the associated error type SHOULD be "wait". 2543 9.3.4 Application-Specific Conditions 2545 As noted, an application MAY provide application-specific stanza 2546 error information by including a properly-namespaced child in the 2547 error element. The application-specific element SHOULD supplement or 2548 further qualify a defined element. Thus the element will 2549 contain two or three child elements: 2551 2552 2553 2554 2555 2556 2558 2559 2560 2562 2564 Some special application diagnostic information... 2565 2566 2567 2568 2570 10. Server Rules for Handling XML Stanzas 2572 Compliant server implementations MUST ensure in-order processing of 2573 XML stanzas between any two entities. 2575 Beyond the requirement for in-order processing, each server 2576 implementation will contain its own "delivery tree" for handling 2577 stanzas it receives. Such a tree determines whether a stanza needs 2578 to be routed to another domain, processed internally, or delivered to 2579 a resource associated with a connected node. The following rules 2580 apply: 2582 10.1 No 'to' Address 2584 If the stanza possesses no 'to' attribute, the server SHOULD process 2585 it on behalf of the entity that sent it. Because all stanzas 2586 received from other servers MUST possess a 'to' attribute, this rule 2587 applies only to stanzas received from a registered entity (such as a 2588 client) that is connected to the server. If the server receives a 2589 presence stanza with no 'to' attribute, the server SHOULD broadcast 2590 it to the entities that are subscribed to the sending entity's 2591 presence, if applicable (the semantics of presence broadcast for 2592 instant messaging and presence applications are defined in 2593 [XMPP-IM]). If the server receives an IQ stanza of type "get" or 2594 "set" with no 'to' attribute and it understands the namespace that 2595 qualifies the content of the stanza, it MUST either process the 2596 stanza on behalf of sending entity (where the meaning of "process" is 2597 determined by the semantics of the qualifying namespace) or return an 2598 error to the sending entity. 2600 10.2 Foreign Domain 2602 If the hostname of the domain identifier portion of the JID contained 2603 in the 'to' attribute does not match one of the configured hostnames 2604 of the server itself or a subdomain thereof, the server SHOULD route 2605 the stanza to the foreign domain (subject to local service 2606 provisioning and security policies regarding inter-domain 2607 communication). There are two possible cases: 2609 A server-to-server stream already exists between the two domains: The 2610 sender's server routes the stanza to the authoritative server for 2611 the foreign domain over the existing stream 2613 There exists no server-to-server stream between the two domains: The 2614 sender's server (1) resolves the hostname of the foreign domain 2615 (as defined under Server-to-Server Communications (Section 14.4)), 2616 (2) negotiates a server-to-server stream between the two domains 2617 (as defined under Use of TLS (Section 5) and Use of SASL (Section 2618 6)), and (3) routes the stanza to the authoritative server for the 2619 foreign domain over the newly-established stream 2621 If routing to the recipient's server is unsuccessful, the sender's 2622 server MUST return an error to the sender; if the recipient's server 2623 can be contacted but delivery by the recipient's server to the 2624 recipient is unsuccessful, the recipient's server MUST return an 2625 error to the sender by way of the sender's server. 2627 10.3 Subdomain 2629 If the hostname of the domain identifier portion of the JID contained 2630 in the 'to' attribute matches a subdomain of one of the configured 2631 hostnames of the server itself, the server MUST either process the 2632 stanza itself or route the stanza to a specialized service that is 2633 responsible for that subdomain (if the subdomain is configured), or 2634 return an error to the sender (if the subdomain is not configured). 2636 10.4 Mere Domain or Specific Resource 2638 If the hostname of the domain identifier portion of the JID contained 2639 in the 'to' attribute matches a configured hostname of the server 2640 itself and the JID contained in the 'to' attribute is of the form 2641 or , the server (or a defined resource 2642 thereof) MUST either process the stanza as appropriate for the stanza 2643 kind or return an error stanza to the sender. 2645 10.5 Node in Same Domain 2647 If the hostname of the domain identifier portion of the JID contained 2648 in the 'to' attribute matches a configured hostname of the server 2649 itself and the JID contained in the 'to' attribute is of the form 2650 or , the server SHOULD deliver 2651 the stanza to the intended recipient of the stanza as represented by 2652 the JID contained in the 'to' attribute. The following rules apply: 2654 1. If the JID contains a resource identifier (i.e., is of the form 2655 ) and there exists a connected resource 2656 that matches the full JID, the recipient's server SHOULD deliver 2657 the stanza to the stream or session that exactly matches the 2658 resource identifier. 2660 2. If the JID contains a resource identifier and there exists no 2661 connected resource that matches the full JID, the recipient's 2662 server SHOULD return a stanza error to the 2663 sender. 2665 3. If the JID is of the form and there exists at least 2666 one connected resource for the node, the recipient's server MUST 2667 deliver the stanza to at least one of the connected resources, 2668 according to application-specific rules (a set of delivery rules 2669 for instant messaging and presence applications is defined in 2670 [XMPP-IM]). 2672 11. XML Usage within XMPP 2674 11.1 Restrictions 2676 XMPP is a simplified and specialized protocol for streaming XML 2677 elements in order to exchange structured information in close to real 2678 time. Because XMPP does not require the parsing of arbitrary and 2679 complete XML documents, there is no requirement that XMPP needs to 2680 support the full feature set of [XML]. In particular, the following 2681 restrictions apply. 2683 With regard to XML generation, an XMPP implementation MUST NOT inject 2684 into an XML stream any of the following: 2686 o comments (as defined in Section 2.5 of [XML]) 2688 o processing instructions (Section 2.6 therein) 2690 o internal or external DTD subsets (Section 2.8 therein) 2692 o internal or external entity references (Section 4.2 therein) with 2693 the exception of predefined entities (Section 4.6 therein) 2695 o character data or attribute values containing unescaped characters 2696 that map to the predefined entities (Section 4.6 therein); such 2697 characters MUST be escaped 2699 With regard to XML processing, if an XMPP implementation receives 2700 such restricted XML data, it MUST ignore the data. 2702 11.2 XML Namespace Names and Prefixes 2704 XML Namespaces [XML-NAMES] are used within all XMPP-compliant XML to 2705 create strict boundaries of data ownership. The basic function of 2706 namespaces is to separate different vocabularies of XML elements that 2707 are structurally mixed together. Ensuring that XMPP-compliant XML is 2708 namespace-aware enables any allowable XML to be structurally mixed 2709 with any data element within XMPP. Rules for XML namespace names and 2710 prefixes are defined in the following subsections. 2712 11.2.1 Streams Namespace 2714 A streams namespace declaration is REQUIRED in all XML stream 2715 headers. The name of the streams namespace MUST be 'http:// 2716 etherx.jabber.org/streams'. The element names of the 2717 element and its and children MUST be qualified 2718 by the streams namespace prefix in all instances. An implementation 2719 SHOULD generate only the 'stream:' prefix for these elements, and for 2720 historical reasons MAY accept only the 'stream:' prefix. 2722 11.2.2 Default Namespace 2724 A default namespace declaration is REQUIRED and is used in all XML 2725 streams in order to define the allowable first-level children of the 2726 root stream element. This namespace declaration MUST be the same for 2727 the initial stream and the response stream so that both streams are 2728 qualified consistently. The default namespace declaration applies to 2729 the stream and all stanzas sent within a stream (unless explicitly 2730 qualified by another namespace, or by the prefix of the streams 2731 namespace or the dialback namespace). 2733 A server implementation MUST support the following two default 2734 namespaces (for historical reasons, some implementations MAY support 2735 only these two default namespaces): 2737 o jabber:client -- this default namespace is declared when the 2738 stream is used for communications between a client and a server 2740 o jabber:server -- this default namespace is declared when the 2741 stream is used for communications between two servers 2743 A client implementation MUST support the 'jabber:client' default 2744 namespace, and for historical reasons MAY support only that default 2745 namespace. 2747 An implementation MUST NOT generate namespace prefixes for elements 2748 in the default namespace if the default namespace is 'jabber:client' 2749 or 'jabber:server'. An implementation SHOULD NOT generate namespace 2750 prefixes for elements qualified by content (as opposed to stream) 2751 namespaces other than 'jabber:client' and 'jabber:server'. 2753 Note: The 'jabber:client' and 'jabber:server' namespaces are nearly 2754 identical but are used in different contexts (client-to-server 2755 communications for 'jabber:client' and server-to-server 2756 communications for 'jabber:server'). The only difference between the 2757 two is that the 'to' and 'from' attributes are OPTIONAL on stanzas 2758 sent within 'jabber:client', whereas they are REQUIRED on stanzas 2759 sent within 'jabber:server'. If a compliant implementation accepts a 2760 stream that is qualified by the 'jabber:client' or 'jabber:server' 2761 namespace, it MUST support the common attributes (Section 9.1) and 2762 basic semantics (Section 9.2) of all three core stanza kinds 2763 (message, presence, and IQ). 2765 11.2.3 Dialback Namespace 2767 A dialback namespace declaration is REQUIRED for all elements used in 2768 server dialback (Section 8). The name of the dialback namespace MUST 2769 be 'jabber:server:dialback'. All elements qualified by this 2770 namespace MUST be prefixed. An implementation SHOULD generate only 2771 the 'db:' prefix for such elements and MAY accept only the 'db:' 2772 prefix. 2774 11.3 Validation 2776 Except as noted with regard to 'to' and 'from' addresses for stanzas 2777 within the 'jabber:server' namespace, a server is not responsible for 2778 validating the XML elements forwarded to a client or another server; 2779 an implementation MAY choose to provide only validated data elements 2780 but this is OPTIONAL (although an implementation MUST NOT accept XML 2781 that is not well-formed). Clients SHOULD NOT rely on the ability to 2782 send data which does not conform to the schemas, and SHOULD ignore 2783 any non-conformant elements or attributes on the incoming XML stream. 2784 Validation of XML streams and stanzas is OPTIONAL, and schemas are 2785 included herein for descriptive purposes only. 2787 11.4 Inclusion of Text Declaration 2789 Implementations SHOULD send a text declaration before sending a 2790 stream header. Applications MUST follow the rules in [XML] regarding 2791 the circumstances under which a text declaration is included. 2793 11.5 Character Encoding 2795 Implementations MUST support the UTF-8 (RFC 3269 [UTF-8]) 2796 transformation of Universal Character Set (ISO/IEC 10646-1 [UCS2]) 2797 characters, as required by RFC 2277 [CHARSET]. Implementations MUST 2798 NOT attempt to use any other encoding. 2800 12. Core Compliance Requirements 2802 This section summarizes the specific aspects of the Extensible 2803 Messaging and Presence Protocol that MUST be supported by servers and 2804 clients in order to be considered compliant implementations, as well 2805 as additional protocol aspects that SHOULD be supported. For 2806 compliance purposes, we draw a distinction between core protocols 2807 (which MUST be supported by any server or client, regardless of the 2808 specific application) and instant messaging protocols (which MUST be 2809 supported only by instant messaging and presence applications built 2810 on top of the core protocols). Compliance requirements that apply to 2811 all servers and clients are specified in this section; compliance 2812 requirements for instant messaging servers and clients are specified 2813 in the corresponding section of [XMPP-IM]. 2815 12.1 Servers 2817 In addition to all defined requirements with regard to security, XML 2818 usage, and internationalization, a server MUST support the following 2819 core protocols in order to be considered compliant: 2821 o Application of the [NAMEPREP], Nodeprep (Appendix A), and 2822 Resourceprep (Appendix B) profiles of [STRINGPREP] to addresses 2823 (including ensuring that domain identifiers are internationalized 2824 domain names as defined in [IDNA]) 2826 o XML streams (Section 4), including Use of TLS (Section 5), Use of 2827 SASL (Section 6), and Resource Binding (Section 7) 2829 o The basic semantics of the three defined stanza kinds (i.e., 2830 , , and ) as specified in stanza 2831 semantics (Section 9.2) 2833 o Generation (and, where appropriate, handling) of error syntax and 2834 semantics related to streams, TLS, SASL, and XML stanzas 2836 In addition, a server SHOULD support the following core protocol: 2838 o Server dialback (Section 8) 2840 12.2 Clients 2842 A client MUST support the following core protocols in order to be 2843 considered compliant: 2845 o XML streams (Section 4), including Use of TLS (Section 5), Use of 2846 SASL (Section 6), and Resource Binding (Section 7) 2848 o The basic semantics of the three defined stanza kinds (i.e., 2849 , , and ) as specified in stanza 2850 semantics (Section 9.2) 2852 o Handling (and, where appropriate, generation) of error syntax and 2853 semantics related to streams, TLS, SASL, and XML stanzas 2855 In addition, a client SHOULD support the following core protocols: 2857 o Generation of addresses to which the [NAMEPREP], Nodeprep 2858 (Appendix A), and Resourceprep (Appendix B) profiles of 2859 [STRINGPREP] can be applied without failing 2861 13. Internationalization Considerations 2863 XML streams MUST be encoded in UTF-8 as specified under Character 2864 Encoding (Section 11.5). As specified under Stream Attributes 2865 (Section 4.2), an XML stream SHOULD include an 'xml:lang' attribute 2866 that is treated as the default language for any XML character data 2867 sent over the stream that is intended to be presented to a human 2868 user. As specified under xml:lang (Section 9.1.5), an XML stanza 2869 SHOULD include an 'xml:lang' attribute if the stanza contains XML 2870 character data that is intended to be presented to a human user. A 2871 server SHOULD apply the default 'xml:lang' attribute to stanzas it 2872 routes or delivers on behalf of connected entities, and MUST NOT 2873 modify or delete 'xml:lang' attributes from stanzas it receives from 2874 other entities. 2876 14. Security Considerations 2878 14.1 High Security 2880 For the purposes of XMPP communications (client-to-server and 2881 server-to-server), the term "high security" refers to the use of 2882 security technologies that provide both mutual authentication and 2883 integrity-checking; in particular, when using certificate-based 2884 authentication to provide high security, a chain-of-trust SHOULD be 2885 established out-of-band, although a shared certificate authority 2886 signing certificates could allow a previously unknown certificate to 2887 establish trust in-band. See Section 14.2 below regarding certificate 2888 validation procedures. 2890 Implementations MUST support high security. Service provisioning 2891 SHOULD use high security, subject to local security policies. 2893 14.2 Certificate Validation 2895 When an XMPP peer communicates with another peer securely, it MUST 2896 validate the peer's certificate. There are three possible cases: 2898 Case #1: The peer contains an End Entity certificate which appears to 2899 be certified by a chain of certificates terminating in a trust 2900 anchor (as described in Section 6.1 of [X509]). 2902 Case #2: The peer certificate is certified by a Certificate Authority 2903 not known to the validating peer. 2905 Case #3: The peer certificate is self-signed. 2907 In Case #1, the validating peer MUST do one of two things: 2909 1. Verify the peer certificate according to the rules of [X509]. 2910 The certificate SHOULD then be checked against the expected 2911 identity of the peer following the rules described in [HTTP-TLS], 2912 except that a subjectAltName extension of type "xmpp" MUST be 2913 used as the identity if present. If one of these checks fails, 2914 user-oriented clients MUST either notify the user (clients MAY 2915 give the user the opportunity to continue with the connection in 2916 any case) or terminate the connection with a bad certificate 2917 error. Automated clients SHOULD terminate the connection (with a 2918 bad certificate error) and log the error to an appropriate audit 2919 log. Automated clients MAY provide a configuration setting that 2920 disables this check, but MUST provide a setting which enables it. 2922 2. The peer SHOULD show the certificate to a user for approval, 2923 including the entire certificate chain. The peer MUST Cache the 2924 certificate (or some non-forgeable representation such as a 2925 hash). In future connections, the peer MUST verify that the same 2926 certificate was presented and MUST notify the user if it has 2927 changed. 2929 In Case #2 and Case #3, implementations SHOULD act as in (2) above. 2931 14.3 Client-to-Server Communications 2933 A compliant implementation MUST support both TLS and SASL for 2934 connections to a server. 2936 The TLS protocol for encrypting XML streams (defined under Use of TLS 2937 (Section 5)) provides a reliable mechanism for helping to ensure the 2938 confidentiality and data integrity of data exchanged between two 2939 entities. 2941 The SASL protocol for authenticating XML streams (defined under Use 2942 of SASL (Section 6)) provides a reliable mechanism for validating 2943 that a client connecting to a server is who it claims to be. 2945 Client-to-server communications MUST NOT proceed until the DNS 2946 hostname asserted by the server has been resolved. Such resolutions 2947 SHOULD first attempt to resolve the hostname using an [SRV] Service 2948 of "xmpp-client" and Proto of "tcp", resulting in resource records 2949 such as "_xmpp-client._tcp.example.com." (the use of the string 2950 "xmpp-client" for the service identifier is consistent with the IANA 2951 registration). If the SRV lookup fails, the fallback is a normal 2952 IPv4/IPv6 address record resolution to determine the IP address, 2953 using the "xmpp-client" port of 5222 registered with the IANA. 2955 The IP address and method of access of clients MUST NOT be made 2956 public by a server, nor are any connections other than the original 2957 server connection required. This helps to protect the client's 2958 server from direct attack or identification by third parties. 2960 14.4 Server-to-Server Communications 2962 A compliant implementation MUST support both TLS and SASL for 2963 inter-domain communications. For historical reasons, a compliant 2964 implementation SHOULD also support Server Dialback (Section 8). 2966 Because service provisioning is a matter of policy, it is OPTIONAL 2967 for any given domain to communicate with other domains, and 2968 server-to-server communications MAY be disabled by the administrator 2969 of any given deployment. If a particular domain enables inter-domain 2970 communications, it SHOULD enable high security. 2972 Administrators may want to require use of SASL for server-to-server 2973 communications in order to ensure both authentication and 2974 confidentiality (e.g., on an organization's private network). 2975 Compliant implementations SHOULD support SASL for this purpose. 2977 Inter-domain connections MUST NOT proceed until the DNS hostnames 2978 asserted by the servers have been resolved. Such resolutions MUST 2979 first attempt to resolve the hostname using an [SRV] Service of 2980 "xmpp-server" and Proto of "tcp", resulting in resource records such 2981 as "_xmpp-server._tcp.example.com." (the use of the string 2982 "xmpp-server" for the service identifier is consistent with the IANA 2983 registration; note well that the "xmpp-server" service identifier 2984 supersedes the earlier use of a "jabber" service identifier, since 2985 the earlier usage did not conform to [SRV]; implementations desiring 2986 to be backward compatible should continue to look for or answer to 2987 the "jabber" service identifier as well). If the SRV lookup fails, 2988 the fallback is a normal IPv4/IPv6 address record resolution to 2989 determine the IP address, using the "xmpp-server" port of 5269 2990 registered with the IANA. 2992 Server dialback helps protect against domain spoofing, thus making it 2993 more difficult to spoof XML stanzas. It is not a mechanism for 2994 authenticating, securing, or encrypting streams between servers as is 2995 done via SASL and TLS. Furthermore, it is susceptible to DNS 2996 poisoning attacks unless DNSSec [DNSSEC] is used, and even if the DNS 2997 information is accurate, dialback cannot protect from attacks where 2998 the attacker is capable of hijacking the IP address of the remote 2999 domain. Domains requiring robust security SHOULD use TLS and SASL. 3000 If SASL is used for server-to-server authentication, dialback SHOULD 3001 NOT be used since it is unnecessary. 3003 14.5 Order of Layers 3005 The order of layers in which protocols MUST be stacked is as follows: 3007 1. TCP 3009 2. TLS 3011 3. SASL 3013 4. XMPP 3015 The rationale for this order is that [TCP] is the base connection 3016 layer used by all of the protocols stacked on top of TCP, [TLS] is 3017 often provided at the operating system layer, [SASL] is often 3018 provided at the application layer, and XMPP is the application 3019 itself. 3021 14.6 Lack of SASL Channel Binding to TLS 3023 The SASL framework does not provide a mechanism to bind SASL 3024 authentication to a security layer providing confidentiality and 3025 integrity protection that was negotiated at a lower layer. This lack 3026 of a "channel binding" prevents SASL from being able to verify that 3027 the source and destination end points to which the lower layer's 3028 security is bound are equivalent to the end points that SASL is 3029 authenticating. If the end points are not identical, the lower 3030 layer's security cannot be trusted to protect data transmitted 3031 between the SASL authenticated entities. In such a situation, a SASL 3032 security layer should be negotiated which effectively ignores the 3033 presence of the lower layer security. 3035 14.7 Mandatory-to-Implement Technologies 3037 At a minimum, all implementations MUST support the following 3038 mechanisms: 3040 for authentication: the SASL [DIGEST-MD5] mechanism 3042 for confidentiality: TLS (using the TLS_RSA_WITH_3DES_EDE_CBC_SHA 3043 cipher) 3045 for both: TLS plus SASL EXTERNAL(using the 3046 TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher supporting client-side 3047 certificates) 3049 14.8 Firewalls 3051 Communications using XMPP normally occur over [TCP] connections on 3052 port 5222 (client-to-server) or port 5269 (server-to-server), as 3053 registered with the IANA (see IANA Considerations (Section 15)). Use 3054 of these well-known ports allows administrators to easily enable or 3055 disable XMPP activity through existing and commonly-deployed 3056 firewalls. 3058 14.9 Use of base64 in SASL 3060 Both the client and the server MUST verify any [BASE64] data received 3061 during SASL negotiation. An implementation MUST reject (not ignore) 3062 any characters that are not explicitly allowed by the base64 3063 alphabet; this helps to guard against creation of a covert channel 3064 that could be used to "leak" information. An implementation MUST NOT 3065 break on invalid input and MUST reject any sequence of base64 3066 characters containing the pad ('=') character if that character is 3067 included as something other than the last character of the data (e.g. 3069 "=AAA" or "BBBB=CCC"); this helps to guard against buffer overflow 3070 attacks and other attacks on the implementation. Base encoding 3071 visually hides otherwise easily recognized information, such as 3072 passwords, but does not provide any computational confidentiality. 3073 Base 64 encoding MUST follow the definition in Section 3 of RFC 3548 3074 [BASE64]. 3076 14.10 Stringprep Profiles 3078 XMPP makes use of the [NAMEPREP] profile of [STRINGPREP] for 3079 processing of domain identifiers; for security considerations related 3080 to Nameprep, refer to the appropriate section of [NAMEPREP]. 3082 In addition, XMPP defines two profiles of [STRINGPREP]: Nodeprep 3083 (Appendix A) for node identifiers and Resourceprep (Appendix B) for 3084 resource identifiers. 3086 The Unicode and ISO/IEC 10646 repertoires have many characters that 3087 look similar. In many cases, users of security protocols might do 3088 visual matching, such as when comparing the names of trusted third 3089 parties. Because it is impossible to map similar-looking characters 3090 without a great deal of context such as knowing the fonts used, 3091 stringprep does nothing to map similar-looking characters together 3092 nor to prohibit some characters because they look like others. 3094 A node identifier can be employed as one part of an entity's address 3095 in XMPP. One common usage is as the username of an instant messaging 3096 user; another is as the name of a multi-user chat room; and many 3097 other kinds of entities could use node identifiers as part of their 3098 addresses. The security of such services could be compromised based 3099 on different interpretations of the internationalized node 3100 identifier; for example, a user entering a single internationalized 3101 node identifier could access another user's account information, or a 3102 user could gain access to an otherwise restricted chat room or 3103 service. 3105 A resource identifier can be employed as one part of an entity's 3106 address in XMPP. One common usage is as the name for an instant 3107 messaging user's connected resource (active session); another is as 3108 the nickname of a user in a multi-user chat room; and many other 3109 kinds of entities could use resource identifiers as part of their 3110 addresses. The security of such services could be compromised based 3111 on different interpretations of the internationalized resource 3112 identifier; for example, a user could attempt to initiate multiple 3113 sessions with the same name, or a user could send a message to 3114 someone other than the intended recipient in a multi-user chat room. 3116 15. IANA Considerations 3118 15.1 XML Namespace Name for TLS Data 3120 A URN sub-namespace for TLS-related data in the Extensible Messaging 3121 and Presence Protocol (XMPP) is defined as follows. (This namespace 3122 name adheres to the format defined in The IETF XML Registry 3123 [XML-REG].) 3125 URI: urn:ietf:params:xml:ns:xmpp-tls 3127 Specification: XXXX 3129 Description: This is the XML namespace name for TLS-related data in 3130 the Extensible Messaging and Presence Protocol (XMPP) as defined 3131 by XXXX. 3133 Registrant Contact: IETF, XMPP Working Group, 3135 15.2 XML Namespace Name for SASL Data 3137 A URN sub-namespace for SASL-related data in the Extensible Messaging 3138 and Presence Protocol (XMPP) is defined as follows. (This namespace 3139 name adheres to the format defined in [XML-REG].) 3141 URI: urn:ietf:params:xml:ns:xmpp-sasl 3143 Specification: XXXX 3145 Description: This is the XML namespace name for SASL-related data in 3146 the Extensible Messaging and Presence Protocol (XMPP) as defined 3147 by XXXX. 3149 Registrant Contact: IETF, XMPP Working Group, 3151 15.3 XML Namespace Name for Stream Errors 3153 A URN sub-namespace for stream-related error data in the Extensible 3154 Messaging and Presence Protocol (XMPP) is defined as follows. (This 3155 namespace name adheres to the format defined in [XML-REG].) 3157 URI: urn:ietf:params:xml:ns:xmpp-streams 3159 Specification: XXXX 3160 Description: This is the XML namespace name for stream-related error 3161 data in the Extensible Messaging and Presence Protocol (XMPP) as 3162 defined by XXXX. 3164 Registrant Contact: IETF, XMPP Working Group, 3166 15.4 XML Namespace Name for Resource Binding 3168 A URN sub-namespace for resource binding in the Extensible Messaging 3169 and Presence Protocol (XMPP) is defined as follows. (This namespace 3170 name adheres to the format defined in [XML-REG].) 3172 URI: urn:ietf:params:xml:ns:xmpp-bind 3174 Specification: XXXX 3176 Description: This is the XML namespace name for resource binding in 3177 the Extensible Messaging and Presence Protocol (XMPP) as defined 3178 by XXXX. 3180 Registrant Contact: IETF, XMPP Working Group, 3182 15.5 XML Namespace Name for Stanza Errors 3184 A URN sub-namespace for stanza-related error data in the Extensible 3185 Messaging and Presence Protocol (XMPP) is defined as follows. (This 3186 namespace name adheres to the format defined in [XML-REG].) 3188 URI: urn:ietf:params:xml:ns:xmpp-stanzas 3190 Specification: XXXX 3192 Description: This is the XML namespace name for stanza-related error 3193 data in the Extensible Messaging and Presence Protocol (XMPP) as 3194 defined by XXXX. 3196 Registrant Contact: IETF, XMPP Working Group, 3198 15.6 Nodeprep Profile of Stringprep 3200 The Nodeprep profile of stringprep is defined under Nodeprep 3201 (Appendix A). The IANA registers Nodeprep in the stringprep profile 3202 registry. 3204 Name of this profile: 3206 Nodeprep 3208 RFC in which the profile is defined: 3210 XXXX 3212 Indicator whether or not this is the newest version of the profile: 3214 This is the first version of Nodeprep 3216 15.7 Resourceprep Profile of Stringprep 3218 The Resourceprep profile of stringprep is defined under Resourceprep 3219 (Appendix B). The IANA registers Resourceprep in the stringprep 3220 profile registry. 3222 Name of this profile: 3224 Resourceprep 3226 RFC in which the profile is defined: 3228 XXXX 3230 Indicator whether or not this is the newest version of the profile: 3232 This is the first version of Resourceprep 3234 15.8 GSSAPI Service Name 3236 The IANA registers "xmpp" as a GSSAPI [GSS-API] service name, as 3237 defined under SASL Definition (Section 6.3). 3239 15.9 Port Numbers 3241 The IANA currently registers "jabber-client" and "jabber-server" as 3242 keywords for [TCP] ports 5222 and 5269 respectively. The IANA shall 3243 change these registrations to "xmpp-client" and "xmpp-server" 3244 respectively. 3246 These ports SHOULD be used for client-to-server and server-to-server 3247 communications respectively, but their use is OPTIONAL. 3249 Normative References 3251 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax 3252 Specifications: ABNF", RFC 2234, November 1997. 3254 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data 3255 Encodings", RFC 3548, July 2003. 3257 [CHARSET] Alvestrand, H., "IETF Policy on Character Sets and 3258 Languages", BCP 18, RFC 2277, January 1998. 3260 [DIGEST-MD5] 3261 Leach, P. and C. Newman, "Using Digest Authentication as a 3262 SASL Mechanism", RFC 2831, May 2000. 3264 [DNS] Mockapetris, P., "Domain names - implementation and 3265 specification", STD 13, RFC 1035, November 1987. 3267 [GSS-API] Linn, J., "Generic Security Service Application Program 3268 Interface, Version 2", RFC 2078, January 1997. 3270 [HTTP-TLS] 3271 Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 3273 [IMP-REQS] 3274 Day, M., Aggarwal, S. and J. Vincent, "Instant Messaging / 3275 Presence Protocol Requirements", RFC 2779, February 2000. 3277 [IPv6] Hinden, R. and S. Deering, "IP Version 6 Addressing 3278 Architecture", RFC 2373, July 1998. 3280 [LANGTAGS] 3281 Alvestrand, H., "Tags for the Identification of 3282 Languages", BCP 47, RFC 3066, January 2001. 3284 [IDNA] Faltstrom, P., Hoffman, P. and A. Costello, 3285 "Internationalizing Domain Names in Applications (IDNA)", 3286 RFC 3490, March 2003. 3288 [NAMEPREP] 3289 Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep 3290 Profile for Internationalized Domain Names (IDN)", RFC 3291 3491, March 2003. 3293 [SASL] Myers, J., "Simple Authentication and Security Layer 3294 (SASL)", RFC 2222, October 1997. 3296 [SRV] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for 3297 specifying the location of services (DNS SRV)", RFC 2782, 3298 February 2000. 3300 [STRINGPREP] 3301 Hoffman, P. and M. Blanchet, "Preparation of 3302 Internationalized Strings ("STRINGPREP")", RFC 3454, 3303 December 2002. 3305 [TCP] Postel, J., "Transmission Control Protocol", STD 7, RFC 3306 793, September 1981. 3308 [TERMS] Bradner, S., "Key words for use in RFCs to Indicate 3309 Requirement Levels", BCP 14, RFC 2119, March 1997. 3311 [TLS] Dierks, T., Allen, C., Treese, W., Karlton, P., Freier, A. 3312 and P. Kocher, "The TLS Protocol Version 1.0", RFC 2246, 3313 January 1999. 3315 [UCS2] International Organization for Standardization, 3316 "Information Technology - Universal Multiple-octet coded 3317 Character Set (UCS) - Amendment 2: UCS Transformation 3318 Format 8 (UTF-8)", ISO Standard 10646-1 Addendum 2, 3319 October 1996. 3321 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO 3322 10646", STD 63, RFC 3629, November 2003. 3324 [X509] Housley, R., Polk, W., Ford, W. and D. Solo, "Internet 3325 X.509 Public Key Infrastructure Certificate and 3326 Certificate Revocation List (CRL) Profile", RFC 3280, 3327 April 2002. 3329 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, 3330 "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C 3331 REC-xml, October 2000, . 3333 [XML-NAMES] 3334 Bray, T., Hollander, D. and A. Layman, "Namespaces in 3335 XML", W3C REC-xml-names, January 1999, . 3338 Informative References 3340 [ACAP] Newman, C. and J. Myers, "ACAP -- Application 3341 Configuration Access Protocol", RFC 2244, November 1997. 3343 [DNSSEC] Eastlake, D., "Domain Name System Security Extensions", 3344 RFC 2535, March 1999. 3346 [HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 3347 Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext 3348 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 3350 [IMAP] Crispin, M., "Internet Message Access Protocol - Version 3351 4rev1", RFC 2060, December 1996. 3353 [JSF] Jabber Software Foundation, "Jabber Software Foundation", 3354 . 3356 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 3357 STD 53, RFC 1939, May 1996. 3359 [RANDOM] Eastlake, D., Crocker, S. and J. Schiller, "Randomness 3360 Recommendations for Security", RFC 1750, December 1994. 3362 [URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform 3363 Resource Identifiers (URI): Generic Syntax", RFC 2396, 3364 August 1998. 3366 [USINGTLS] 3367 Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 3368 2595, June 1999. 3370 [XML-REG] Mealling, M., "The IETF XML Registry", 3371 draft-mealling-iana-xmlns-registry-05 (work in progress), 3372 June 2003. 3374 [XMPP-IM] Saint-Andre, P., "Extensible Messaging and Presence 3375 Protocol (XMPP): Instant Messaging and Presence", 3376 draft-ietf-xmpp-im-21 (work in progress), January 2004. 3378 Author's Address 3380 Peter Saint-Andre 3381 Jabber Software Foundation 3383 EMail: stpeter@jabber.org 3385 Appendix A. Nodeprep 3387 A.1 Introduction 3389 This appendix defines the "Nodeprep" profile of [STRINGPREP]. As 3390 such, it specifies processing rules that will enable users to enter 3391 internationalized node identifiers in the Extensible Messaging and 3392 Presence Protocol (XMPP) and have the highest chance of getting the 3393 content of the strings correct. (An XMPP node identifier is the 3394 optional portion of an XMPP address that precedes a domain identifier 3395 and the '@' separator; it is often but not exclusively associated 3396 with an instant messaging username.) These processing rules are 3397 intended only for XMPP node identifiers and are not intended for 3398 arbitrary text or any other aspect of an XMPP address. 3400 This profile defines the following, as required by [STRINGPREP]: 3402 o The intended applicability of the profile: internationalized node 3403 identifiers within XMPP 3405 o The character repertoire that is the input and output to 3406 stringprep: Unicode 3.2, specified in Section 2 of this Appendix 3408 o The mappings used: specified in Section 3 3410 o The Unicode normalization used: specified in Section 4 3412 o The characters that are prohibited as output: specified in Section 3413 5 3415 o Bidirectional character handling: specified in Section 6 3417 A.2 Character Repertoire 3419 This profile uses Unicode 3.2 with the list of unassigned code points 3420 being Table A.1, both defined in Appendix A of [STRINGPREP]. 3422 A.3 Mapping 3424 This profile specifies mapping using the following tables from 3425 [STRINGPREP]: 3427 Table B.1 3429 Table B.2 3431 A.4 Normalization 3433 This profile specifies using Unicode normalization form KC, as 3434 described in [STRINGPREP]. 3436 A.5 Prohibited Output 3438 This profile specifies prohibiting use of the following tables from 3439 [STRINGPREP]. 3441 Table C.1.1 3443 Table C.1.2 3445 Table C.2.1 3447 Table C.2.2 3449 Table C.3 3451 Table C.4 3453 Table C.5 3455 Table C.6 3457 Table C.7 3459 Table C.8 3461 Table C.9 3463 In addition, the following Unicode characters are also prohibited: 3465 #x22 (") 3467 #x26 (&) 3469 #x27 (') 3471 #x2F (/) 3473 #x3A (:) 3475 #x3C (<) 3477 #x3E (>) 3479 #x40 (@) 3481 A.6 Bidirectional Characters 3483 This profile specifies checking bidirectional strings as described in 3484 Section 6 of [STRINGPREP]. 3486 Appendix B. Resourceprep 3487 B.1 Introduction 3489 This appendix defines the "Resourceprep" profile of [STRINGPREP]. As 3490 such, it specifies processing rules that will enable users to enter 3491 internationalized resource identifiers in the Extensible Messaging 3492 and Presence Protocol (XMPP) and have the highest chance of getting 3493 the content of the strings correct. (An XMPP resource identifier is 3494 the optional portion of an XMPP address that follows a domain 3495 identifier and the '/' separator; it is often but not exclusively 3496 associated with an instant messaging session name.) These processing 3497 rules are intended only for XMPP resource identifiers and are not 3498 intended for arbitrary text or any other aspect of an XMPP address. 3500 This profile defines the following, as required by [STRINGPREP]: 3502 o The intended applicability of the profile: internationalized 3503 resource identifiers within XMPP 3505 o The character repertoire that is the input and output to 3506 stringprep: Unicode 3.2, specified in Section 2 of this Appendix 3508 o The mappings used: specified in Section 3 3510 o The Unicode normalization used: specified in Section 4 3512 o The characters that are prohibited as output: specified in Section 3513 5 3515 o Bidirectional character handling: specified in Section 6 3517 B.2 Character Repertoire 3519 This profile uses Unicode 3.2 with the list of unassigned code points 3520 being Table A.1, both defined in Appendix A of [STRINGPREP]. 3522 B.3 Mapping 3524 This profile specifies mapping using the following tables from 3525 [STRINGPREP]: 3527 Table B.1 3529 B.4 Normalization 3531 This profile specifies using Unicode normalization form KC, as 3532 described in [STRINGPREP]. 3534 B.5 Prohibited Output 3536 This profile specifies prohibiting use of the following tables from 3537 [STRINGPREP]. 3539 Table C.1.2 3541 Table C.2.1 3543 Table C.2.2 3545 Table C.3 3547 Table C.4 3549 Table C.5 3551 Table C.6 3553 Table C.7 3555 Table C.8 3557 Table C.9 3559 B.6 Bidirectional Characters 3561 This profile specifies checking bidirectional strings as described in 3562 Section 6 of [STRINGPREP]. 3564 Appendix C. XML Schemas 3566 The following XML schemas are descriptive, not normative. For 3567 schemas defining the 'jabber:client' and 'jabber:server' namespaces, 3568 refer to [XMPP-IM]. 3570 C.1 Streams namespace 3572 3574 3580 3583 3584 3585 3586 3587 3588 3591 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3617 3618 3619 3620 3622 3626 3627 3628 3630 3632 C.2 Stream error namespace 3634 3636 3643 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3682 3684 C.3 TLS namespace 3686 3688 3694 3695 3696 3697 3701 3702 3703 3705 3706 3707 3709 3710 3711 3712 3713 3715 3717 C.4 SASL namespace 3719 3721 3727 3728 3729 3730 3731 3732 3733 3735 3737 3738 3739 3740 3741 3744 3745 3746 3747 3749 3750 3751 3752 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3768 3769 3770 3771 3772 3773 3774 3776 3777 3778 3779 3780 3782 3784 C.5 Resource binding namespace 3786 3788 3794 3795 3796 3797 3798 3799 3800 3801 3803 3804 3806 3808 C.6 Dialback namespace 3810 3812 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3857 3859 C.7 Stanza error namespace 3861 3862 3869 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3894 3895 3896 3897 3898 3900 3901 3902 3903 3904 3906 3908 Appendix D. Differences Between Core Jabber Protocol and XMPP 3910 This section is non-normative. 3912 XMPP has been adapted from the protocols originally developed in the 3913 Jabber open-source community, which can be thought of as "XMPP 0.9". 3914 Because there exists a large installed base of Jabber implementations 3915 and deployments, it may be helpful to specify the key differences 3916 between Jabber and XMPP in order to expedite and encourage upgrades 3917 of those implementations and deployments to XMPP. This section 3918 summarizes the core differences, while the corresponding section of 3919 [XMPP-IM] summarizes the differences that relate specifically to 3920 instant messaging and presence applications. 3922 D.1 Channel Encryption 3924 It is common practice in the Jabber community to use SSL for channel 3925 encryption on ports other than 5222 and 5269 (the convention is to 3926 use ports 5223 and 5270). XMPP uses TLS over the IANA-registered 3927 ports for channel encryption, as defined under Use of TLS (Section 5) 3928 herein. 3930 D.2 Authentication 3932 The client-server authentication protocol developed in the Jabber 3933 community uses a basic IQ interaction qualified by the 3934 'jabber:iq:auth' namespace (documentation of this protocol is 3935 contained in "JEP-0078: Non-SASL Authentication", published by the 3936 Jabber Software Foundation [JSF]). XMPP uses SASL for 3937 authentication, as defined under Use of SASL (Section 6) herein. 3939 The Jabber community does not currently possess an authentication 3940 protocol for server-to-server communications, only the Server 3941 Dialback (Section 8) protocol to prevent server spoofing. XMPP 3942 augments Server Dialback with a true server-to-server authentication 3943 protocol, as defined under Use of SASL (Section 6) herein. 3945 D.3 Resource Binding 3947 Resource binding in the Jabber community is handled via the 3948 'jabber:iq:auth' namespace that is also used for client 3949 authentication with a server. XMPP defines a dedicated namespace for 3950 resource binding as well as the ability for a server to generate a 3951 resource identifier on behalf of a client, as defined under Resource 3952 Binding (Section 7). 3954 D.4 JID Processing 3955 JID processing was somewhat loosely defined by the Jabber community 3956 (documentation of forbidden characters and case handling is contained 3957 in "JEP-0029: Definition of Jabber Identifiers", published by the 3958 Jabber Software Foundation [JSF]). XMPP specifies the use of 3959 [NAMEPREP] for domain identifiers and supplements Nameprep with two 3960 additional [STRINGPREP] profiles for JID processing: Nodeprep 3961 (Appendix A) for node identifiers and Resourceprep (Appendix B) for 3962 resource identifiers . 3964 D.5 Error Handling 3966 Stream-related errors are handled in the Jabber community via simple 3967 CDATA text in a element. In XMPP, stream-related 3968 errors are handled via an extensible mechanism defined under Stream 3969 Errors (Section 4.6) herein. 3971 Stanza-related errors are handled in the Jabber community via 3972 HTTP-style error codes. In XMPP, stanza-related errors are handled 3973 via an extensible mechanism defined under Stanza Errors (Section 9.3) 3974 herein. (Documentation of a mapping between Jabber and XMPP error 3975 handling mechanisms is contained in "JEP-0086: Legacy Errors", 3976 published by the Jabber Software Foundation [JSF].) 3978 D.6 Internationalization 3980 Although use of UTF-8 has always been standard practice within the 3981 Jabber community, the community did not define mechanisms for 3982 specifying the language of human-readable text provided in CDATA 3983 sections. XMPP specifies the use of the 'xml:lang' attribute in such 3984 contexts, as defined under Stream Attributes (Section 4.2) and 3985 xml:lang (Section 9.1.5) herein. 3987 D.7 Stream Version Attribute 3989 The Jabber community does not include a 'version' attribute in stream 3990 headers. XMPP specifies inclusion of that attribute, with a value of 3991 '1.0', as a way to signal support for the stream features 3992 (authentication, encryption, etc.) defined under Version Support 3993 (Section 4.2.1) herein. 3995 Appendix E. Revision History 3997 Note to RFC Editor: please remove this entire appendix, and the 3998 corresponding entries in the table of contents, prior to publication. 4000 E.1 Changes from draft-ietf-xmpp-core-21 4001 o Clarified "." version numbering and basis for 4002 comparison. 4004 o Clarified relationship between certificate names and JIDs. 4006 o Clarified relationship between SASL usernames and JIDs. 4008 o Changed "TCP socket" to "TCP connection". 4010 o Added informative reference to RFC 1750 with regard to randomness 4011 of stream IDs. 4013 o Changed "Server informs ... to proceed" to "Server informs ... 4014 that it is allowed to proceed". 4016 o Replaced "NOT REQUIRED" with appropriate conformance terminology. 4018 E.2 Changes from draft-ietf-xmpp-core-20 4020 o Completed changes necessary to address IESG feedback. 4022 E.3 Changes from draft-ietf-xmpp-core-19 4024 o Fixed several typographical errors. 4026 o Restricted values of 'type' attribute for IQ stanzas to those 4027 defined in the schema (i.e., changed SHOULD to MUST) to ensure 4028 consistency with text in XMPP IM. 4030 o Added reference to RFC 3548. 4032 o Added the stanza error. 4034 o Replaced RFC 2222 reference with reference to 4035 draft-ietf-sasl-rfc2222bis. 4037 o Further clarified role and usage of user names in SASL mechanisms. 4039 o Added mention of 'code' attribute on error element. 4041 o Clarified several sentences in the dialback narrative. 4043 o Clarified use of stringprep profiles and added reference to RFC 4044 3490. 4046 o Added security consideration regarding lack of SASL channel 4047 binding to TLS per discussion at IETF 58 meeting. 4049 o Adjusted formatting to conform to RFC Editor requirements. 4051 E.4 Changes from draft-ietf-xmpp-core-18 4053 o Added the 'xml:lang' attribute to the root element per 4054 previous consensus and list discussion. 4056 o Changed "jabber-server" and "jabber-client" service names to 4057 "xmpp-server" and "xmpp-client". 4059 o Added the , , and stanza 4060 errors. 4062 o Changed dataype of stream error and of 4063 and stanza errors to xs:string so that these elements 4064 may contain programmatic information. 4066 o Removed and SASL errors. 4068 o Removed references to RFC 952 and RFC 1123 (domain name format is 4069 handled by reference to Nameprep). 4071 o Changed address record resolution text so that it is not specific 4072 to IPv4. 4074 o Clarified text in appendices regarding scope of Nodeprep and 4075 Resourceprep. 4077 o Removed requirement that receiving entity terminate the TCP 4078 connection upon receiving an element from or sending a 4079 element to the initiating entity during SASL 4080 negotiation. 4082 o Removed recommendation that TLS and SASL security layer should not 4083 both be used simultaneously. 4085 o Added subsection to Security Considerations regarding use of 4086 base64 in SASL. 4088 o Specified rules regarding inclusion of username in SASL 4089 negotiation. 4091 o Adjusted content related to SASL authorization identities, since 4092 the previous text did not track SASL. 4094 o Added section on resource binding to compensate for changes to 4095 SASL authorization identity text. 4097 o Specified ABNF for JIDs. 4099 o Checked all references. 4101 o Completed a thorough proofreading and consistency check of the 4102 entire text. 4104 E.5 Changes from draft-ietf-xmpp-core-17 4106 o Specified that UTF-8 is the only allowable encoding. 4108 o Added stream errors for , , 4109 and , as well as a error for 4110 generic XML error conditions. 4112 o Folded Nodeprep and Resourceprep profiles into this document. 4114 o Moved most delivery handling rules from XMPP IM to XMPP Core. 4116 o Moved detailed stanza syntax descriptions from XMPP Core to XMPP 4117 IM. 4119 o Moved stanza schemas from XMPP Core to XMPP IM. 4121 E.6 Changes from draft-ietf-xmpp-core-16 4123 o Added and stream errors. 4125 o Changed the datatype for the and 4126 stream errors from 'xs:string' to 'empty'. 4128 o Further clarified server handling of the basic stanza kinds. 4130 o Further clarified character encoding rules per list discussion. 4132 o Specified meaning of version='1.0' flag in stream headers. 4134 o Added stream closure to SASL failure cases in order to mirror 4135 handling of TLS failures. 4137 o Added section on compliance requirements for server and client 4138 implementations. 4140 o Added non-normative section on differences between Jabber usage 4141 and XMPP specifications. 4143 E.7 Changes from draft-ietf-xmpp-core-15 4145 o Added and stream errors. 4147 o Added SASL error and clarified error. 4149 o Made 'id' required for IQ stanzas. 4151 E.8 Changes from draft-ietf-xmpp-core-14 4153 o Added SRV lookup for client-to-server communications. 4155 o Changed server SRV record to conform to RFC 2782; specifically, 4156 the service identifier was changed from 'jabber' to 4157 'jabber-server'. 4159 E.9 Changes from draft-ietf-xmpp-core-13 4161 o Clarified stream restart after successful TLS and SASL 4162 negotiation. 4164 o Clarified requirement for resolution of DNS hostnames. 4166 o Clarified text regarding namespaces. 4168 o Clarified examples regarding empty element. 4170 o Added several more SASL error conditions. 4172 o Changed stream error to and 4173 added to schema. 4175 o Made small editorial changes and fixed several schema errors. 4177 E.10 Changes from draft-ietf-xmpp-core-12 4179 o Moved server dialback to a separate section; clarified its 4180 security characteristics and its role in the protocol. 4182 o Adjusted error handling syntax and semantics per list discussion. 4184 o Further clarified length of node identifiers and total length of 4185 JIDs. 4187 o Documented message type='normal'. 4189 o Corrected several small errors in the TLS and SASL sections. 4191 o Corrected several errors in the schemas. 4193 E.11 Changes from draft-ietf-xmpp-core-11 4195 o Corrected several small errors in the TLS and SASL sections. 4197 o Made small editorial changes and fixed several schema errors. 4199 E.12 Changes from draft-ietf-xmpp-core-10 4201 o Adjusted TLS content regarding certificate validation process. 4203 o Specified that stanza error extensions for specific applications 4204 are to be properly namespaced children of the relevant descriptive 4205 element. 4207 o Clarified rules for inclusion of the 'id' attribute. 4209 o Specified that the 'xml:lang' attribute SHOULD be included (per 4210 list discussion). 4212 o Made small editorial changes and fixed several schema errors. 4214 E.13 Changes from draft-ietf-xmpp-core-09 4216 o Fixed several dialback error conditions. 4218 o Cleaned up rules regarding TLS and certificate processing based on 4219 off-list feedback. 4221 o Changed and elements to 4222 . 4224 o Added or modified several stream and stanza error conditions. 4226 o Specified only one child allowed for IQ, or two if type="error". 4228 o Fixed several errors in the schemas. 4230 E.14 Changes from draft-ietf-xmpp-core-08 4232 o Incorporated list discussion regarding addressing, SASL, TLS, TCP, 4233 dialback, namespaces, extensibility, and the meaning of 'ignore' 4234 for routers and recipients. 4236 o Specified dialback error conditions. 4238 o Made small editorial changes to address RFC Editor requirements. 4240 E.15 Changes from draft-ietf-xmpp-core-07 4242 o Made several small editorial changes. 4244 E.16 Changes from draft-ietf-xmpp-core-06 4246 o Added text regarding certificate validation in TLS negotiation per 4247 list discussion. 4249 o Clarified nature of XML restrictions per discussion with W3C, and 4250 moved XML Restrictions subsection under "XML Usage within XMPP". 4252 o Further clarified that XML streams are unidirectional. 4254 o Changed stream error and stanza error namespace names to conform 4255 to the format defined in The IETF XML Registry. 4257 o Removed note to RFC Editor regarding provisional namespace names. 4259 E.17 Changes from draft-ietf-xmpp-core-05 4261 o Added as a stream error condition. 4263 o Adjusted security considerations per discussion at IETF 56 and on 4264 list. 4266 E.18 Changes from draft-ietf-xmpp-core-04 4268 o Added server-to-server examples for TLS and SASL. 4270 o Changed error syntax, rules, and examples based on list 4271 discussion. 4273 o Added schemas for the TLS, stream error, and stanza error 4274 namespaces. 4276 o Added note to RFC Editor regarding provisional namespace names. 4278 o Made numerous small editorial changes and clarified text 4279 throughout. 4281 E.19 Changes from draft-ietf-xmpp-core-03 4283 o Clarified rules and procedures for TLS and SASL. 4285 o Amplified stream error code syntax per list discussion. 4287 o Made numerous small editorial changes. 4289 E.20 Changes from draft-ietf-xmpp-core-02 4291 o Added dialback schema. 4293 o Removed all DTDs since schemas provide more complete definitions. 4295 o Added stream error codes. 4297 o Clarified error code "philosophy". 4299 E.21 Changes from draft-ietf-xmpp-core-01 4301 o Updated the addressing restrictions per list discussion and added 4302 references to the new Nodeprep and Resourceprep profiles. 4304 o Corrected error in Use of SASL regarding 'version' attribute. 4306 o Made numerous small editorial changes. 4308 E.22 Changes from draft-ietf-xmpp-core-00 4310 o Added information about TLS from list discussion. 4312 o Clarified meaning of "ignore" based on list discussion. 4314 o Clarified information about Universal Character Set data and 4315 character encodings. 4317 o Provided base64-decoded information for examples. 4319 o Fixed several errors in the schemas. 4321 o Made numerous small editorial fixes. 4323 E.23 Changes from draft-miller-xmpp-core-02 4325 o Brought Use of SASL section into line with discussion on list and 4326 at IETF 55 meeting. 4328 o Added information about the optional 'xml:lang' attribute per 4329 discussion on list and at IETF 55 meeting. 4331 o Specified that validation is neither required nor recommended, and 4332 that the formal definitions (DTDs and schemas) are included for 4333 descriptive purposes only. 4335 o Specified that the response to an IQ stanza of type "get" or "set" 4336 must be an IQ stanza of type "result" or "error". 4338 o Specified that compliant server implementations must process 4339 stanzas in order. 4341 o Specified that for historical reasons some server implementations 4342 may accept 'stream:' as the only valid namespace prefix on the 4343 root stream element. 4345 o Clarified the difference between 'jabber:client' and 4346 'jabber:server' namespaces, namely, that 'to' and 'from' 4347 attributes are required on all stanzas in the latter but not the 4348 former. 4350 o Fixed typo in Step 9 of the dialback protocol (changed db:result 4351 to db:verify). 4353 o Removed references to TLS pending list discussion. 4355 o Removed the non-normative appendix on OpenPGP usage pending its 4356 inclusion in a separate I-D. 4358 o Simplified the architecture diagram, removed most references to 4359 services, and removed references to the 'jabber:component:*' 4360 namespaces. 4362 o Noted that XMPP activity respects firewall administration 4363 policies. 4365 o Further specified the scope and uniqueness of the 'id' attribute 4366 in all stanza kinds and the element in message stanzas. 4368 o Nomenclature changes: (1) from "chunks" to "stanzas"; (2) from 4369 "host" to "server" and from "node" to "client" (except with regard 4370 to definition of the addressing scheme). 4372 Intellectual Property Statement 4374 The IETF takes no position regarding the validity or scope of any 4375 intellectual property or other rights that might be claimed to 4376 pertain to the implementation or use of the technology described in 4377 this document or the extent to which any license under such rights 4378 might or might not be available; neither does it represent that it 4379 has made any effort to identify any such rights. Information on the 4380 IETF's procedures with respect to rights in standards-track and 4381 standards-related documentation can be found in BCP-11. Copies of 4382 claims of rights made available for publication and any assurances of 4383 licenses to be made available, or the result of an attempt made to 4384 obtain a general license or permission for the use of such 4385 proprietary rights by implementors or users of this specification can 4386 be obtained from the IETF Secretariat. 4388 The IETF invites any interested party to bring to its attention any 4389 copyrights, patents or patent applications, or other proprietary 4390 rights which may cover technology that may be required to practice 4391 this standard. Please address the information to the IETF Executive 4392 Director. 4394 Full Copyright Statement 4396 Copyright (C) The Internet Society (2004). All Rights Reserved. 4398 This document and translations of it may be copied and furnished to 4399 others, and derivative works that comment on or otherwise explain it 4400 or assist in its implementation may be prepared, copied, published 4401 and distributed, in whole or in part, without restriction of any 4402 kind, provided that the above copyright notice and this paragraph are 4403 included on all such copies and derivative works. However, this 4404 document itself may not be modified in any way, such as by removing 4405 the copyright notice or references to the Internet Society or other 4406 Internet organizations, except as needed for the purpose of 4407 developing Internet standards in which case the procedures for 4408 copyrights defined in the Internet Standards process must be 4409 followed, or as required to translate it into languages other than 4410 English. 4412 The limited permissions granted above are perpetual and will not be 4413 revoked by the Internet Society or its successors or assignees. 4415 This document and the information contained herein is provided on an 4416 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 4417 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 4418 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 4419 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 4420 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4422 Acknowledgment 4424 Funding for the RFC Editor function is currently provided by the 4425 Internet Society.