idnits 2.17.1 draft-ietf-precis-nickname-13.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 (November 26, 2014) is 3436 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-20 -- Possible downref: Non-RFC (?) normative reference: ref. 'UNICODE' -- Possible downref: Non-RFC (?) normative reference: ref. 'UTS39' Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 PRECIS P. Saint-Andre 3 Internet-Draft &yet 4 Intended status: Standards Track November 26, 2014 5 Expires: May 30, 2015 7 Preparation, Enforcement, and Comparison of Internationalized Strings 8 Representing Nicknames 9 draft-ietf-precis-nickname-13 11 Abstract 13 This document describes methods for handling Unicode strings 14 representing nicknames. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on May 30, 2015. 33 Copyright Notice 35 Copyright (c) 2014 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 53 2. Nickname Profile . . . . . . . . . . . . . . . . . . . . . . 3 54 2.1. Preparation . . . . . . . . . . . . . . . . . . . . . . . 3 55 2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . . . 3 56 2.3. Comparison . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 4. Use in Application Protocols . . . . . . . . . . . . . . . . 6 59 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 60 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 61 6.1. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 7 62 6.2. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . 7 63 6.3. Visually Similar Characters . . . . . . . . . . . . . . . 7 64 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 65 7.1. Normative References . . . . . . . . . . . . . . . . . . 8 66 7.2. Informative References . . . . . . . . . . . . . . . . . 8 67 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 70 1. Introduction 72 1.1. Overview 74 Technologies for textual chatrooms customarily enable participants to 75 specify a nickname for use in the room; e.g., this is true of 76 Internet Relay Chat [RFC2811] as well as multi-party chat 77 technologies based on the Extensible Messaging and Presence Protocol 78 (XMPP) [RFC6120] [XEP-0045], the Message Session Relay Protocol 79 (MSRP) [RFC4975] [I-D.ietf-simple-chat], and Centralized Conferencing 80 (XCON) [RFC5239] [I-D.boulton-xcon-session-chat]. Recent chatroom 81 technologies also allow internationalized nicknames because they 82 support characters from outside the ASCII range [RFC20], typically by 83 means of the Unicode character set [UNICODE]. Although such 84 nicknames tend to be used primarily for display purposes, they are 85 sometimes used for programmatic purposes as well (e.g., kicking users 86 or avoiding nickname conflicts). Note too that nicknames can be used 87 not only in chatrooms but also more generally as a user's preferred 88 display name (see for instance [XEP-0172]). 90 Nicknames (also called "petnames") are also used in contexts other 91 than messaging, such as petnames for devices, bank accounts, and the 92 like. The rules specified in this document can also be applied to 93 such nicknames. 95 To increase the likelihood that nicknames will work in ways that make 96 sense for typical users throughout the world, this document defines 97 rules for preparing, enforcing, and comparing internationalized 98 nicknames. 100 1.2. Terminology 102 Many important terms used in this document are defined in 103 [I-D.ietf-precis-framework], [RFC6365], and [UNICODE]. 105 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 107 "OPTIONAL" in this document are to be interpreted as described in RFC 108 2119 [RFC2119]. 110 2. Nickname Profile 112 Detailed rules for the preparation, enforcement, and comparision of 113 nicknames are provided in the following sections, which define the 114 Nickname profile of the PRECIS FreeformClass (on the distinction 115 between these actions, refer to [I-D.ietf-precis-framework]). 117 2.1. Preparation 119 An entity that prepares a string according to this profile MUST 120 ensure that the string consists only of Unicode code points that 121 conform to the "FreeformClass" base string class defined in 122 [I-D.ietf-precis-framework]. In addition, the string MUST be encoded 123 as UTF-8 [RFC3629]. 125 2.2. Enforcement 127 An entity that performs enforcement according to this profile MUST 128 prepare a string as described in the previous section and MUST also 129 apply the rules specified below for the Nickname profile (these rules 130 MUST be applied in the order shown). 132 1. Width Mapping Rule: There is no width-mapping rule (such a rule 133 is not necessary because width mapping is performed as part of 134 normalization using NFKC as specified below). 136 2. Additional Mapping Rule: The additional mapping rule consists of 137 the following sub-rules. 139 1. Any instances of non-ASCII space MUST be mapped to ASCII 140 space (U+0020); a non-ASCII space is any Unicode code point 141 having a general category of "Zs", naturally with the 142 exception of U+0020. 144 2. Leading and trailing whitespace (i.e., one or more instances 145 of the ASCII space character at the beginning or end of a 146 nickname) MUST be removed (e.g., "stpeter " is mapped to 147 "stpeter"). 149 3. Interior sequences of more than one ASCII space character 150 MUST be mapped to a single ASCII space character (e.g., 151 "St Peter" is mapped to "St Peter"). 153 3. Case Mapping Rule: Uppercase and titlecase characters MUST be 154 mapped to their lowercase equivalents using Unicode Default Case 155 Folding. In applications that prohibit conflicting nicknames, 156 this rule helps to reduce the possibility of confusion by 157 ensuring that nicknames differing only by case (e.g., "stpeter" 158 vs. "StPeter") would not be presented to a human user at the same 159 time. 161 4. Normalization Rule: The string MUST be normalized using Unicode 162 Normalization Form KC (NFKC). Because NFKC is more "aggressive" 163 in finding matches than other normalization forms (in the 164 terminology of Unicode, it performs both canonical and 165 compatibility decomposition before recomposing code points), this 166 rule helps to reduce the possibility of confusion by increasing 167 the number of characters that would match (e.g., U+2163 ROMAN 168 NUMERAL FOUR would match the combination of U+0049 LATIN CAPITAL 169 LETTER I and U+0056 LATIN CAPITAL LETTER V). 171 5. Directionality Rule: Applications MUST apply the "Bidi Rule" 172 defined in [RFC5893] (i.e., each of the six conditions of the 173 Bidi Rule must be satisfied). 175 2.3. Comparison 177 An entity that performs comparison of two strings according to this 178 profile MUST prepare each string and enforce the normalization, case- 179 mapping, and width-mapping rules specified in the previous two 180 sections. The two strings are to be considered equivalent if they 181 are an exact octet-for-octet match (sometimes called "bit-string 182 identity"). 184 3. Examples 186 The following examples illustrate a small number of nicknames that 187 are consistent with the format defined above, along with the output 188 string resulting from application of the PRECIS rules, which would be 189 used for comparison purposes (note that the characters < and > are 190 used to delineate the actual nickname and are not part of the 191 nickname strings). 193 Table 1: A sample of legal nicknames 195 +---------------------------+-----------------------------------+ 196 | # | Nickname | Output for Comparison | 197 +---------------------------+-----------------------------------+ 198 | 1 | | | 199 +---------------------------+-----------------------------------+ 200 | 2 | | | 201 +---------------------------+-----------------------------------+ 202 | 3 | | | 203 +---------------------------+-----------------------------------+ 204 | 4 | | | 205 +---------------------------+-----------------------------------+ 206 | 5 | <Σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 207 +---------------------------+-----------------------------------+ 208 | 6 | <σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 209 +---------------------------+-----------------------------------+ 210 | 7 | <ς> | GREEK SMALL LETTER FINAL SIGMA | 211 | | | (U+03C2) | 212 +---------------------------+-----------------------------------+ 213 | 8 | <♚> | BLACK CHESS KING (U+265A) | 214 +---------------------------+-----------------------------------+ 216 Regarding examples 5, 6, and 7: case-mapping of GREEK CAPITAL LETTER 217 SIGMA (U+03A3) to lowercase (i.e., to GREEK SMALL LETTER SIGMA, 218 U+03C3) during comparison would result in matching the nicknames in 219 examples 5 and 6; however, because the PRECIS mapping rules do not 220 account for the special status of GREEK SMALL LETTER FINAL SIGMA 221 (U+03C2), the nicknames in examples 5 and 7 or examples 6 and 7 would 222 not be matched. Regarding example 8: symbol characters such as BLACK 223 CHESS KING (U+265A) are allowed by the PRECIS FreeformClass and thus 224 can be used in nicknames. 226 The following examples illustrate strings that are not valid 227 nicknames because they violate the format defined above. 229 Table 2: A sample of strings that violate the nickname rules 231 +---------------------------------+---------------------------------+ 232 | # | Non-Nickname string | Notes | 233 +---------------------------------+---------------------------------+ 234 | 9 | < foo > | Leading spaces | 235 +---------------------------------+---------------------------------+ 236 | 10 | | Multiple spaces | 237 +---------------------------------+---------------------------------+ 238 | 10| <> | Zero-length string | 239 +---------------------------------+---------------------------------+ 241 4. Use in Application Protocols 243 This specification defines only the PRECIS-based rules for handling 244 of nickname strings. It is the responsibility of an application 245 protocol (e.g., MSRP, XCON, or XMPP) to specify the protocol slots in 246 which nickname strings can appear, as well as the entities that are 247 expected to enforce the rules governing nickname strings in that 248 protocol. 250 Above and beyond the PRECIS-based rules specified here, application 251 protocols can also define application-specific rules governing 252 nickname strings (rules regarding the minimum or maximum length of 253 nicknames, further restrictions on allowable characters or character 254 ranges, safeguards to mitigate the effects of visually similar 255 characters, etc.). 257 Naturally, application protocols can also specify rules governing the 258 actual use of nicknames in applications (reserved nicknames, 259 authorization requirements for using nicknames, whether certain 260 nicknames can be prohibited, handling of duplicates, the relationship 261 between nicknames and underlying identifiers such as SIP URIs or 262 Jabber IDs, etc.). 264 Entities that enforce the rules specified in this document are 265 encouraged to be liberal in what they accept by following this 266 procedure: 268 1. Where possible, map characters (e.g, through width mapping, 269 additional mapping, special mapping, case mapping, or 270 normalization) and accept the mapped string. 272 2. If mapping is not possible (e.g., because a character is 273 disallowed in the FreeformClass), reject the string. 275 5. IANA Considerations 277 The IANA shall add the following entry to the PRECIS Profiles 278 Registry: 280 Name: Nickname. 282 Base Class: FreeformClass. 284 Applicability: Nicknames in messaging and text conferencing 285 technologies such as MSRP, XCON, and XMPP. 287 Replaces: None. 289 Width Mapping Rule: None (handled via NFKC). 291 Additional Mapping Rule: Map non-ASCII space characters to ASCII 292 space, strip leading and trailing space characters, map interior 293 sequences of multiple space characters to a single ASCII space. 295 Case Mapping Rule: For comparison purposes, map uppercase and 296 titlecase characters to lowercase using Unicode Default Case 297 Folding. 299 Normalization Rule: NFKC. 301 Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies. 303 Enforcement: To be specified by applications. 305 Specification: RFC XXXX. [Note to RFC Editor: please change "XXXX" 306 to the RFC number issued for this specification.] 308 6. Security Considerations 310 6.1. Reuse of PRECIS 312 The security considerations described in [I-D.ietf-precis-framework] 313 apply to the "FreeformClass" string class used in this document for 314 nicknames. 316 6.2. Reuse of Unicode 318 The security considerations described in [UTS39] apply to the use of 319 Unicode characters in nicknames. 321 6.3. Visually Similar Characters 323 [I-D.ietf-precis-framework] describes some of the security 324 considerations related to visually similar characters, also called 325 "confusable characters" or "confusables". 327 Although the mapping rules defined under Section 2 of this document 328 are designed in part to reduce the possibility of confusion about 329 nicknames, this document does not provide more detailed 330 recommendations regarding the handling of visually similar 331 characters, such as those provided in [UTS39]. 333 7. References 335 7.1. Normative References 337 [I-D.ietf-precis-framework] 338 Saint-Andre, P. and M. Blanchet, "Precis Framework: 339 Handling Internationalized Strings in Protocols", draft- 340 ietf-precis-framework-20 (work in progress), November 341 2014. 343 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 344 Requirement Levels", BCP 14, RFC 2119, March 1997. 346 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 347 10646", STD 63, RFC 3629, November 2003. 349 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 350 Internationalized Domain Names for Applications (IDNA)", 351 RFC 5893, August 2010. 353 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 354 6.3", 2013, 355 . 357 [UTS39] The Unicode Consortium, "Unicode Technical Standard #39: 358 Unicode Security Mechanisms", November 2013, 359 . 361 7.2. Informative References 363 [I-D.boulton-xcon-session-chat] 364 Barnes, M., Boulton, C., and S. Loreto, "Chatrooms within 365 a Centralized Conferencing (XCON) System", draft-boulton- 366 xcon-session-chat-08 (work in progress), July 2011. 368 [I-D.ietf-simple-chat] 369 Niemi, A., Garcia, M., and G. Sandbakken, "Multi-party 370 Chat Using the Message Session Relay Protocol (MSRP)", 371 draft-ietf-simple-chat-18 (work in progress), January 372 2013. 374 [RFC20] Cerf, V., "ASCII format for network interchange", RFC 20, 375 October 1969. 377 [RFC2811] Kalt, C., "Internet Relay Chat: Channel Management", RFC 378 2811, April 2000. 380 [RFC4975] Campbell, B., Mahy, R., and C. Jennings, "The Message 381 Session Relay Protocol (MSRP)", RFC 4975, September 2007. 383 [RFC5239] Barnes, M., Boulton, C., and O. Levin, "A Framework for 384 Centralized Conferencing", RFC 5239, June 2008. 386 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 387 Protocol (XMPP): Core", RFC 6120, March 2011. 389 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 390 Internationalization in the IETF", BCP 166, RFC 6365, 391 September 2011. 393 [XEP-0045] 394 Saint-Andre, P., "Multi-User Chat", XSF XEP 0045, February 395 2012. 397 [XEP-0172] 398 Saint-Andre, P. and V. Mercier, "User Nickname", XSF XEP 399 0172, March 2012. 401 Appendix A. Acknowledgements 403 Thanks to Kim Alvefur, Mary Barnes, Dave Cridland, Miguel Garcia, 404 Salvatore Loreto, and Enrico Marocco for their reviews and comments. 406 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for 407 employing him during his work on earlier versions of this document. 409 Author's Address 411 Peter Saint-Andre 412 &yet 414 Email: peter@andyet.com 415 URI: https://andyet.com/