idnits 2.17.1 draft-ietf-precis-nickname-15.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 (February 20, 2015) is 3346 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'UNICODE' -- Possible downref: Non-RFC (?) normative reference: ref. 'UTS39' Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 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 February 20, 2015 5 Expires: August 24, 2015 7 Preparation, Enforcement, and Comparison of Internationalized Strings 8 Representing Nicknames 9 draft-ietf-precis-nickname-15 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 August 24, 2015. 33 Copyright Notice 35 Copyright (c) 2015 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 58 4. Use in Application Protocols . . . . . . . . . . . . . . . . 6 59 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 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 . . . . . . . . . . . . . . . 8 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 (sometimes called "petnames") are also used in contexts 91 other than messaging, such as petnames for devices (e.g., in a 92 network visualization application), websites (e.g., for bookmarks in 93 a web browser), accounts (e.g., in a web interface for a list of 94 payees in a bank account), people (e.g., in a contact list 95 application), and the like. The rules specified in this document can 96 also be applied to such usages. 98 To increase the likelihood that nicknames will work in ways that make 99 sense for typical users throughout the world, this document defines 100 rules for preparing, enforcing, and comparing internationalized 101 nicknames. 103 1.2. Terminology 105 Many important terms used in this document are defined in 106 [I-D.ietf-precis-framework], [RFC6365], and [UNICODE]. 108 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 109 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 110 "OPTIONAL" in this document are to be interpreted as described in RFC 111 2119 [RFC2119]. 113 2. Nickname Profile 115 Detailed rules for the preparation, enforcement, and comparison of 116 nicknames are provided in the following sections, which define the 117 Nickname profile of the PRECIS FreeformClass (on the differences 118 among preparation, enforcement, and comparison, refer to 119 [I-D.ietf-precis-framework]). 121 2.1. Preparation 123 An entity that prepares a string according to this profile MUST 124 ensure that the string consists only of Unicode code points that 125 conform to the "FreeformClass" base string class defined in 126 [I-D.ietf-precis-framework]. In addition, the string MUST be encoded 127 as UTF-8 [RFC3629]. 129 2.2. Enforcement 131 An entity that performs enforcement according to this profile MUST 132 prepare a string as described in the previous section and MUST also 133 apply the rules specified below for the Nickname profile (these rules 134 MUST be applied in the order shown). 136 1. Width Mapping Rule: There is no width-mapping rule (such a rule 137 is not necessary because width mapping is performed as part of 138 normalization using NFKC as specified below). 140 2. Additional Mapping Rule: The additional mapping rule consists of 141 the following sub-rules. 143 1. Any instances of non-ASCII space MUST be mapped to ASCII 144 space (U+0020); a non-ASCII space is any Unicode code point 145 having a general category of "Zs", naturally with the 146 exception of U+0020. 148 2. Leading and trailing whitespace (i.e., one or more instances 149 of the ASCII space character at the beginning or end of a 150 nickname) MUST be removed (e.g., "stpeter " is mapped to 151 "stpeter"). 153 3. Interior sequences of more than one ASCII space character 154 MUST be mapped to a single ASCII space character (e.g., 155 "St Peter" is mapped to "St Peter"). 157 3. Case Mapping Rule: Uppercase and titlecase characters MUST be 158 mapped to their lowercase equivalents using Unicode Default Case 159 Folding. In applications that prohibit conflicting nicknames, 160 this rule helps to reduce the possibility of confusion by 161 ensuring that nicknames differing only by case (e.g., "stpeter" 162 vs. "StPeter") would not be presented to a human user at the same 163 time. 165 4. Normalization Rule: The string MUST be normalized using Unicode 166 Normalization Form KC (NFKC). Because NFKC is more "aggressive" 167 in finding matches than other normalization forms (in the 168 terminology of Unicode, it performs both canonical and 169 compatibility decomposition before recomposing code points), this 170 rule helps to reduce the possibility of confusion by increasing 171 the number of characters that would match (e.g., U+2163 ROMAN 172 NUMERAL FOUR would match the combination of U+0049 LATIN CAPITAL 173 LETTER I and U+0056 LATIN CAPITAL LETTER V). 175 5. Directionality Rule: There is no directionality rule. The "Bidi 176 Rule" (defined in [RFC5893]) and similar rules are unnecessary 177 and inapplicable to nicknames, since it is perfectly acceptable 178 for a given nickname to be presented differently in different 179 layout systems (e.g., a user interface that is configured to 180 handle primarily a right-to-left script vs. an interface that is 181 configured to handle primarily a left-to-right script), as long 182 as the presentation is consistent in any given layout system. 184 2.3. Comparison 186 An entity that performs comparison of two strings according to this 187 profile MUST prepare each string and enforce the rules as specified 188 in the previous two sections. The two strings are to be considered 189 equivalent if they are an exact octet-for-octet match (sometimes 190 called "bit-string identity"). 192 3. Examples 194 The following examples illustrate a small number of nicknames that 195 are consistent with the format defined above, along with the output 196 string resulting from application of the PRECIS rules, which would be 197 used for comparison purposes (note that the characters < and > are 198 used to delineate the actual nickname and are not part of the 199 nickname strings). 201 Table 1: A sample of legal nicknames 203 +---------------------------+-----------------------------------+ 204 | # | Nickname | Output for Comparison | 205 +---------------------------+-----------------------------------+ 206 | 1 | | | 207 +---------------------------+-----------------------------------+ 208 | 2 | | | 209 +---------------------------+-----------------------------------+ 210 | 3 | | | 211 +---------------------------+-----------------------------------+ 212 | 4 | | | 213 +---------------------------+-----------------------------------+ 214 | 5 | <Σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 215 +---------------------------+-----------------------------------+ 216 | 6 | <σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 217 +---------------------------+-----------------------------------+ 218 | 7 | <ς> | GREEK SMALL LETTER FINAL SIGMA | 219 | | | (U+03C2) | 220 +---------------------------+-----------------------------------+ 221 | 8 | <♚> | BLACK CHESS KING (U+265A) | 222 +---------------------------+-----------------------------------+ 224 Regarding examples 5, 6, and 7: case-mapping of GREEK CAPITAL LETTER 225 SIGMA (U+03A3) to lowercase (i.e., to GREEK SMALL LETTER SIGMA, 226 U+03C3) during comparison would result in matching the nicknames in 227 examples 5 and 6; however, because the PRECIS mapping rules do not 228 account for the special status of GREEK SMALL LETTER FINAL SIGMA 229 (U+03C2), the nicknames in examples 5 and 7 or examples 6 and 7 would 230 not be matched. Regarding example 8: symbol characters such as BLACK 231 CHESS KING (U+265A) are allowed by the PRECIS FreeformClass and thus 232 can be used in nicknames. 234 The following examples illustrate strings that are not valid 235 nicknames because they violate the format defined above. 237 Table 2: A sample of strings that violate the nickname rules 239 +---------------------------------+---------------------------------+ 240 | # | Non-Nickname string | Notes | 241 +---------------------------------+---------------------------------+ 242 | 9 | < foo > | Leading and trailing spaces | 243 +---------------------------------+---------------------------------+ 244 | 10 | | Multiple spaces | 245 +---------------------------------+---------------------------------+ 246 | 10| <> | Zero-length string | 247 +---------------------------------+---------------------------------+ 249 4. Use in Application Protocols 251 This specification defines only the PRECIS-based rules for handling 252 of nickname strings. It is the responsibility of an application 253 protocol (e.g., MSRP, XCON, or XMPP) or application definition to 254 specify the protocol slots in which nickname strings can appear, the 255 entities that are expected to enforce the rules governing nickname 256 strings, and when in protocol processing or interface handling the 257 rules need to be enforced. See Section 6 of 258 [I-D.ietf-precis-framework] for guidelines about using PRECIS 259 profiles in applications. 261 Above and beyond the PRECIS-based rules specified here, application 262 protocols can also define application-specific rules governing 263 nickname strings (rules regarding the minimum or maximum length of 264 nicknames, further restrictions on allowable characters or character 265 ranges, safeguards to mitigate the effects of visually similar 266 characters, etc.). 268 Naturally, application protocols can also specify rules governing the 269 actual use of nicknames in applications (reserved nicknames, 270 authorization requirements for using nicknames, whether certain 271 nicknames can be prohibited, handling of duplicates, the relationship 272 between nicknames and underlying identifiers such as SIP URIs or 273 Jabber IDs, etc.). 275 Entities that enforce the rules specified in this document are 276 encouraged to be liberal in what they accept by following this 277 procedure: 279 1. Where possible, map characters (e.g, through width mapping, 280 additional mapping, case mapping, or normalization) and accept 281 the mapped string. 283 2. If mapping is not possible (e.g., because a character is 284 disallowed in the FreeformClass), reject the string. 286 5. IANA Considerations 288 The IANA shall add the following entry to the PRECIS Profiles 289 Registry: 291 Name: Nickname. 293 Base Class: FreeformClass. 295 Applicability: Nicknames in messaging and text conferencing 296 technologies; petnames for devices, accounts, and people; and 297 other uses of nicknames or petnames. 299 Replaces: None. 301 Width Mapping Rule: None (handled via NFKC). 303 Additional Mapping Rule: Map non-ASCII space characters to ASCII 304 space, strip leading and trailing space characters, map interior 305 sequences of multiple space characters to a single ASCII space. 307 Case Mapping Rule: For comparison purposes, map uppercase and 308 titlecase characters to lowercase using Unicode Default Case 309 Folding. 311 Normalization Rule: NFKC. 313 Directionality Rule: None. 315 Enforcement: To be specified by applications. 317 Specification: RFC XXXX. [Note to RFC Editor: please change "XXXX" 318 to the RFC number issued for this specification.] 320 6. Security Considerations 322 6.1. Reuse of PRECIS 324 The security considerations described in [I-D.ietf-precis-framework] 325 apply to the "FreeformClass" string class used in this document for 326 nicknames. 328 6.2. Reuse of Unicode 330 The security considerations described in [UTS39] apply to the use of 331 Unicode characters in nicknames. 333 6.3. Visually Similar Characters 335 [I-D.ietf-precis-framework] describes some of the security 336 considerations related to visually similar characters, also called 337 "confusable characters" or "confusables". 339 Although the mapping rules defined under Section 2 of this document 340 are designed in part to reduce the possibility of confusion about 341 nicknames, this document does not provide more detailed 342 recommendations regarding the handling of visually similar 343 characters, such as those provided in [UTS39]. 345 7. References 347 7.1. Normative References 349 [I-D.ietf-precis-framework] 350 Saint-Andre, P. and M. Blanchet, "Precis Framework: 351 Handling Internationalized Strings in Protocols", draft- 352 ietf-precis-framework-23 (work in progress), February 353 2015. 355 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 356 Requirement Levels", BCP 14, RFC 2119, March 1997. 358 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 359 10646", STD 63, RFC 3629, November 2003. 361 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 362 Internationalized Domain Names for Applications (IDNA)", 363 RFC 5893, August 2010. 365 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 366 6.3", 2013, 367 . 369 [UTS39] The Unicode Consortium, "Unicode Technical Standard #39: 370 Unicode Security Mechanisms", November 2013, 371 . 373 7.2. Informative References 375 [I-D.boulton-xcon-session-chat] 376 Barnes, M., Boulton, C., and S. Loreto, "Chatrooms within 377 a Centralized Conferencing (XCON) System", draft-boulton- 378 xcon-session-chat-08 (work in progress), July 2011. 380 [I-D.ietf-simple-chat] 381 Niemi, A., Garcia, M., and G. Sandbakken, "Multi-party 382 Chat Using the Message Session Relay Protocol (MSRP)", 383 draft-ietf-simple-chat-18 (work in progress), January 384 2013. 386 [RFC20] Cerf, V., "ASCII format for network interchange", RFC 20, 387 October 1969. 389 [RFC2811] Kalt, C., "Internet Relay Chat: Channel Management", RFC 390 2811, April 2000. 392 [RFC4975] Campbell, B., Mahy, R., and C. Jennings, "The Message 393 Session Relay Protocol (MSRP)", RFC 4975, September 2007. 395 [RFC5239] Barnes, M., Boulton, C., and O. Levin, "A Framework for 396 Centralized Conferencing", RFC 5239, June 2008. 398 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 399 Protocol (XMPP): Core", RFC 6120, March 2011. 401 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 402 Internationalization in the IETF", BCP 166, RFC 6365, 403 September 2011. 405 [XEP-0045] 406 Saint-Andre, P., "Multi-User Chat", XSF XEP 0045, February 407 2012. 409 [XEP-0172] 410 Saint-Andre, P. and V. Mercier, "User Nickname", XSF XEP 411 0172, March 2012. 413 Appendix A. Acknowledgements 415 Thanks to Kim Alvefur, Mary Barnes, Dave Cridland, Miguel Garcia, 416 Salvatore Loreto, and Enrico Marocco for their reviews and comments. 418 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for 419 employing him during his work on earlier versions of this document. 421 Author's Address 423 Peter Saint-Andre 424 &yet 426 Email: peter@andyet.com 427 URI: https://andyet.com/