idnits 2.17.1 draft-ietf-xmpp-6122bis-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 25, 2013) is 4016 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-23) exists of draft-ietf-precis-framework-07 -- Possible downref: Non-RFC (?) normative reference: ref. 'UNICODE' -- Possible downref: Non-RFC (?) normative reference: ref. 'UTR36' == Outdated reference: A later version (-12) exists of draft-ietf-precis-mappings-01 == Outdated reference: A later version (-19) exists of draft-ietf-precis-nickname-05 -- Obsolete informational reference (is this intentional?): RFC 3454 (Obsoleted by RFC 7564) -- Obsolete informational reference (is this intentional?): RFC 3490 (Obsoleted by RFC 5890, RFC 5891) -- Obsolete informational reference (is this intentional?): RFC 3920 (Obsoleted by RFC 6120) -- Obsolete informational reference (is this intentional?): RFC 3921 (Obsoleted by RFC 6121) -- Obsolete informational reference (is this intentional?): RFC 6122 (Obsoleted by RFC 7622) Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 XMPP P. Saint-Andre 3 Internet-Draft Cisco Systems, Inc. 4 Obsoletes: 6122 (if approved) April 25, 2013 5 Intended status: Standards Track 6 Expires: October 27, 2013 8 Extensible Messaging and Presence Protocol (XMPP): Address Format 9 draft-ietf-xmpp-6122bis-07 11 Abstract 13 This document defines the address format for the Extensible Messaging 14 and Presence Protocol (XMPP), including support for code points 15 outside the ASCII range. This document obsoletes RFC 6122. 17 Status of this Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on October 27, 2013. 34 Copyright Notice 36 Copyright (c) 2013 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2.1. Fundamentals . . . . . . . . . . . . . . . . . . . . . . . 3 56 2.2. Domainpart . . . . . . . . . . . . . . . . . . . . . . . . 5 57 2.3. Localpart . . . . . . . . . . . . . . . . . . . . . . . . 6 58 2.4. Resourcepart . . . . . . . . . . . . . . . . . . . . . . . 8 59 3. Enforcement in JIDs and JID Parts . . . . . . . . . . . . . . 9 60 4. Internationalization Considerations . . . . . . . . . . . . . 11 61 5. Security Considerations . . . . . . . . . . . . . . . . . . . 12 62 5.1. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 12 63 5.2. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . . 12 64 5.3. Address Spoofing . . . . . . . . . . . . . . . . . . . . . 12 65 5.3.1. Address Forging . . . . . . . . . . . . . . . . . . . 12 66 5.3.2. Address Mimicking . . . . . . . . . . . . . . . . . . 13 67 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 68 6.1. Subclasses . . . . . . . . . . . . . . . . . . . . . . . . 14 69 6.2. Usage of IdentifierClass . . . . . . . . . . . . . . . . . 14 70 6.3. Usage of FreeformClass . . . . . . . . . . . . . . . . . . 15 71 7. Conformance Requirements . . . . . . . . . . . . . . . . . . . 15 72 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17 73 8.1. Normative References . . . . . . . . . . . . . . . . . . . 17 74 8.2. Informative References . . . . . . . . . . . . . . . . . . 18 75 Appendix A. Differences from RFC 6122 . . . . . . . . . . . . . . 21 76 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 22 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 79 1. Introduction 81 1.1. Overview 83 The Extensible Messaging and Presence Protocol (XMPP) [RFC6120] is an 84 application profile of the Extensible Markup Language [XML] for 85 streaming XML data in close to real time between any two or more 86 network-aware entities. The address format for XMPP entities was 87 originally developed in the Jabber open-source community in 1999, 88 first described by [XEP-0029] in 2002, and then defined canonically 89 by [RFC3920] in 2004 and [RFC6122] in 2011. 91 As specified in RFC 3920 and RFC 6122, the XMPP address format used 92 the "stringprep" technology for preparation of non-ASCII characters 93 [RFC3454]. Following the migration of internationalized domain names 94 away from stringprep, this document defines the XMPP address format 95 in a way that no longer depends on stringprep. Instead, this 96 document builds upon the internationalization framework defined by 97 the IETF's PRECIS Working Group [I-D.ietf-precis-framework]. 99 This document obsoletes RFC 6122. 101 1.2. Terminology 103 Many important terms used in this document are defined in 104 [I-D.ietf-precis-framework], [RFC5890], [RFC6120], [RFC6365], and 105 [UNICODE]. 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 109 "OPTIONAL" in this document are to be interpreted as described in 110 [RFC2119]. 112 2. Addresses 114 2.1. Fundamentals 116 An XMPP entity is anything that is network-addressable and that can 117 communicate using XMPP. For historical reasons, the native address 118 of an XMPP entity is called a Jabber Identifier ("JID"). A valid JID 119 is a string of [UNICODE] code points, encoded using UTF-8 [RFC3629], 120 and structured as an ordered sequence of localpart, domainpart, and 121 resourcepart (where the first two parts are demarcated by the '@' 122 character used as a separator, and the last two parts are similarly 123 demarcated by the '/' character). 125 The syntax for a JID is defined as follows using the Augmented 126 Backus-Naur Form (ABNF) as specified in [RFC5234]. 128 jid = [ localpart "@" ] domainpart [ "/" resourcepart ] 129 localpart = 1*1023(localpoint) 130 ; 131 ; a "localpoint" is a UTF-8 encoded 132 ; Unicode code point that conforms to 133 ; the "LocalpartIdentifierClass" subclass 134 ; of the PRECIS IdentifierClass 135 ; 136 domainpart = IP-literal / IPv4address / ifqdn 137 ; 138 ; the "IPv4address" and "IP-literal" 139 ; rules are defined in RFC 3986, and 140 ; the first-match-wins (a.k.a. "greedy") 141 ; algorithm described in RFC 3986 142 ; applies to the matching process 143 ; 144 ; note well that reuse of the IP-literal 145 ; rule from RFC 3986 implies that IPv6 146 ; addresses are enclosed in square 147 ; brackets (i.e., beginning with '[' 148 ; and ending with ']') 149 ; 150 ifqdn = 1*1023(domainpoint) 151 ; 152 ; a "domainpoint" is a UTF-8 encoded 153 ; Unicode code point that conforms to 154 ; RFC 5890 155 ; 156 resourcepart = 1*1023(resourcepoint) 157 ; 158 ; a "resourcepoint" is a UTF-8 encoded 159 ; Unicode code point that conforms to 160 ; the "ResourcepartFreeformClass" subclass 161 ; of the PRECIS FreeformClass 162 ; 164 All JIDs are based on the foregoing structure. However, note that 165 the foregoing structure does not capture all of the rules and 166 restrictions that apply to JIDs, which are described below. 168 Each allowable portion of a JID (localpart, domainpart, and 169 resourcepart) MUST NOT be zero octets in length and MUST NOT be more 170 than 1023 octets in length, resulting in a maximum total size 171 (including the '@' and '/' separators) of 3071 octets. 173 Implementation Note: The length limits on JIDs and JID parts are 174 based on octets (bytes), not characters. UTF-8 encoding can 175 result in more than one octet per character. 177 Implementation Note: When dividing a JID into its component parts, 178 an implementation needs to match the separator characters '@' and 179 '/' before applying any transformation algorithms, which might 180 decompose certain Unicode code points to the separator characters 181 (e.g., under Unicode Normalization Form KC U+FE6B SMALL COMMERCIAL 182 AT decomposes to U+0040 COMMERCIAL AT, although this is not true 183 under Unicode Normalization C, which is used in this 184 specification). 186 This document defines the native format for JIDs; see [RFC5122] for 187 information about the representation of a JID as a Uniform Resource 188 Identifier (URI) [RFC3986] or Internationalized Resource Identifier 189 (IRI) [RFC3987] and the extraction of a JID from an XMPP URI or IRI. 191 2.2. Domainpart 193 The domainpart of a JID is that portion after the '@' character (if 194 any) and before the '/' character (if any); it is the primary 195 identifier and is the only REQUIRED element of a JID (a mere 196 domainpart is a valid JID). Typically a domainpart identifies the 197 "home" server to which clients connect for XML routing and data 198 management functionality. However, it is not necessary for an XMPP 199 domainpart to identify an entity that provides core XMPP server 200 functionality (e.g., a domainpart can identify an entity such as a 201 multi-user chat service [XEP-0045], a publish-subscribe service 202 [XEP-0060], or a user directory). 204 The domainpart for every XMPP service MUST be a fully-qualified 205 domain name (FQDN), an IPv4 address, an IPv6 address, or an 206 unqualified hostname (i.e., a text label that is resolvable on a 207 local network). 209 Informational Note: The term "fully-qualified domain name" is not 210 well defined. In [RFC1034] it also called an absolute domain 211 name, and the two terms are associated in [RFC1535]. The earliest 212 use of the term can be found in [RFC1123]. References to those 213 older specifications ought not to be construed as limiting the 214 characters of a fully-qualified domain name to the ASCII range; 215 for example, [RFC5890] mentions that a fully-qualified domain name 216 can contain one or more U-labels. 218 Interoperability Note: Domainparts that are IP addresses might not 219 be accepted by other services for the sake of server-to-server 220 communication, and domainparts that are unqualified hostnames 221 cannot be used on public networks because they are resolvable only 222 on a local network. 224 If the domainpart includes a final character considered to be a label 225 separator (dot) by [RFC1034], this character MUST be stripped from 226 the domainpart before the JID of which it is a part is used for the 227 purpose of routing an XML stanza, comparing against another JID, or 228 constructing an XMPP URI or IRI [RFC5122]. In particular, the 229 character MUST be stripped before any other canonicalization steps 230 are taken. 232 In general, the content of a domainpart is an Internationalized 233 Domain Name ("IDN") as described in the specifications for 234 Internationalized Domain Names in Applications (commonly called 235 "IDNA2008") [RFC5890], and a domainpart is an "IDNA-aware domain name 236 slot". The following rules apply to a domainpart that consists of a 237 fully-qualified domain name: 239 o The domainpart MUST contain only NR-LDH labels and U-labels as 240 defined in [RFC5890] and MUST consist only of Unicode code points 241 that conform to the rules specified in [RFC5892]. 243 o The domainpart MUST NOT include A-labels as defined in [RFC5890]; 244 each A-label MUST be converted to a U-label during preparation of 245 a domainpart, and comparison MUST be performed using U-labels, not 246 A-labels. 248 o After conversion of A-labels to U-labels if necessary, all 249 uppercase and titlecase code points within the domainpart MUST be 250 mapped to their lowercase equivalents. 252 o After (and in addition to) case mapping and width mapping, other 253 mappings MAY be applied to the domainpart, such as those defined 254 in [I-D.ietf-precis-mappings] or [RFC5895]. 256 After any and all normalization, conversion, and mapping of code 257 points, a domainpart MUST NOT be zero octets in length and MUST NOT 258 be more than 1023 octets in length. (Naturally, the length limits of 259 [RFC1034] apply, and nothing in this document is to be interpreted as 260 overriding those more fundamental limits.) 262 2.3. Localpart 264 The localpart of a JID is an optional identifier placed before the 265 domainpart and separated from the latter by the '@' character. 266 Typically a localpart uniquely identifies the entity requesting and 267 using network access provided by a server (i.e., a local account), 268 although it can also represent other kinds of entities (e.g., a chat 269 room associated with a multi-user chat service [XEP-0045]). The 270 entity represented by an XMPP localpart is addressed within the 271 context of a specific domain (i.e., ). 273 A localpart MUST NOT be zero octets in length and MUST NOT be more 274 than 1023 octets in length. This rule is to be enforced after any 275 normalization and mapping of code points. 277 A localpart MUST consist only of Unicode code points that conform to 278 the "LocalpartIdentifierClass" subclass of the "IdentifierClass" base 279 string class defined in [I-D.ietf-precis-framework]. The 280 LocalpartIdentifierClass subclass includes all code points allowed by 281 the IdentifierClass base class, with the exception of the following 282 characters that are explicitly disallowed in XMPP localparts: 284 U+0022 (QUOTATION MARK), i.e., " 285 U+0026 (AMPERSAND), i.e., & 286 U+0027 (APOSTROPHE), i.e., ' 287 U+002F (SOLIDUS), i.e., / 288 U+003A (COLON), i.e., : 289 U+003C (LESS-THAN SIGN), i.e., < 290 U+003E (GREATER-THAN SIGN), i.e., > 291 U+0040 (COMMERCIAL AT), i.e., @ 293 The normalization and mapping rules for the LocalpartIdentifierClass 294 are as follows, where the operations specified MUST be completed in 295 the order shown: 297 1. Fullwidth and halfwidth characters MUST be mapped to their 298 decomposition equivalents. 300 2. Additional mappings MAY be applied, such as those defined in 301 [I-D.ietf-precis-mappings]. 303 3. Uppercase and titlecase characters MUST be mapped to their 304 lowercase equivalents. 306 4. All characters MUST be mapped using Unicode Normalization Form C 307 (NFC). 309 With regard to directionality, applications MUST apply the "Bidi 310 Rule" defined in [RFC5893] (i.e., each of the six conditions of the 311 Bidi Rule must be satisfied). 313 2.4. Resourcepart 315 The resourcepart of a JID is an optional identifier placed after the 316 domainpart and separated from the latter by the '/' character. A 317 resourcepart can modify either a address or a 318 mere address. Typically a resourcepart uniquely 319 identifies a specific connection (e.g., a device or location) or 320 object (e.g., an occupant in a multi-user chat room [XEP-0045]) 321 belonging to the entity associated with an XMPP localpart at a domain 322 (i.e., ). 324 A resourcepart MUST NOT be zero octets in length and MUST NOT be more 325 than 1023 octets in length. This rule is to be enforced after any 326 normalization and mapping of code points. 328 A resourcepart MUST consist only of Unicode code points that conform 329 to the "FreeformClass" base string class defined in 330 [I-D.ietf-precis-framework]. (Note that there is no XMPP-specific 331 subclass for resourceparts.) 333 The normalization and mapping rules for the resourcepart of a JID are 334 as follows, where the operations specified MUST be completed in the 335 order shown: 337 1. Fullwidth and halfwidth characters MAY be mapped to their 338 decomposition equivalents. 340 2. Map any instances of non-ASCII space to ASCII space (U+0020). 342 3. Other additional mappings MAY be applied, such as those defined 343 in [I-D.ietf-precis-mappings]. 345 4. Uppercase and titlecase characters MAY be mapped to their 346 lowercase equivalents. 348 5. All characters MUST be mapped using Unicode Normalization Form C 349 (NFC). 351 6. Leading and trailing whitespace (i.e., one or more instances of 352 the ASCII space character at the beginning or end of a 353 resourcepart) MUST be removed (e.g., "stpeter " is mapped to 354 "stpeter"). 356 With regard to directionality, applications MUST apply the "Bidi 357 Rule" defined in [RFC5893] (i.e., each of the six conditions of the 358 Bidi Rule must be satisfied). 360 XMPP entities SHOULD consider resourceparts to be opaque strings and 361 SHOULD NOT impute meaning to any given resourcepart. In particular: 363 o Use of the '/' character as a separator between the domainpart and 364 the resourcepart does not imply that XMPP addresses are 365 hierarchical in the way that, say, HTTP addresses are 366 hierarchical; thus for example an XMPP address of the form 367 does not identify a resource "bar" 368 that exists below a resource "foo" in a hierarchy of resources 369 associated with the entity "localpart@domainpart". 371 o The '@' character is allowed in the resourcepart and is often used 372 in the "nick" shown in XMPP chatrooms [XEP-0045]. For example, 373 the JID describes an entity who 374 is an occupant of the room with an 375 (asserted) nick of . However, chatroom services do not 376 necessarily check such an asserted nick against the occupant's 377 real JID. 379 In some contexts, it might be appropriate to apply more restrictive 380 rules to the preparation and comparison of XMPP resourceparts. For 381 example, in the context of XMPP Multi-User Chat [XEP-0045], it might 382 be appropriate to apply the rules specified in 383 [I-D.ietf-precis-nickname]. However, the application of such more 384 restrictive rules is out of scope for resourceparts in general and is 385 properly defined in specifications for the relevant XMPP extensions. 387 3. Enforcement in JIDs and JID Parts 389 Enforcement of the XMPP address format rules is the responsibility of 390 XMPP servers. Although XMPP clients SHOULD prepare complete JIDs and 391 parts of JIDs in accordance with the rules before including them in 392 protocol slots within XML streams (such that JIDs and parts of JIDs 393 are in conformance), XMPP servers MUST enforce the rules wherever 394 possible and reject stanzas and other XML elements that violate the 395 rules (for stanzas, by returning a error to the 396 sender as described in Section 8.3.3.8 of [RFC6120]). 398 Enforcement applies to complete JIDs and to parts of JIDs. To 399 facilitate implementation, this document defines the concepts of "JID 400 slot", "localpart slot", and "resourcepart slot" (similar to the 401 concept of a "domain name slot" for IDNA2008 defined in Section 402 2.3.2.6 of [RFC5890]): 404 JID Slot: An XML element or attribute explicitly designated in XMPP 405 or in XMPP extensions for carrying a complete JID. 407 Localpart Slot: An XML element or attribute explicitly designated in 408 XMPP or in XMPP extensions for carrying the localpart of a JID. 410 Resourcepart Slot: An XML element or attribute explicitly designated 411 in XMPP or in XMPP extensions for carrying the resourcepart of a 412 JID. 414 A server is responsible for enforcing the address format rules when 415 receiving protocol elements from clients where the server is expected 416 to handle such elements directly or to use them for purposes of 417 routing a stanza to another domain or delivering a stanza to a local 418 entity; two examples from [RFC6120] are the 'to' attribute on XML 419 stanzas (which is a JID slot used by XMPP servers for routing of 420 outbound stanzas) and the child of the element 421 (which is a resourcepart slot used by XMPP servers for binding of a 422 resource to an account for routing of stanzas between the server and 423 a particular client). 425 A server is not responsible for enforcing the rules when the protocol 426 elements are intended for communication among other entities, 427 typically within the payload of a stanza that the server is merely 428 routing to another domain or delivering to a local entity, such as a 429 connected client or an add-on service. Two examples are the 430 'initiator' attribute in the Jingle extension [XEP-0166] (which is a 431 JID slot used for client-to-client coordination of multimedia 432 sessions) and the 'nick' attribute in the Multi-User Chat extension 433 [XEP-0045] (which is a resourcepart slot used for administrative 434 purposes in the context of XMPP chatrooms). In such cases, clients 435 SHOULD enforce the rules themselves and not depend on the server to 436 do so, and client implementers need to understand that not enforcing 437 the rules can lead to a degraded user experience or to security 438 vulnerabilities. However, when an add-on service (e.g., a multi-user 439 chat service) handles a stanza directly, it ought to enforce the 440 rules as well, as defined by the relevant specification for that type 441 of service. 443 This document does not provide an exhaustive list of JID slots, 444 localpart slots, or resourcepart slots. However, implementers of 445 core XMPP servers are advised to consider as JID slots at least the 446 following elements and attributes when they are handled directly or 447 used for purposes of routing to another domain or delivering to a 448 local entity: 450 o The 'from' and 'to' stream attributes and the 'from' and 'to' 451 stanza attributes [RFC6120]. 452 o The 'jid' attribute of the roster element for contact list 453 management [RFC6121]. 454 o The 'value' attribute of the element for Privacy Lists 455 [RFC3921] [XEP-0016] when the value of the 'type' attribute is 456 "jid". 457 o The 'jid' attribute of the element for Service Discovery 458 defined in [XEP-0030]. 459 o The element for Data Forms [XEP-0004], when the 'type' 460 attribute is "jid-single" or "jid-multi". 461 o The 'jid' attribute of the element for Bookmark 462 Storage [XEP-0048]. 463 o The of the element for vCard 3.0 [XEP-0054] 464 and the child of the element for vCard 4.0 465 [XEP-0292] when the XML character data identifies an XMPP URI 466 [RFC5122]. 467 o The 'from' attribute of the element for Delayed Delivery 468 [XEP-0203]. 469 o The 'jid' attribute of the element for the Blocking 470 Command [XEP-0191]. 471 o The 'from' and 'to' attributes of the and 472 elements for Server Dialback [RFC3921], [XEP-0220]. 473 o The 'from' and 'to' attributes of the element for Advanced 474 Message Processing [XEP-0079]. 475 o The 'from' and 'to' attributes of the , , and 476 elements for the Jabber Component Protocol [XEP-0114]. 478 Developers of XMPP clients and specialized XMPP add-on services are 479 advised to check the appropriate specifications for JID slots, 480 localpart slots, and resourcepart slots in XMPP protocol extensions 481 such as Service Discovery [XEP-0030], Multi-User Chat [XEP-0045], 482 Publish-Subscribe [XEP-0060], SOCKS5 Bytestreams [XEP-0065], In-Band 483 Registration [XEP-0077], Roster Item Exchange [XEP-0144], and Jingle 484 [XEP-0166]. 486 4. Internationalization Considerations 488 XMPP applications MUST support IDNA2008 for domainparts as described 489 under Section 2.2, the "LocalpartIdentifierClass" subclass for 490 localparts as described under Section 2.3, and the "FreeformClass" 491 base string class for resourceparts as described under Section 2.4. 492 This enables XMPP addresses to include a wide variety of characters 493 outside the ASCII range. Rules for enforcement of the XMPP address 494 format are provided in [RFC6120] and specifications for various XMPP 495 extensions. 497 Implementation Note: For backward compatibility, many XMPP 498 applications support IDNA2003 [RFC3490] for domainparts, and the 499 stringprep [RFC3454] profiles Nodeprep and Resourceprep [RFC3920] 500 for localparts and resourceparts. 502 5. Security Considerations 504 5.1. Reuse of PRECIS 506 The security considerations described in [I-D.ietf-precis-framework] 507 apply to the "IdentifierClass" and "FreeformClass" base string 508 classes used in this document for XMPP localparts and resourceparts. 509 The security considerations described in [RFC5890] apply to 510 internationalized domain names, which are used here for XMPP 511 domainparts. 513 5.2. Reuse of Unicode 515 The security considerations described in [UTR39] apply to the use of 516 Unicode characters in XMPP addresses. 518 5.3. Address Spoofing 520 There are two forms of address spoofing: forging and mimicking. 522 5.3.1. Address Forging 524 In the context of XMPP technologies, address forging occurs when an 525 entity is able to generate an XML stanza whose 'from' address does 526 not correspond to the account credentials with which the entity 527 authenticated onto the network (or an authorization identity provided 528 during negotiation of SASL authentication [RFC4422] as described in 529 [RFC6120]). For example, address forging occurs if an entity that 530 authenticated as "juliet@im.example.com" is able to send XML stanzas 531 from "nurse@im.example.com" or "romeo@example.net". 533 Address forging is difficult in XMPP systems, given the requirement 534 for sending servers to stamp 'from' addresses and for receiving 535 servers to verify sending domains via server-to-server authentication 536 (see [RFC6120]). However, address forging is possible if: 538 o A poorly implemented server ignores the requirement for stamping 539 the 'from' address. This would enable any entity that 540 authenticated with the server to send stanzas from any 541 localpart@domainpart as long as the domainpart matches the sending 542 domain of the server. 544 o An actively malicious server generates stanzas on behalf of any 545 registered account at the domain or domains hosted at that server. 547 Therefore, an entity outside the security perimeter of a particular 548 server cannot reliably distinguish between JIDs of the form 549 at that server and thus can authenticate only 550 the domainpart of such JIDs with any level of assurance. This 551 specification does not define methods for discovering or 552 counteracting the kind of poorly implemented or rogue servers just 553 described. However, the end-to-end authentication or signing of XMPP 554 stanzas could help to mitigate this risk, since it would require the 555 rogue server to generate false credentials for signing or encryption 556 of each stanza, in addition to modifying 'from' addresses. 558 5.3.2. Address Mimicking 560 Address mimicking occurs when an entity provides legitimate 561 authentication credentials for and sends XML stanzas from an account 562 whose JID appears to a human user to be the same as another JID. 563 Because many characters are visually similar, it is relatively easy 564 to mimic JIDs in XMPP systems. As one simple example, the localpart 565 "ju1iet" (using the Arabic numeral one as the third character) might 566 appear the same as the localpart "juliet" (using lowercase "L" as the 567 third character). 569 As explained in [RFC5890], [I-D.ietf-precis-framework], [UTR36], and 570 [UTR39], there is no straightforward solution to the problem of 571 visually similar characters. Furthermore, IDNA and PRECIS 572 technologies do not attempt to define such a solution. As a result, 573 XMPP domainparts, localparts, and resourceparts could contain such 574 characters, leading to security vulnerabilities such as the 575 following: 577 o A domainpart is always employed as one part of an entity's address 578 in XMPP. One common usage is as the address of a server or 579 server-side service, such as a multi-user chat service [XEP-0045]. 580 The security of such services could be compromised based on 581 different interpretations of the internationalized domainpart; for 582 example, a user might authorize a malicious entity at a fake 583 server to view the user's presence information, or a user could 584 join chatrooms at a fake multi-user chat service. 586 o A localpart can be employed as one part of an entity's address in 587 XMPP. One common usage is as the username of an instant messaging 588 user; another is as the name of a multi-user chat room; and many 589 other kinds of entities could use localparts as part of their 590 addresses. The security of such services could be compromised 591 based on different interpretations of the internationalized 592 localpart; for example, a user entering a single internationalized 593 localpart could access another user's account information, or a 594 user could gain access to a hidden or otherwise restricted chat 595 room or service. 597 o A resourcepart can be employed as one part of an entity's address 598 in XMPP. One common usage is as the name for an instant messaging 599 user's connected resource; another is as the nickname of a user in 600 a multi-user chat room; and many other kinds of entities could use 601 resourceparts as part of their addresses. The security of such 602 services could be compromised based on different interpretations 603 of the internationalized resourcepart; for example, two or more 604 confusable resources could be bound at the same time to the same 605 account (resulting in inconsistent authorization decisions in an 606 XMPP application that uses full JIDs), or a user could send a 607 private message to someone other than the intended recipient in a 608 multi-user chat room. 610 XMPP services and clients are strongly encouraged to define and 611 implement consistent policies regarding the registration, storage, 612 and presentation of visually similar characters in XMPP systems. In 613 particular, service providers and software implementers are strongly 614 encouraged to use the policies recommended in 615 [I-D.ietf-precis-framework]. 617 6. IANA Considerations 619 6.1. Subclasses 621 The IANA shall add the following entry to the PRECIS Subclass 622 Registry: 624 Subclass: LocalpartIdentifierClass. 625 Base Class: IdentifierClass. 626 Exclusions: Eight legacy characters in the ASCII range. 627 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 628 the number issued for this specification.] 630 6.2. Usage of IdentifierClass 632 The IANA shall add the following entry to the PRECIS Usage Registry: 634 Applicability: Localparts of XMPP addresses. 636 Base Class: IdentifierClass. 637 Subclass: Yes, LocalpartIdentifierClass. 638 Width Mapping: Map fullwidth and halfwidth characters to their 639 decomposition equivalents. 640 Additional Mappings: None required or recommended. 641 Case Mapping: Map uppercase and titlecase characters to lowercase. 642 Normalization: NFC. 643 Directionality: The "Bidi Rule" defined in RFC 5893 applies. 644 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 645 the number issued for this specification.] 647 6.3. Usage of FreeformClass 649 The IANA shall add the following entry to the PRECIS Usage Registry: 651 Applicability: Resourceparts of XMPP addresses. 652 Base Class: FreeformClass 653 Subclass: No. 654 Replaces: The Resourceprep profile of Stringprep. 655 Width Mapping: Optional. 656 Additional Mappings: Map non-ASCII space to ASCII space. 657 Case Mapping: Optional. 658 Normalization: NFC. 659 Directionality: The "Bidi Rule" defined in RFC 5893 applies. 660 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 661 the number issued for this specification.] 663 7. Conformance Requirements 665 This section describes a protocol feature set that summarizes the 666 conformance requirements of this specification. This feature set is 667 appropriate for use in software certification, interoperability 668 testing, and implementation reports. For each feature, this section 669 provides the following information: 671 o A human-readable name 672 o An informational description 673 o A reference to the particular section of this document that 674 normatively defines the feature 675 o Whether the feature applies to the Client role, the Server role, 676 or both (where "N/A" signifies that the feature is not applicable 677 to the specified role) 678 o Whether the feature MUST or SHOULD be implemented, where the 679 capitalized terms are to be understood as described in [RFC2119] 681 The feature set specified here provides a basis for interoperability 682 testing and follows the spirit of a proposal made by Larry Masinter 683 within the IETF's NEWTRK Working Group in 2005 [INTEROP]. 685 Feature: address-domain-length 686 Description: Ensure that the domainpart of an XMPP address is at 687 least one octet in length and at most 1023 octets in length, and 688 that it conforms to the underlying length limits of the DNS. 689 Section: Section 2.2 690 Roles: Server MUST, client SHOULD. 692 Feature: address-domain-prep 693 Description: Ensure that the domainpart of an XMPP address conforms 694 to IDNA2008, that it contains only NR-LDH labels and U-labels (not 695 A-labels), and that all uppercase and titlecase code points are 696 mapped to their lowercase equivalents. 697 Section: Section 2.2 698 Roles: Server MUST, client SHOULD. 700 Feature: address-localpart-length 701 Description: Ensure that the localpart of an XMPP address is at 702 least one octet in length and at most 1023 octets in length. 703 Section: Section 2.3 704 Roles: Server MUST, client SHOULD. 706 Feature: address-localpart-prep 707 Description: Ensure that the localpart of an XMPP address conforms 708 to the "LocalpartIdentifierClass" subclass, that all code points 709 are normalized using NFC, and that all uppercase and titlecase 710 code points are mapped to their lowercase equivalents. 711 Section: Section 2.3 712 Roles: Server MUST, client SHOULD. 714 Feature: address-resource-length 715 Description: Ensure that the resourcepart of an XMPP address is at 716 least one octet in length and at most 1023 octets in length. 717 Section: Section 2.4 718 Roles: Server MUST, client SHOULD. 720 Feature: address-resource-prep 721 Description: Ensure that the resourcepart of an XMPP address 722 conforms to the "FreeformClass" base string class from the PRECIS 723 framework, with all code points normalized using NFC. 724 Section: Section 2.4 725 Roles: Server MUST, client SHOULD. 727 8. References 728 8.1. Normative References 730 [I-D.ietf-precis-framework] 731 Saint-Andre, P. and M. Blanchet, "Precis Framework: 732 Handling Internationalized Strings in Protocols", 733 draft-ietf-precis-framework-07 (work in progress), 734 March 2013. 736 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 737 STD 13, RFC 1034, November 1987. 739 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 740 Requirement Levels", BCP 14, RFC 2119, March 1997. 742 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 743 10646", STD 63, RFC 3629, November 2003. 745 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 746 Specifications: ABNF", STD 68, RFC 5234, January 2008. 748 [RFC5890] Klensin, J., "Internationalized Domain Names for 749 Applications (IDNA): Definitions and Document Framework", 750 RFC 5890, August 2010. 752 [RFC5891] Klensin, J., "Internationalized Domain Names in 753 Applications (IDNA): Protocol", RFC 5891, August 2010. 755 [RFC5892] Faltstrom, P., "The Unicode Code Points and 756 Internationalized Domain Names for Applications (IDNA)", 757 RFC 5892, August 2010. 759 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 760 Internationalized Domain Names for Applications (IDNA)", 761 RFC 5893, August 2010. 763 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 764 Protocol (XMPP): Core", RFC 6120, March 2011. 766 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 767 3.2.0", 2000. 769 The Unicode Standard, Version 3.2.0 is defined by The 770 Unicode Standard, Version 3.0 (Reading, MA, Addison- 771 Wesley, 2000. ISBN 0-201-61633-5), as amended by the 772 Unicode Standard Annex #27: Unicode 3.1 773 (http://www.unicode.org/reports/tr27/) and by the Unicode 774 Standard Annex #28: Unicode 3.2 775 (http://www.unicode.org/reports/tr28/). 777 [UTR36] The Unicode Consortium, "Unicode Technical Report #36: 778 Unicode Security Considerations", 2008, 779 . 781 8.2. Informative References 783 [I-D.ietf-precis-mappings] 784 YONEYA, Y. and T. NEMOTO, "Mapping characters for PRECIS 785 classes", draft-ietf-precis-mappings-01 (work in 786 progress), December 2012. 788 [I-D.ietf-precis-nickname] 789 Saint-Andre, P., "Preparation and Comparison of 790 Nicknames", draft-ietf-precis-nickname-05 (work in 791 progress), November 2012. 793 [INTEROP] Masinter, L., "Formalizing IETF Interoperability 794 Reporting", Work in Progress, October 2005. 796 [RFC1123] Braden, R., "Requirements for Internet Hosts - Application 797 and Support", STD 3, RFC 1123, October 1989. 799 [RFC1535] Gavron, E., "A Security Problem and Proposed Correction 800 With Widely Deployed DNS Software", RFC 1535, 801 October 1993. 803 [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of 804 Internationalized Strings ("stringprep")", RFC 3454, 805 December 2002. 807 [RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, 808 "Internationalizing Domain Names in Applications (IDNA)", 809 RFC 3490, March 2003. 811 See Section 1 for an explanation of why the normative 812 reference to an obsoleted specification is needed. 814 [RFC3920] Saint-Andre, P., Ed., "Extensible Messaging and Presence 815 Protocol (XMPP): Core", RFC 3920, October 2004. 817 [RFC3921] Saint-Andre, P., Ed., "Extensible Messaging and Presence 818 Protocol (XMPP): Instant Messaging and Presence", 819 RFC 3921, October 2004. 821 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 822 Resource Identifier (URI): Generic Syntax", STD 66, 823 RFC 3986, January 2005. 825 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 826 Identifiers (IRIs)", RFC 3987, January 2005. 828 [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and 829 Security Layer (SASL)", RFC 4422, June 2006. 831 [RFC5122] Saint-Andre, P., "Internationalized Resource Identifiers 832 (IRIs) and Uniform Resource Identifiers (URIs) for the 833 Extensible Messaging and Presence Protocol (XMPP)", 834 RFC 5122, February 2008. 836 [RFC5894] Klensin, J., "Internationalized Domain Names for 837 Applications (IDNA): Background, Explanation, and 838 Rationale", RFC 5894, August 2010. 840 [RFC5895] Resnick, P. and P. Hoffman, "Mapping Characters for 841 Internationalized Domain Names in Applications (IDNA) 842 2008", RFC 5895, September 2010. 844 [RFC6121] Saint-Andre, P., "Extensible Messaging and Presence 845 Protocol (XMPP): Instant Messaging and Presence", 846 RFC 6121, March 2011. 848 [RFC6122] Saint-Andre, P., "Extensible Messaging and Presence 849 Protocol (XMPP): Address Format", RFC 6122, March 2011. 851 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 852 Internationalization in the IETF", BCP 166, RFC 6365, 853 September 2011. 855 [UTR39] The Unicode Consortium, "Unicode Technical Report #39: 856 Unicode Security Mechanisms", August 2010, 857 . 859 [XEP-0004] 860 Eatmon, R., Hildebrand, J., Miller, J., Muldowney, T., and 861 P. Saint-Andre, "Data Forms", XSF XEP 0004, August 2007. 863 [XEP-0016] 864 Millard, P. and P. Saint-Andre, "Privacy Lists", XSF 865 XEP 0016, February 2007. 867 [XEP-0029] 868 Kaes, C., "Definition of Jabber Identifiers (JIDs)", XSF 869 XEP 0029, October 2003. 871 [XEP-0030] 872 Hildebrand, J., Millard, P., Eatmon, R., and P. Saint- 873 Andre, "Service Discovery", XSF XEP 0030, June 2008. 875 [XEP-0045] 876 Saint-Andre, P., "Multi-User Chat", XSF XEP 0045, 877 February 2012. 879 [XEP-0048] 880 Blackman, R., Millard, P., and P. Saint-Andre, 881 "Bookmarks", XSF XEP 0048, November 2007. 883 [XEP-0054] 884 Saint-Andre, P., "vcard-temp", XSF XEP 0054, July 2008. 886 [XEP-0060] 887 Millard, P., Saint-Andre, P., and R. Meijer, "Publish- 888 Subscribe", XSF XEP 0060, July 2010. 890 [XEP-0065] 891 Smith, D., Miller, M., Saint-Andre, P., and J. Karneges, 892 "SOCKS5 Bytestreams", XSF XEP 0065, April 2011. 894 [XEP-0077] 895 Saint-Andre, P., "In-Band Registration", XSF XEP 0077, 896 January 2012. 898 [XEP-0079] 899 Miller, M. and P. Saint-Andre, "Advanced Message 900 Processing", XSF XEP 0079, November 2005. 902 [XEP-0114] 903 Saint-Andre, P., "Jabber Component Protocol", XSF 904 XEP 0114, March 2005. 906 [XEP-0144] 907 Saint-Andre, P., "Roster Item Exchange", XSF XEP 0144, 908 August 2005. 910 [XEP-0165] 911 Saint-Andre, P., "Best Practices to Discourage JID 912 Mimicking", XSF XEP 0165, December 2007. 914 [XEP-0166] 915 Ludwig, S., Beda, J., Saint-Andre, P., McQueen, R., Egan, 916 S., and J. Hildebrand, "Jingle", XSF XEP 0166, 917 December 2009. 919 [XEP-0191] 920 Saint-Andre, P., "Blocking Command", XSF XEP 0191, 921 July 2012. 923 [XEP-0203] 924 Saint-Andre, P., "Delayed Delivery", XSF XEP 0203, 925 September 2009. 927 [XEP-0220] 928 Miller, J., Saint-Andre, P., and P. Hancke, "Server 929 Dialback", XSF XEP 0220, August 2012. 931 [XEP-0292] 932 Saint-Andre, P. and S. Mizzi, "vCard4 Over XMPP", XSF 933 XEP 0292, October 2011. 935 [XML] Maler, E., Yergeau, F., Sperberg-McQueen, C., Paoli, J., 936 and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth 937 Edition)", World Wide Web Consortium Recommendation REC- 938 xml-20081126, November 2008, 939 . 941 Appendix A. Differences from RFC 6122 943 Based on consensus derived from working group discussion, 944 implementation and deployment experience, and formal interoperability 945 testing, the following substantive modifications were made from RFC 946 6122. 948 o Changed domainpart preparation to use IDNA2008 (instead of 949 IDNA2003). 950 o Changed localpart preparation to use the LocalpartIdentifierClass 951 subclass of the PRECIS IdentifierClass (instead of the Nodeprep 952 profile of Stringprep). 953 o Changed resourcepart preparation to use the PRECIS FreeformClass 954 (instead of the Resourceprep profile of Stringprep). 955 o Specified that internationalized labels within domainparts must be 956 U-labels (instead of should be U-labels). 957 o Specified that fullwidth and halfwidth must be mapped to their 958 decomposition equivalents (previously handled through the use of 959 NFKC). 960 o Specified the use of Unicode normalization form C (instead of KC 961 as specified in the Nodeprep and Resourceprep profiles of 962 Stringprep). 963 o Specified that servers must enforce the address formatting rules. 965 Appendix B. Acknowledgements 967 Thanks to Miguel Garcia, Joe Hildebrand, and Florian Zeitz for their 968 feedback. 970 Some text in this document was borrowed or adapted from [RFC5890], 971 [RFC5891], [RFC5894], and [XEP-0165]. 973 Author's Address 975 Peter Saint-Andre 976 Cisco Systems, Inc. 977 1899 Wynkoop Street, Suite 600 978 Denver, CO 80202 979 USA 981 Phone: +1-303-308-3282 982 Email: psaintan@cisco.com