idnits 2.17.1 draft-ietf-precis-problem-statement-09.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 22, 2013) is 4109 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-09) exists of draft-iab-identifier-comparison-07 -- 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 3491 (Obsoleted by RFC 5891) -- Obsolete informational reference (is this intentional?): RFC 3530 (Obsoleted by RFC 7530) -- Obsolete informational reference (is this intentional?): RFC 3920 (Obsoleted by RFC 6120) -- Obsolete informational reference (is this intentional?): RFC 4013 (Obsoleted by RFC 7613) -- Obsolete informational reference (is this intentional?): RFC 5661 (Obsoleted by RFC 8881) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Blanchet 3 Internet-Draft Viagenie 4 Intended status: Informational A. Sullivan 5 Expires: July 26, 2013 Dyn, Inc. 6 January 22, 2013 8 Stringprep Revision and PRECIS Problem Statement 9 draft-ietf-precis-problem-statement-09.txt 11 Abstract 13 If a protocol expects to compare two strings and is prepared only for 14 those strings to be ASCII, then using Unicode codepoints in those 15 strings requires they be prepared somehow. Internationalizing Domain 16 Names in Applications (here called IDNA2003) defined and used 17 Stringprep and Nameprep. Other protocols subsequently defined 18 Stringprep profiles. A new approach different from Stringprep and 19 Nameprep is used for a revision of IDNA2003 (called IDNA2008). Other 20 Stringprep profiles need to be similarly updated or a replacement of 21 Stringprep needs to be designed. This document outlines the issues 22 to be faced by those designing a Stringprep replacement. 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on July 26, 2013. 41 Copyright Notice 43 Copyright (c) 2013 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 2. Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 3. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 5 61 4. Stringprep Profiles Limitations . . . . . . . . . . . . . . . 6 62 5. Major Topics for Consideration . . . . . . . . . . . . . . . . 7 63 5.1. Comparison . . . . . . . . . . . . . . . . . . . . . . . . 7 64 5.1.1. Types of Identifiers . . . . . . . . . . . . . . . . . 7 65 5.1.2. Effect of comparison . . . . . . . . . . . . . . . . . 8 66 5.2. Dealing with characters . . . . . . . . . . . . . . . . . 8 67 5.2.1. Case folding, case sensitivity, and case 68 preservation . . . . . . . . . . . . . . . . . . . . . 8 69 5.2.2. Stringprep and NFKC . . . . . . . . . . . . . . . . . 8 70 5.2.3. Character mapping . . . . . . . . . . . . . . . . . . 9 71 5.2.4. Prohibited characters . . . . . . . . . . . . . . . . 9 72 5.2.5. Internal structure, delimiters, and special 73 characters . . . . . . . . . . . . . . . . . . . . . . 9 74 5.2.6. Restrictions because of glyph similarity . . . . . . . 10 75 5.3. Where the data comes from and where it goes . . . . . . . 10 76 5.3.1. User input and the source of protocol elements . . . . 10 77 5.3.2. User output . . . . . . . . . . . . . . . . . . . . . 11 78 5.3.3. Operations . . . . . . . . . . . . . . . . . . . . . . 11 79 6. Considerations for Stringprep replacement . . . . . . . . . . 12 80 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 81 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 82 9. Discussion home for this draft . . . . . . . . . . . . . . . . 13 83 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 13 84 11. Informative References . . . . . . . . . . . . . . . . . . . . 14 85 Appendix A. Classification of Stringprep Profiles . . . . . . . . 18 86 Appendix B. Evaluation of Stringprep Profiles . . . . . . . . . . 18 87 B.1. iSCSI Stringprep Profile: RFC3722 (and RFC3721, 88 RFC3720) . . . . . . . . . . . . . . . . . . . . . . . . . 18 89 B.2. SMTP/POP3/ManageSieve Stringprep Profiles: 90 RFC4954,RFC5034,RFC 5804 . . . . . . . . . . . . . . . . . 20 91 B.3. IMAP Stringprep Profiles: RFC5738, RFC4314: Usernames . . 22 92 B.4. IMAP Stringprep Profiles: RFC5738: Passwords . . . . . . . 23 93 B.5. Anonymous SASL Stringprep Profiles: RFC4505 . . . . . . . 24 94 B.6. XMPP Stringprep Profiles: RFC3920 Nodeprep . . . . . . . . 26 95 B.7. XMPP Stringprep Profiles: RFC3920 Resourceprep . . . . . . 27 96 B.8. EAP Stringprep Profiles: RFC3748 . . . . . . . . . . . . . 28 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28 99 1. Introduction 101 Internationalizing Domain Names in Applications (here called 102 IDNA2003) [RFC3490], [RFC3491], [RFC3492], [RFC3454] describes a 103 mechanism for encoding Unicode labels making up Internationalized 104 Domain Names (IDNs) as standard DNS labels. The labels were 105 processed using a method called Nameprep [RFC3491] and Punycode 106 [RFC3492]. That method was specific to IDNA2003, but is generalized 107 as Stringprep [RFC3454]. The general mechanism is used by other 108 protocols with similar needs, but with different constraints than 109 IDNA2003. 111 Stringprep defines a framework within which protocols define their 112 Stringprep profiles. Some known IETF specifications using Stringprep 113 are listed below: 114 o The Nameprep profile [RFC3490] for use in Internationalized Domain 115 Names (IDNs); 116 o IAX using Nameprep [RFC5456]; 117 o NFSv4 [RFC3530] and NFSv4.1 [RFC5661]; 118 o The iSCSI profile [RFC3722] for use in Internet Small Computer 119 Systems Interface (iSCSI) Names; 120 o EAP [RFC3748]; 121 o The Nodeprep and Resourceprep profiles [RFC3920] for use in the 122 Extensible Messaging and Presence Protocol (XMPP), and the XMPP to 123 CPIM mapping [RFC3922] (the latter of these relies on the former); 124 o IRI and URI in XMPP [RFC5122]; 125 o The Policy MIB profile [RFC4011] for use in the Simple Network 126 Management Protocol (SNMP); 127 o TLS [RFC4279]; 128 o The LDAP profile [RFC4518] for use with LDAP [RFC4511] and its 129 authentication methods [RFC4513]; 130 o PKIX subject identification using LDAPprep [RFC4683]; 131 o PKIX CRL using LDAPprep [RFC5280]; 132 o The SASLprep profile [RFC4013] for use in the Simple 133 Authentication and Security Layer (SASL), and SASL itself 134 [RFC4422]; 135 o Plain SASL using SASLprep [RFC4616]; 136 o SMTP Auth using SASLprep [RFC4954]; 137 o POP3 Auth using SASLprep [RFC5034]; 138 o TLS SRP using SASLprep [RFC5054]; 139 o SASL SCRAM using SASLprep [RFC5802]; 140 o Remote management of Sieve using SASLprep [RFC5804]; 141 o NNTP using SASLprep [RFC4643]; 142 o IMAP4 using SASLprep [RFC4314]; 143 o The trace profile [RFC4505] for use with the SASL ANONYMOUS 144 mechanism; 146 o Internet Application Protocol Collation Registry [RFC4790]; 147 o The unicode-casemap Unicode Collation [RFC5051]. 149 However, a review (see [ietf78precis]) of these protocol 150 specifications found that they are very similar and can be grouped 151 into a short number of classes. Moreover, many reuse the same 152 Stringprep profile, such as the SASL one. 154 IDNA2003 was replaced because of some limitations described in 155 [RFC4690]. The new IDN specification, called IDNA2008 [RFC5890], 156 [RFC5891], [RFC5892], [RFC5893] was designed based on the 157 considerations found in [RFC5894]. One of the effects of IDNA2008 is 158 that Nameprep and Stringprep are not used at all. Instead, an 159 algorithm based on Unicode properties of codepoints is defined. That 160 algorithm generates a stable and complete table of the supported 161 Unicode codepoints for each Unicode version. This algorithm uses an 162 inclusion-based approach, instead of the exclusion-based approach of 163 Stringprep/Nameprep. That is, IDNA2003 created an explicit list of 164 excluded or mapped-away characters; anything in Unicode 3.2 that was 165 not so listed could be assumed to be allowed under the protocol. 166 IDNA2008 begins instead from the assumption that code points are 167 disallowed, and then relies on Unicode properties to derive whether a 168 given code point actually is allowed in the protocol. 170 This document lists the shortcomings and issues found by protocols 171 listed above that defined Stringprep profiles. It also lists the 172 requirements for any potential replacement of Stringprep. 174 2. Keywords 176 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 177 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 178 document are to be interpreted as described in [RFC2119]. 180 This document uses various internationalization terms, which are 181 defined and discussed in [RFC6365]. 183 Additionally, this document defines the following keyword: 184 o PRECIS: Preparation and Comparison of Internationalized Strings 186 3. Conventions 188 A single Unicode code point in this memo is denoted by "U+" followed 189 by four to six hexadecimal digits, as used in [Unicode61], Appendix 190 A. 192 4. Stringprep Profiles Limitations 194 During IETF 77 (March 2010), a BOF discussed the current state of the 195 protocols that have defined Stringprep profiles [NEWPREP]. The main 196 conclusions from that discussion were as follows: 197 o Stringprep is bound to version 3.2 of Unicode. Stringprep has not 198 been updated to new versions of Unicode. Therefore, the protocols 199 using Stringprep are stuck at Unicode 3.2, and their 200 specifications need to be updated to support new versions of 201 Unicode. 202 o The protocols would like to not be bound to a specific version of 203 Unicode, but rather have better Unicode version agility in the way 204 of IDNA2008. This is important partly because it is usually 205 impossible for an application to require Unicode 3.2; the 206 application gets whatever version of Unicode is available on the 207 host. 208 o The protocols require better bidirectional support (bidi) than 209 currently offered by Stringprep. 210 o If the protocols are updated to use a new version of Stringprep or 211 another framework, then backward compatibility is an important 212 requirement. For example, Stringprep normalization is based on 213 and profiles may use Unicode Normalization Form KC (NFKC) [UAX15], 214 while IDNA2008 mostly uses Unicode Normalization Form C (NFC) 215 [UAX15]. 216 o Identifiers are passed between protocols. For example, the same 217 username string of codepoints may be passed between SASL, XMPP, 218 LDAP and EAP. Therefore, common set of rules or classes of 219 strings are preferred over specific rules for each protocol. 220 Without real planning in advance, many Stringprep profiles reuse 221 other profiles, so this goal was accomplished by accident with 222 Stringprep. 224 Protocols that use Stringprep profiles use strings for different 225 purposes: 226 o XMPP uses a different Stringprep profile for each part of the XMPP 227 address (JID): a localpart which is similar to a username and used 228 for authentication, a domainpart which is a domain name, and a 229 resource part which is less restrictive than the localpart. 230 o iSCSI uses a Stringprep profile for the names of protocol 231 participants (called initiators and targets). The IQN format of 232 iSCSI names contains a reversed DNS domain name. 233 o SASL and LDAP uses a Stringprep profile for usernames. 234 o LDAP uses a set of Stringprep profiles. 236 The apparent judgement of the BOF attendees [NEWPREP] was that it 237 would be highly desirable to have a replacement of Stringprep, with 238 similar characteristics to IDNA2008. That replacement should be 239 defined so that the protocols could use internationalized strings 240 without a lot of specialized internationalization work, since 241 internationalization expertise is not available in the respective 242 protocols or working groups. Accordingly, the IESG formed the PRECIS 243 working group to undertake the task. 245 Notwithstanding the desire evident in [NEWPREP] and the chartering of 246 a working group, IDNA2008 may be a poor model for what other 247 protocols ought to do, because it is designed to support an old 248 protocol that is designed to operate on the scale of the entire 249 Internet. Moreover, IDNA2008 is intended to be deployed without any 250 change to the base DNS protocol. Other protocols may aim at 251 deployment in more local environments, or may have protocol version 252 negotiation built in. 254 5. Major Topics for Consideration 256 This section provides an overview of major topics that a Stringprep 257 replacement needs to address. The headings correspond roughly with 258 categories under which known Stringprep-using protocol RFCs have been 259 evaluated. For the details of those evaluations, see Appendix A. 261 5.1. Comparison 263 5.1.1. Types of Identifiers 265 Following [I-D.iab-identifier-comparison], it is possible to organize 266 identifiers into three classes in respect of how they may be compared 267 with one another: 269 Absolute Identifiers Identifiers that can be compared byte-by-byte 270 for equality. 271 Definite Identifiers Identifiers that have a well-defined comparison 272 algorithm on which all parties agree. 273 Indefinite Identifiers Identifiers that have no single comparison 274 algorithm on which all parties agree. 276 Definite Identifiers include cases like the comparison of Unicode 277 code points in different encodings: they do not match byte for byte, 278 but can all be converted to a single encoding which then does match 279 byte for byte. Indefinite Identifiers are sometimes algorithmically 280 comparable by well-specified subsets of parties. For more discussion 281 of these categories, see [I-D.iab-identifier-comparison]. 283 The section on treating the existing known cases, Appendix A uses the 284 categories above. 286 5.1.2. Effect of comparison 288 The three classes of comparison style outlined in Section 5.1.1 may 289 have different effects when applied. It is necessary to evaluate the 290 effects if a comparison results in a false positive, and what the 291 effects are if a comparison results in a false negative, especially 292 in terms of the consequences to security and usability. 294 5.2. Dealing with characters 296 This section outlines a range of issues having to do with characters 297 in the target protocols, and outlines the ways in which IDNA2008 298 might be a good analogy to other protocols, and ways in which it 299 might be a poor one. 301 5.2.1. Case folding, case sensitivity, and case preservation 303 In IDNA2003, labels are always mapped to lower case before the 304 Punycode transformation. In IDNA2008, there is no mapping at all: 305 input is either a valid U-label or it is not. At the same time, 306 upper-case characters are by definition not valid U-labels, because 307 they fall into the Unstable category (category B) of [RFC5892]. 309 If there are protocols that require upper and lower cases be 310 preserved, then the analogy with IDNA2008 will break down. 311 Accordingly, existing protocols are to be evaluated according to the 312 following criteria: 314 1. Does the protocol use case folding? For all blocks of code 315 points, or just for certain subsets? 316 2. Is the system or protocol case sensitive? 317 3. Does the system or protocol preserve case? 319 5.2.2. Stringprep and NFKC 321 Stringprep profiles may use normalization. If they do, they use NFKC 322 [UAX15] (most profiles do). It is not clear that NFKC is the right 323 normalization to use in all cases. In [UAX15], there is the 324 following observation regarding Normalization Forms KC and KD: "It is 325 best to think of these Normalization Forms as being like uppercase or 326 lowercase mappings: useful in certain contexts for identifying core 327 meanings, but also performing modifications to the text that may not 328 always be appropriate." In general, it can be said that NFKC is more 329 aggressive about finding matches between codepoints than NFC. For 330 things like the spelling of users' names, then, NFKC may not be the 331 best form to use. At the same time, one of the nice things about 332 NFKC is that it deals with the width of characters that are otherwise 333 similar, by canonicalizing half-width to full-width. This mapping 334 step can be crucial in practice. A replacement for Stringprep 335 depends on analyzing the different use profiles and considering 336 whether NFKC or NFC is a better normalization for each profile. 338 For the purposes of evaluating an existing example of Stringprep use, 339 it is helpful to know whether it uses no normalization, NFKC, or NFC. 341 5.2.3. Character mapping 343 Along with the case mapping issues raised in Section 5.2.1, there is 344 the question of whether some characters are mapped either to other 345 characters or to nothing during Stringprep. [RFC3454], Section 3, 346 outlines a number of characters that are mapped to nothing, and also 347 permits Stringprep profiles to define their own mappings. 349 5.2.4. Prohibited characters 351 Along with case folding and other character mappings, many protocols 352 have characters that are simply disallowed. For example, control 353 characters and special characters such as "@" or "/" may be 354 prohibited in a protocol. 356 One of the primary changes of IDNA2008 is in the way it approaches 357 Unicode code points, using the new inclusion-based approach (see 358 Section 1). 360 Because of the default assumption in IDNA2008 that a code point is 361 not allowed by the protocol, it has more than one class of "allowed 362 by the protocol"; this is unlike IDNA2003. While some code points 363 are disallowed outright, some are allowed only in certain contexts. 364 The reasons for the context-dependent rules have to do with the way 365 some characters are used. For instance, the ZERO WIDTH JOINER and 366 ZERO WIDTH NON-JOINER (ZWJ, U+200D and ZWNJ, U+200C) are allowed with 367 contextual rules because they are required in some circumstances, yet 368 are considered punctuation by Unicode and would therefore be 369 DISALLOWED under the usual IDNA2008 derivation rules. The goal of 370 IDNA2008 is to provide the widest repertoire of code points possible 371 and consistent with the traditional DNS "LDH" (letters, digits, 372 hyphen; see [RFC0952]) rule, trusting to the operators of individual 373 zones to make sensible (and usually more restrictive) policies for 374 their zones. 376 5.2.5. Internal structure, delimiters, and special characters 378 IDNA2008 has a special problem with delimiters, because the delimiter 379 "character" in the DNS wire format is not really part of the data. 380 In DNS, labels are not separated exactly; instead, a label carries 381 with it an indicator that says how long the label is. When the label 382 is presented in presentation format as part of a fully qualified 383 domain name, the label separator FULL STOP, U+002E (.) is used to 384 break up the labels. But because that label separator does not 385 travel with the wire format of the domain name, there is no way to 386 encode a different, "internationalized" separator in IDNA2008. 388 Other protocols may include characters with similar special meaning 389 within the protocol. Common characters for these purposes include 390 FULL STOP, U+002E (.); COMMERCIAL AT, U+0040 (@); HYPHEN-MINUS, 391 U+002D (-); SOLIDUS, U+002F (/); and LOW LINE, U+005F (_). The mere 392 inclusion of such a character in the protocol is not enough for it to 393 be considered similar to another protocol using the same character; 394 instead, handling of the character must be taken into consideration 395 as well. 397 An important issue to tackle here is whether it is valuable to map to 398 or from these special characters as part of the Stringprep 399 replacement. In some locales, the analogue to FULL STOP, U+002E is 400 some other character, and users may expect to be able to substitute 401 their normal stop for FULL STOP, U+002E. At the same time, there are 402 predictability arguments in favour of treating identifiers with FULL 403 STOP, U+002E in them just the way they are treated under IDNA2008. 405 5.2.6. Restrictions because of glyph similarity 407 Homoglyphs are similarly (or identically) rendered glyphs of 408 different codepoints. For DNS names, homoglyphs may enable phishing. 409 If a protocol requires some visual comparison by end-users, then the 410 issue of homoglyphs is to be considered. In the DNS context, theses 411 issues are documented in [RFC5894] and [RFC4690]. IDNA2008 does not, 412 however, have a mechanism to deal with them, trusting to DNS zone 413 operators to enact sensible policies for the subset of Unicode they 414 wish to support, given their user community. A similar policy/ 415 protocol split may not be desirable in every protocol. 417 5.3. Where the data comes from and where it goes 419 5.3.1. User input and the source of protocol elements 421 Some protocol elements are provided by users, and others are not. 422 Those that are not may presumably be subject to greater restrictions, 423 whereas those that users provide likely need to permit the broadest 424 range of code points. The following questions are helpful: 426 1. Do users input the strings directly? 427 2. If so, how? (keyboard, stylus, voice, copy-paste, etc.) 428 3. Where do we place the dividing line between user interface and 429 protocol? (see [RFC5895]) 431 5.3.2. User output 433 Just as only some protocol elements are expected to be entered 434 directly by users, only some protocol elements are intended to be 435 consumed directly by users. It is important to know how users are 436 expected to be able to consume the protocol elements, because 437 different environments present different challenges. An element that 438 is only ever delivered as part of a vCard remains in machine-readable 439 format, so the problem of visual confusion is not a great one. Is 440 the protocol element published as part of a vCard, a web directory, 441 on a business card, or on "the side of a bus"? Do users use the 442 protocol element as an identifier (which means that they might enter 443 it again in some other context)? (See also Section 5.2.6.) 445 5.3.3. Operations 447 Some strings are useful as part of the protocol but are not used as 448 input to other operations (for instance, purely informative or 449 descriptive text). Other strings are used directly as input to other 450 operations (such as cryptographic hash functions), or are used 451 together with other strings to (such as concatenating a string with 452 some others to form a unique identifier). 454 5.3.3.1. String classes 456 Strings often have a similar function in different protocols. For 457 instance, many different protocols contain user identifiers or 458 passwords. A single profile for all such uses might be desirable. 460 Often, a string in a protocol is effectively a protocol element from 461 another protocol. For instance, different systems might use the same 462 credentials database for authentication. 464 5.3.3.2. Community Considerations 466 A Stringprep replacement that does anything more than just update 467 Stringprep to the latest version of Unicode will probably entail some 468 changes. It is important to identify the willingness of the 469 protocol-using community to accept backwards-incompatible changes. 470 By the same token, it is important to evaluate the desire of the 471 community for features not available under Stringprep. 473 5.3.3.3. Unicode Incompatible Changes 475 IDNA2008 uses an algorithm to derive the validity of a Unicode code 476 point for use under IDNA2008. It does this by using the properties 477 of each code point to test its validity. 479 This approach depends crucially on the idea that code points, once 480 valid for a protocol profile, will not later be made invalid. That 481 is not a guarantee currently provided by Unicode. Properties of code 482 points may change between versions of Unicode. Rarely, such a change 483 could cause a given code point to become invalid under a protocol 484 profile, even though the code point would be valid with an earlier 485 version of Unicode. This is not merely a theoretical possibility, 486 because it has occurred ([RFC6452]). 488 Accordingly, as in IDNA2008, a Stringprep replacement that intends to 489 be Unicode version agnostic will need to work out a mechanism to 490 address cases where incompatible changes occur because of new Unicode 491 versions. 493 6. Considerations for Stringprep replacement 495 The above suggests the following guidance: 496 o A Stringprep replacement should be defined. 497 o The replacement should take an approach similar to IDNA2008, (e.g. 498 by using codepoint properties instead of codepoint whitelisting) 499 in that it enables better Unicode agility. 500 o Protocols share similar characteristics of strings. Therefore, 501 defining internationalization preparation algorithms for the 502 smallest set of string classes may be sufficient for most cases, 503 providing coherence among a set of related protocols or protocols 504 where identifiers are exchanged. 505 o The sets of string classes need to be evaluated according to the 506 considerations that make up the headings in Section 5 507 o It is reasonable to limit scope to Unicode code points, and rule 508 the mapping of data from other character encodings outside the 509 scope of this effort. 510 o The replacement ought at least to provide guidance to applications 511 using the replacement on how to handle protocol incompatibilities 512 resulting from changes to Unicode. In an ideal world, the 513 Stringprep replacement would handle the changes automatically, but 514 it appears that such automatic handling would require magic and 515 cannot be expected. 516 o Compatibility within each protocol between a technique that is 517 Stringprep-based and the technique's replacement has to be 518 considered very carefully. 520 Existing deployments already depend on Stringprep profiles. 521 Therefore, a replacement must consider the effects of any new 522 strategy on existing deployments. By way of comparison, it is worth 523 noting that some characters were acceptable in IDNA labels under 524 IDNA2003, but are not protocol-valid under IDNA2008 (and conversely); 525 disagreement about what to do during the transition has resulted in 526 different approaches to mapping. Different implementers may make 527 different decisions about what to do in such cases; this could have 528 interoperability effects. It is necessary to trade better support 529 for different linguistic environments against the potential side 530 effects of backward incompatibility. 532 7. Security Considerations 534 This document merely states what problems are to be solved, and does 535 not define a protocol. There are undoubtedly security implications 536 of the particular results that will come from the work to be 537 completed. Moreover, the Stringprep Security Considerations 538 [RFC3454] Section applies. See also the analysis in the subsections 539 of Appendix B, below. 541 8. IANA Considerations 543 This document has no actions for IANA. 545 9. Discussion home for this draft 547 Note: RFC-Editor, please remove this section before publication. 549 This document is intended to define the problem space discussed on 550 the precis@ietf.org mailing list. 552 10. Acknowledgements 554 This document is the product of the PRECIS IETF Working Group, and 555 participants in that Working Group were helpful in addressing issues 556 with the text. 558 Specific contributions came from David Black, Alan DeKok, Simon 559 Josefsson, Bill McQuillan, Alexey Melnikov, Peter Saint-Andre, Dave 560 Thaler, and Yoshiro Yoneya. 562 Dave Thaler provided the "buckets" insight in Section 5.1.1, central 563 to the organization of the problem. 565 Evaluations of Stringprep profiles that are included in Appendix B 566 were done by: David Black, Alexey Melnikov, Peter Saint-Andre, Dave 567 Thaler. 569 11. Informative References 571 [I-D.iab-identifier-comparison] 572 Thaler, D., "Issues in Identifier Comparison for Security 573 Purposes", draft-iab-identifier-comparison-07 (work in 574 progress), August 2012. 576 [NEWPREP] "Newprep BoF Meeting Minutes", March 2010. 578 [RFC0952] Harrenstien, K., Stahl, M., and E. Feinler, "DoD Internet 579 host table specification", RFC 952, October 1985. 581 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 582 Requirement Levels", BCP 14, RFC 2119, March 1997. 584 [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of 585 Internationalized Strings ("stringprep")", RFC 3454, 586 December 2002. 588 [RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, 589 "Internationalizing Domain Names in Applications (IDNA)", 590 RFC 3490, March 2003. 592 [RFC3491] Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep 593 Profile for Internationalized Domain Names (IDN)", 594 RFC 3491, March 2003. 596 [RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode 597 for Internationalized Domain Names in Applications 598 (IDNA)", RFC 3492, March 2003. 600 [RFC3530] Shepler, S., Callaghan, B., Robinson, D., Thurlow, R., 601 Beame, C., Eisler, M., and D. Noveck, "Network File System 602 (NFS) version 4 Protocol", RFC 3530, April 2003. 604 [RFC3722] Bakke, M., "String Profile for Internet Small Computer 605 Systems Interface (iSCSI) Names", RFC 3722, April 2004. 607 [RFC3748] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. 608 Levkowetz, "Extensible Authentication Protocol (EAP)", 609 RFC 3748, June 2004. 611 [RFC3920] Saint-Andre, P., Ed., "Extensible Messaging and Presence 612 Protocol (XMPP): Core", RFC 3920, October 2004. 614 [RFC3922] Saint-Andre, P., "Mapping the Extensible Messaging and 615 Presence Protocol (XMPP) to Common Presence and Instant 616 Messaging (CPIM)", RFC 3922, October 2004. 618 [RFC4011] Waldbusser, S., Saperia, J., and T. Hongal, "Policy Based 619 Management MIB", RFC 4011, March 2005. 621 [RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names 622 and Passwords", RFC 4013, February 2005. 624 [RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites 625 for Transport Layer Security (TLS)", RFC 4279, 626 December 2005. 628 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 629 RFC 4314, December 2005. 631 [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and 632 Security Layer (SASL)", RFC 4422, June 2006. 634 [RFC4505] Zeilenga, K., "Anonymous Simple Authentication and 635 Security Layer (SASL) Mechanism", RFC 4505, June 2006. 637 [RFC4511] Sermersheim, J., "Lightweight Directory Access Protocol 638 (LDAP): The Protocol", RFC 4511, June 2006. 640 [RFC4513] Harrison, R., "Lightweight Directory Access Protocol 641 (LDAP): Authentication Methods and Security Mechanisms", 642 RFC 4513, June 2006. 644 [RFC4518] Zeilenga, K., "Lightweight Directory Access Protocol 645 (LDAP): Internationalized String Preparation", RFC 4518, 646 June 2006. 648 [RFC4616] Zeilenga, K., "The PLAIN Simple Authentication and 649 Security Layer (SASL) Mechanism", RFC 4616, August 2006. 651 [RFC4643] Vinocur, J. and K. Murchison, "Network News Transfer 652 Protocol (NNTP) Extension for Authentication", RFC 4643, 653 October 2006. 655 [RFC4683] Park, J., Lee, J., Lee, H., Park, S., and T. Polk, 656 "Internet X.509 Public Key Infrastructure Subject 657 Identification Method (SIM)", RFC 4683, October 2006. 659 [RFC4690] Klensin, J., Faltstrom, P., Karp, C., and IAB, "Review and 660 Recommendations for Internationalized Domain Names 661 (IDNs)", RFC 4690, September 2006. 663 [RFC4790] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet 664 Application Protocol Collation Registry", RFC 4790, 665 March 2007. 667 [RFC4954] Siemborski, R. and A. Melnikov, "SMTP Service Extension 668 for Authentication", RFC 4954, July 2007. 670 [RFC5034] Siemborski, R. and A. Menon-Sen, "The Post Office Protocol 671 (POP3) Simple Authentication and Security Layer (SASL) 672 Authentication Mechanism", RFC 5034, July 2007. 674 [RFC5051] Crispin, M., "i;unicode-casemap - Simple Unicode Collation 675 Algorithm", RFC 5051, October 2007. 677 [RFC5054] Taylor, D., Wu, T., Mavrogiannopoulos, N., and T. Perrin, 678 "Using the Secure Remote Password (SRP) Protocol for TLS 679 Authentication", RFC 5054, November 2007. 681 [RFC5122] Saint-Andre, P., "Internationalized Resource Identifiers 682 (IRIs) and Uniform Resource Identifiers (URIs) for the 683 Extensible Messaging and Presence Protocol (XMPP)", 684 RFC 5122, February 2008. 686 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 687 Housley, R., and W. Polk, "Internet X.509 Public Key 688 Infrastructure Certificate and Certificate Revocation List 689 (CRL) Profile", RFC 5280, May 2008. 691 [RFC5456] Spencer, M., Capouch, B., Guy, E., Miller, F., and K. 692 Shumard, "IAX: Inter-Asterisk eXchange Version 2", 693 RFC 5456, February 2010. 695 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 696 System (NFS) Version 4 Minor Version 1 Protocol", 697 RFC 5661, January 2010. 699 [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, 700 "Salted Challenge Response Authentication Mechanism 701 (SCRAM) SASL and GSS-API Mechanisms", RFC 5802, July 2010. 703 [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely 704 Managing Sieve Scripts", RFC 5804, July 2010. 706 [RFC5890] Klensin, J., "Internationalized Domain Names for 707 Applications (IDNA): Definitions and Document Framework", 708 RFC 5890, August 2010. 710 [RFC5891] Klensin, J., "Internationalized Domain Names in 711 Applications (IDNA): Protocol", RFC 5891, August 2010. 713 [RFC5892] Faltstrom, P., "The Unicode Code Points and 714 Internationalized Domain Names for Applications (IDNA)", 715 RFC 5892, August 2010. 717 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 718 Internationalized Domain Names for Applications (IDNA)", 719 RFC 5893, August 2010. 721 [RFC5894] Klensin, J., "Internationalized Domain Names for 722 Applications (IDNA): Background, Explanation, and 723 Rationale", RFC 5894, August 2010. 725 [RFC5895] Resnick, P. and P. Hoffman, "Mapping Characters for 726 Internationalized Domain Names in Applications (IDNA) 727 2008", RFC 5895, September 2010. 729 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 730 Internationalization in the IETF", BCP 166, RFC 6365, 731 September 2011. 733 [RFC6452] Faltstrom, P. and P. Hoffman, "The Unicode Code Points and 734 Internationalized Domain Names for Applications (IDNA) - 735 Unicode 6.0", RFC 6452, November 2011. 737 [UAX15] "Unicode Standard Annex #15: Unicode Normalization Forms", 738 UAX 15, September 2009. 740 [Unicode61] 741 The Unicode Consortium. The Unicode Standard, Version 742 6.1, defined by:, "The Unicode Standard -- Version 6.1", 743 (Mountain View, CA: The Unicode Consortium, 2012. ISBN 744 978-1-936213-02-3), September 2009, 745 . 747 [ietf78precis] 748 Blanchet, M., "PRECIS Framework", Proceedings of the 749 Seventy-Eighth Internet Engineering Task 750 Force https://www.ietf.org/proceedings/78/, July 2010, 751 . 753 Appendix A. Classification of Stringprep Profiles 755 A number of the known cases of Stringprep use were evaluated during 756 the preparation of this document. The known cases are here described 757 in two ways. The types of identifiers the protocol uses is first 758 called out in the ID type column (from Section 5.1.1), using the 759 short forms "a" for Absolute, "d" for Definite, and "i" for 760 Indefinite. Next, there is a column that contains an "i" if the 761 protocol string comes from user input, an "o" if the protocol string 762 becomes user-facing output, "b" if both are true, and "n" if neither 763 is true. 765 +------+--------+-------+ 766 | RFC | IDtype | User? | 767 +------+--------+-------+ 768 | 3722 | a | b | 769 | 3748 | - | - | 770 | 3920 | a,d | b | 771 | 4505 | a | i | 772 | 4314 | a,d | b | 773 | 4954 | a,d | b | 774 | 5034 | a,d | b | 775 | 5804 | a,d | b | 776 +------+--------+-------+ 778 Table 1 780 Appendix B. Evaluation of Stringprep Profiles 782 This section is a summary of evaluation of Stringprep profiles that 783 was done to get a good understanding of the usage of Stringprep. 784 This summary is by no means normative nor the actual evaluations 785 themselves. A template was used for reviewers to get a coherent view 786 of all evaluations. 788 B.1. iSCSI Stringprep Profile: RFC3722 (and RFC3721, RFC3720) 790 Description: An iSCSI session consists of an initiator (i.e., host 791 or server that uses storage) communicating with a target (i.e., a 792 storage array or other system that provides storage). Both the 793 iSCSI initiator and target are named by iSCSI Names. The iSCSI 794 Stringprep profile is used for iSCSI names. 795 How it is used: iSCSI initiators and targets (see above). They can 796 also be used to identify SCSI ports (these are software entities 797 in the iSCSI protocol, not hardware ports), and iSCSI logical 798 units (storage volumes), although both are unusual in practice. 800 What entities create these identifiers? Generally a Human user (1) 801 configures an Automated system (2) that generates the names. 802 Advance configuration of the system is required due to the 803 embedded use of external unique identifier (from the DNS or IEEE). 804 How is the string input in the system? Keyboard and copy-paste are 805 common. Copy-paste is common because iSCSI names are long enough 806 to be problematic for humans to remember, causing use of email, 807 sneaker-net, text files, etc. to avoid mistype mistakes. 808 Where do we place the dividing line between user interface and 809 protocol? The iSCSI protocol requires that all internationalization 810 string preparation occur in the user interface. The iSCSI 811 protocol treats iSCSI names as opaque identifiers that are 812 compared byte-by-byte for equality. iSCSI names are generally not 813 checked for correct formatting by the protocol. 814 What entities enforce the rules? There are no iSCSI-specific 815 enforcement entities, although the use of unique identifier 816 information in the names relies on DNS registrars and the IEEE 817 Registration Authority. 818 Comparison Byte-by-byte 819 Case Folding, Sensitivity, Preservation Case folding is required for 820 the code blocks specified in RFC 3454, Table B.2. The overall 821 iSCSI naming system (UI + protocol) is case-insensitive. 822 What is the impact if the comparison results in a false positive? 823 Potential access to the wrong storage. - If the initiator has no 824 access to the wrong storage, an authentication failure is the 825 probable result. - If the initiator has access to the wrong 826 storage, the resulting mis-identification could result in use of 827 the wrong data and possible corruption of stored data. 828 What is the impact if the comparison results in a false negative? 829 Denial of authorized storage access. 830 What are the security impacts? iSCSI names may be used as the 831 authentication identities for storage systems. Comparison 832 problems could result in authentication problems, although note 833 that authentication failure ameliorates some of the false positive 834 cases. 835 Normalization NFKC, as specified by RFC 3454. 836 Mapping Yes, as specified by table B.1 in RFC 3454 837 Disallowed Characters Only the following characters are allowed: - 838 ASCII dash, dot, colon - ASCII lower case letters and digits - 839 Unicode lower case characters as specified by RFC 3454 All other 840 characters are disallowed. 841 Which other strings or identifiers are these most similar to? None - 842 iSCSI names are unique to iSCSI. 843 Are these strings or identifiers sometimes the same as strings or 844 identifiers from other protocols? No 845 Does the identifier have internal structure that needs to be 846 respected? Yes - ASCII dot, dash and colon are used for internal 847 name structure. These are not reserved characters in that they 848 can occur in the name in locations other than those used for 849 structuring purposes (e.g., only the first occurrence of a colon 850 character is structural, others are not). 851 How are users exposed to these strings? How are they published? 852 iSCSI names appear in server and storage system configuration 853 interfaces. They also appear in system logs. 854 Is the string / identifier used as input to other operations? 855 Effectively, no. The rarely used port and logical unit names 856 involve concatenation, which effectively extends a unique iSCSI 857 Name for a target to uniquely identify something within that 858 target. 859 How much tolerance for change from existing Stringprep approach? 860 Good tolerance; the community would prefer that 861 internationalization experts solve internationalization problems. 862 How strong a desire for change (e.g., for Unicode agility)? Unicode 863 agility is desired in principle as long as nothing significant 864 breaks. 866 B.2. SMTP/POP3/ManageSieve Stringprep Profiles: RFC4954,RFC5034,RFC 867 5804 869 Description: Authorization identity (user identifier) exchanged 870 during SASL authentication: AUTH (SMTP/POP3) or AUTHENTICATE 871 (ManageSieve) command. 872 How It's Used: Used for proxy authorization, e.g. to [lawfully] 873 impersonate a particular user after a privileged authentication 874 Who Generates It: Typically generated by email system administrators 875 using some tools/conventions, sometimes from some backend 876 database. - In some setups human users can register own usernames 877 (e.g. webmail self registration) 878 User Input Methods: - Typed by user / selected from a list - Copy- 879 and-paste - Perhaps voice input - Can also be specified in 880 configuration files or on a command line 881 Enforcement: - Rules enforced by server / add-on service (e.g., 882 gateway service) on registration of account 883 Comparison Method: "Type 1" (byte-for-byte) or "type 2" (compare by 884 a common algorithm that everyone agrees on (e.g., normalize and 885 then compare the result byte-by-byte)) 886 Case Folding, Sensitivity, Preservation: Most likely case sensitive. 887 Exact requirements on case-sensitivity/case-preservation depend on 888 a specific implementation, e.g. an implementation might treat all 889 user identifiers as case insensitive (or case insensitive for US- 890 ASCII subset only). 892 Impact of Comparison: False positives: - an unauthorized user is 893 allowed email service access (login) False negatives: - an 894 authorized user is denied email service access 895 Normalization: NFKC (as per RFC 4013) 896 Mapping: (see Section 2 of RFC 4013 for the full list): Non ASCII 897 spaces are mapped to space, etc. 898 Disallowed Characters: (see Section 2 of RFC 4013 for the full 899 list): Unicode Control characters, etc. 900 String Classes: - simple username. See Section 2 of RFC 4013 for 901 details on restrictions. Note that some implementations allow 902 spaces in these. While implementations are not required to use a 903 specific format, an authorization identity frequently has the same 904 format as an email address (and EAI email address in the future), 905 or as a left hand side of an email address. Note: whatever is 906 recommended for SMTP/POP/ManageSieve authorization identity should 907 also be used for IMAP authorization identities, as IMAP/POP3/SMTP/ 908 ManageSieve are frequently implemented together. 909 Internal Structure: None 910 User Output: Unlikely, but possible. For example, if it is the same 911 as an email address. 912 Operations: - Sometimes concatenated with other data and then used 913 as input to a cryptographic hash function 914 How much tolerance for change from existing Stringprep approach? Not 915 sure. 916 Background information: In RFC 5034, when describing the POP3 AUTH 917 command: The authorization identity generated by the SASL exchange 918 is a simple username, and SHOULD use the SASLprep profile (see 919 RFC4013) of the StringPrep algorithm (see RFC3454) to prepare 920 these names for matching. If preparation of the authorization 921 identity fails or results in an empty string (unless it was 922 transmitted as the empty string), the server MUST fail the 923 authentication. In RFC 4954, when describing the SMTP AUTH 924 command: The authorization identity generated by this SASL 925 exchange is a "simple username" (in the sense defined in 926 SASLprep), and both client and server SHOULD (*) use the SASLprep 927 profile of the StringPrep algorithm to prepare these names for 928 transmission or comparison. If preparation of the authorization 929 identity fails or results in an empty string (unless it was 930 transmitted as the empty string), the server MUST fail the 931 authentication. (*) Note: Future revision of this specification 932 may change this requirement to MUST. Currently, the SHOULD is 933 used in order to avoid breaking the majority of existing 934 implementations. In RFC 5804, when describing the ManageSieve 935 AUTHENTICATE command: The authorization identity generated by this 936 SASL exchange is a "simple username" (in the sense defined in 937 SASLprep), and both client and server MUST use the SASLprep 938 profile of the StringPrep algorithm to prepare these names for 939 transmission or comparison. If preparation of the authorization 940 identity fails or results in an empty string (unless it was 941 transmitted as the empty string), the server MUST fail the 942 authentication. 944 B.3. IMAP Stringprep Profiles: RFC5738, RFC4314: Usernames 946 Evaluation Note These documents have 2 types of strings (usernames 947 and passwords), so there are two separate templates. 948 Description: "username" parameter to the IMAP LOGIN command, 949 identifiers in IMAP ACL commands. Note that any valid username is 950 also an IMAP ACL identifier, but IMAP ACL identifiers can include 951 other things like name of group of users. 952 How It's Used: Used for authentication (Usernames), or in IMAP 953 Access Control Lists (Usernames or Group names) 954 Who Generates It: - Typically generated by email system 955 administrators using some tools/conventions, sometimes from some 956 backend database. - In some setups human users can register own 957 usernames (e.g. webmail self registration) 958 User Input Methods: - Typed by user / selected from a list - Copy- 959 and-paste - Perhaps voice input - Can also be specified in 960 configuration files or on a command line 961 Enforcement: - Rules enforced by server / add-on service (e.g., 962 gateway service) on registration of account 963 Comparison Method: Type 1" (byte-for-byte) or "type 2" (compare by a 964 common algorithm that everyone agrees on (e.g., normalize and then 965 compare the result byte-by-byte)) 966 Case Folding, Sensitivity, Preservation: - Most likely case 967 sensitive. Exact requirements on case-sensitivity/ 968 case-preservation depend on a specific implementation, e.g. an 969 implementation might treat all user identifiers as case 970 insensitive (or case insensitive for US-ASCII subset only). 971 Impact of Comparison: False positives: - an unauthorized user is 972 allowed IMAP access (login) - improperly grant privileges (e.g., 973 access to a specific mailbox, ability to manage ACLs for a 974 mailbox) False negatives: - an authorized user is denied IMAP 975 access - unable to use granted privileges (e.g., access to a 976 specific mailbox, ability to manage ACLs for a mailbox) 977 Normalization: NFKC (as per RFC 4013) 978 Mapping: (see Section 2 of RFC 4013 for the full list): non ASCII 979 spaces are mapped to space 980 Disallowed Characters: (see Section 2 of RFC 4013 for the full 981 list): Unicode Control characters, etc. 982 String Classes: - simple username. See Section 2 of RFC 4013 for 983 details on restrictions. Note that some implementations allow 984 spaces in these. While IMAP implementations are not required to 985 use a specific format, an IMAP username frequently has the same 986 format as an email address (and EAI email address in the future), 987 or as a left hand side of an email address. Note: whatever is 988 recommended for IMAP username should also be used for ManageSieve, 989 POP3 and SMTP authorization identities, as IMAP/POP3/SMTP/ 990 ManageSieve are frequently implemented together. 991 Internal Structure: None 992 User Output: Unlikely, but possible. For example, if it is the same 993 as an email address. - access control lists (e.g. in IMAP ACL 994 extension), both when managing membership and listing membership 995 of existing access control lists. - often show up as mailbox names 996 (under Other Users IMAP namespace) 997 Operations: - Sometimes concatenated with other data and then used 998 as input to a cryptographic hash function 999 How much tolerance for change from existing Stringprep approach? Not 1000 sure. Non-ASCII IMAP usernames are currently prohibited by IMAP 1001 (RFC 3501). However they are allowed when used in IMAP ACL 1002 extension. 1004 B.4. IMAP Stringprep Profiles: RFC5738: Passwords 1006 Description: "Password" parameter to the IMAP LOGIN command 1007 How It's Used: Used for authentication (Passwords) 1008 Who Generates It: Either generated by email system administrators 1009 using some tools/conventions, or specified by the human user. 1010 User Input Methods: - Typed by user - Copy-and-paste - Perhaps voice 1011 input - Can also be specified in configuration files or on a 1012 command line 1013 Enforcement: Rules enforced by server / add-on service (e.g., 1014 gateway service or backend databse) on registration of account 1015 Comparison Method: "Type 1" (byte-for-byte) 1016 Case Folding, Sensitivity, Preservation: Most likely case sensitive. 1017 Impact of Comparison: False positives: - an unauthorized user is 1018 allowed IMAP access (login) False negatives: - an authorized user 1019 is denied IMAP access 1020 Normalization: NFKC (as per RFC 4013) 1021 Mapping: (see Section 2 of RFC 4013 for the full list): non ASCII 1022 spaces are mapped to space 1023 Disallowed Characters: (see Section 2 of RFC 4013 for the full 1024 list): Unicode Control characters, etc. 1025 String Classes: Currently defined as "simple username" (see Section 1026 2 of RFC 4013 for details on restrictions.), however this is 1027 likely to be a different class from usernames. Note that some 1028 implementations allow spaces in these. Password in all email 1029 related protocols should be treated in the same way. Same 1030 passwords are frequently shared with web, IM, etc. applications. 1031 Internal Structure: None 1032 User Output: - text of email messages (e.g. in "you forgot your 1033 password" email messages) - web page / directory - side of the bus 1034 / in ads -- possible 1035 Operations: Sometimes concatenated with other data and then used as 1036 input to a cryptographic hash function. Frequently stored as is, 1037 or hashed. 1038 How much tolerance for change from existing Stringprep approach? Not 1039 sure. Non-ASCII IMAP passwords are currently prohibited by IMAP 1040 (RFC 3501), however they are likely to be in widespread use. 1041 Background information: RFC 5738 (IMAP INTERNATIONALIZATION): 5. 1042 UTF8=USER Capability If the "UTF8=USER" capability is advertised, 1043 that indicates the server accepts UTF-8 user names and passwords 1044 and applies SASLprep RFC4013 to both arguments of the LOGIN 1045 command. The server MUST reject UTF-8 that fails to comply with 1046 the formal syntax in RFC 3629 RFC3629 or if it encounters Unicode 1047 characters listed in Section 2.3 of SASLprep RFC 4013 RFC4013. 1048 RFC 4314 (IMAP4 Access Control List (ACL) Extension): 3. Access 1049 control management commands and responses Servers, when processing 1050 a command that has an identifier as a parameter (i.e., any of 1051 SETACL, DELETEACL, and LISTRIGHTS commands), SHOULD first prepare 1052 the received identifier using "SASLprep" profile SASLprep of the 1053 "Stringprep" algorithm Stringprep. If the preparation of the 1054 identifier fails or results in an empty string, the server MUST 1055 refuse to perform the command with a BAD response. Note that 1056 Section 6 recommends additional identifier's verification steps. 1057 and in Section 6: This document relies on SASLprep to describe 1058 steps required to perform identifier canonicalization 1059 (preparation). The preparation algorithm in SASLprep was 1060 specifically designed such that its output is canonical, and it is 1061 well-formed. However, due to an anomaly PR29 in the specification 1062 of Unicode normalization, canonical equivalence is not guaranteed 1063 for a select few character sequences. Identifiers prepared with 1064 SASLprep can be stored and returned by an ACL server. The anomaly 1065 affects ACL manipulation and evaluation of identifiers containing 1066 the selected character sequences. These sequences, however, do 1067 not appear in well-formed text. In order to address this problem, 1068 an ACL server MAY reject identifiers containing sequences 1069 described in PR29 by sending the tagged BAD response. This is in 1070 addition to the requirement to reject identifiers that fail 1071 SASLprep preparation as described in Section 3. 1073 B.5. Anonymous SASL Stringprep Profiles: RFC4505 1075 Description: RFC 4505 defines a "trace" field: 1077 Comparison: this field is not intended for comparison (only used for 1078 logging) 1079 Case folding; case sensitivity, preserve case: No case folding/case 1080 sensitive 1081 Do users input the strings directly? Yes. Possibly entered in 1082 configuration UIs, or on a command line. Can also be stored in 1083 configuration files. The value can also be automatically 1084 generated by clients (e.g. a fixed string is used, or a user's 1085 email address). 1086 How users input strings? Keyboard/voice, stylus (pick from a list). 1087 Copy-paste - possibly. 1088 Normalization: None 1089 Disallowed Characters Control characters are disallowed. (See 1090 Section 3 of RFC 4505) 1091 Which other strings or identifiers are these most similar to? RFC 1092 4505 says that the trace "should take one of two forms: an 1093 Internet email address, or an opaque string that does not contain 1094 the '@' U+0040) character and that can be interpreted by the 1095 system administrator of the client's domain." In practice, this 1096 is a freeform text, so it belongs to a different class from "email 1097 address" or "username". 1098 Are these strings or identifiers sometimes the same as strings or 1099 identifiers from other protocols (e.g., does an IM system sometimes 1100 use the same credentials database for authentication as an email 1101 system)? Yes: see above. However there is no strong need to keep 1102 them consistent in the future. 1103 How are users exposed to these strings, how are they published? No. 1104 However, The value can be seen in server logs 1105 Impacts of false positives and false negatives: False positive: a 1106 user can be confused with another user. False negative: two 1107 distinct users are treated as the same user. But note that the 1108 trace field is not authenticated, so it can be easily falsified. 1109 Tolerance of changes in the community The community would be 1110 flexible. 1111 Delimiters No internal structure, but see comments above about 1112 frequent use of email addresses. 1113 Background information: The Anonymous Mechanism The mechanism 1114 consists of a single message from the client to the server. The 1115 client may include in this message trace information in the form 1116 of a string of UTF-8-encoded Unicode characters prepared in 1117 accordance with StringPrep and the "trace" Stringprep profile 1118 defined in Section 3 of this document. The trace information, 1119 which has no semantical value, should take one of two forms: an 1120 Internet email address, or an opaque string that does not contain 1121 the '@' (U+0040) character and that can be interpreted by the 1122 system administrator of the client's domain. For privacy reasons, 1123 an Internet email address or other information identifying the 1124 user should only be used with permission from the user. 3. The 1125 "trace" Profile of "Stringprep" This section defines the "trace" 1126 profile of StringPrep. This profile is designed for use with the 1127 SASL ANONYMOUS Mechanism. Specifically, the client is to prepare 1128 the message production in accordance with this profile. The 1129 character repertoire of this profile is Unicode 3.2. No mapping 1130 is required by this profile. No Unicode normalization is required 1131 by this profile. The list of unassigned code points for this 1132 profile is that provided in Appendix A of StringPrep. Unassigned 1133 code points are not prohibited. Characters from the following 1134 tables of StringPrep are prohibited: - C.2.1 (ASCII control 1135 characters) - C.2.2 (Non-ASCII control characters) - C.3 (Private 1136 use characters) - C.4 (Non-character code points) - C.5 (Surrogate 1137 codes) - C.6 (Inappropriate for plain text) - C.8 (Change display 1138 properties are deprecated) - C.9 (Tagging characters) No 1139 additional characters are prohibited. This profile requires 1140 bidirectional character checking per Section 6 of StringPrep. 1142 B.6. XMPP Stringprep Profiles: RFC3920 Nodeprep 1144 Description: Localpart of JabberID ("JID"), as in: 1145 localpart@domainpart/resourcepart 1146 How It's Used: - Usernames (e.g., stpeter@jabber.org) - Chatroom 1147 names (e.g., precis@jabber.ietf.org) - Publish-subscribe nodes - 1148 Bot names 1149 Who Generates It: - Typically, end users via an XMPP client - 1150 Sometimes created in an automated fashion 1151 User Input Methods: - Typed by user - Copy-and-paste - Perhaps voice 1152 input - Clicking a URI/IRI 1153 Enforcement: - Rules enforced by server / add-on service (e.g., 1154 chatroom service) on registration of account, creation of room, 1155 etc. 1156 Comparison Method: "Type 2" (common algorithm) 1157 Case Folding, Sensitivity, Preservation: - Strings are always folded 1158 to lowercase - Case is not preserved 1159 Impact of Comparison: False positives: - unable to authenticate at 1160 server (or authenticate to wrong account) - add wrong person to 1161 buddy list - join the wrong chatroom - improperly grant privileges 1162 (e.g., chatroom admin) - subscribe to wrong pubsub node - interact 1163 with wrong bot - allow communication with blocked entity False 1164 negatives: - unable to authenticate - unable to add someone to 1165 buddy list - unable to join desired chatroom - unable to use 1166 granted privileges (e.g., chatroom admin) - unable to subscribe to 1167 desired pubsub node - unable to interact with desired bot - 1168 disallow communication with unblocked entity 1170 Normalization: NFKC 1171 Mapping: Spaces are mapped to nothing 1172 Disallowed Characters: ",&,',/,:,<,>,@ 1173 String Classes: - Often similar to generic username - Often similar 1174 to localpart of email address - Sometimes same as localpart of 1175 email address 1176 Internal Structure: None 1177 User Output: - vCard - email signature - web page / directory - text 1178 of message (e.g., in a chatroom) 1179 Operations: - Sometimes concatenated with other data and then used 1180 as input to a cryptographic hash function 1182 B.7. XMPP Stringprep Profiles: RFC3920 Resourceprep 1184 Description: - Resourcepart of JabberID ("JID"), as in: 1185 localpart@domainpart/resourcepart - Typically free-form text 1186 How It's Used: - Device / session names (e.g., 1187 stpeter@jabber.org/Home) - Nicknames (e.g., 1188 precis@jabber.ietf.org/StPeter) 1189 Who Generates It: - Often human users via an XMPP client - Often 1190 generated in an automated fashion by client or server 1191 User Input Methods: - Typed by user - Copy-and-paste - Perhaps voice 1192 input - Clicking a URI/IRI 1193 Enforcement: - Rules enforced by server / add-on service (e.g., 1194 chatroom service) on account login, joining a chatroom, etc. 1195 Comparison Method: "Type 2" (byte-for-byte) 1196 Case Folding, Sensitivity, Preservation: - Strings are never folded 1197 - Case is preserved 1198 Impact of Comparison: False positives: - interact with wrong device 1199 (e.g., for file transfer or voice call) - interact with wrong 1200 chatroom participant - improperly grant privileges (e.g., chatroom 1201 moderator) - allow communication with blocked entity False 1202 negatives: - unable to choose desired chatroom nick - unable to 1203 use granted privileges (e.g., chatroom moderator) - disallow 1204 communication with unblocked entity 1205 Normalization: NFKC 1206 Mapping: Spaces are mapped to nothing 1207 Disallowed Characters: None 1208 String Classes: Basically a free-form identifier 1209 Internal Structure: None 1210 User Output: - text of message (e.g., in a chatroom) - device names 1211 often not exposed to human users 1212 Operations: Sometimes concatenated with other data and then used as 1213 input to a cryptographic hash function 1215 B.8. EAP Stringprep Profiles: RFC3748 1217 Description: RFC 3748 section 5 references Stringprep, but the WG 1218 did not agree with the text (was added by IESG) and there are no 1219 known implementations that use Stringprep. The main problem with 1220 that text is that the use of strings is a per-method concept, not 1221 a generic EAP concept and so RFC 3748 itself does not really use 1222 Stringprep, but individual EAP methods could. As such, the 1223 answers to the template questions are mostly not applicable, but a 1224 few answers are universal across methods. The list of IANA 1225 registered EAP methods is at http://www.iana.org/assignments/ 1226 eap-numbers/eap-numbers.xml#eap-numbers-3 1227 Comparison Methods: n/a (per-method) 1228 Case Folding, Case Sensitivity, Case Preservation: n/a (per-method) 1229 Impact of comparison: A false positive results in unauthorized 1230 network access (and possibly theft of service if some else is 1231 billed). A false negative results in lack of authorized network 1232 access (no connectivity). 1233 User input: n/a (per-method) 1234 Normalization: n/a (per-method) 1235 Mapping: n/a (per-method) 1236 Disallowed characters: n/a (per-method) 1237 String classes: Although some EAP methods may use a syntax similar 1238 to other types of identifiers, EAP mandates that the actual values 1239 must not be assumed to be identifiers usable with anything else. 1240 Internal structure: n/a (per-method) 1241 User output: Identifiers are never human displayed except perhaps as 1242 they're typed by a human. 1243 Operations: n/a (per-method) 1244 Community considerations: There is no resistance to change for the 1245 base EAP protocol (as noted, the WG didn't want the existing 1246 text). However actual use of Stringprep, if any, within specific 1247 EAP methods may have resistance. It is currently unknown whether 1248 any EAP methods use Stringprep. 1250 Authors' Addresses 1252 Marc Blanchet 1253 Viagenie 1254 246 Aberdeen 1255 Quebec, QC G1R 2E1 1256 Canada 1258 Email: Marc.Blanchet@viagenie.ca 1259 URI: http://viagenie.ca 1260 Andrew Sullivan 1261 Dyn, Inc. 1262 150 Dow St 1263 Manchester, NH 03101 1264 U.S.A. 1266 Email: asullivan@dyn.com