idnits 2.17.1 draft-ietf-precis-nickname-14.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 (December 23, 2014) is 3410 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-21 -- 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 December 23, 2014 5 Expires: June 26, 2015 7 Preparation, Enforcement, and Comparison of Internationalized Strings 8 Representing Nicknames 9 draft-ietf-precis-nickname-14 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 June 26, 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 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: Applications MUST apply the "Bidi Rule" 176 defined in [RFC5893] to strings that contain right-to-left 177 characters (i.e., each of the six conditions of the Bidi Rule 178 must be satisfied). 180 2.3. Comparison 182 An entity that performs comparison of two strings according to this 183 profile MUST prepare each string and enforce the rules as specified 184 in the previous two sections. The two strings are to be considered 185 equivalent if they are an exact octet-for-octet match (sometimes 186 called "bit-string identity"). 188 3. Examples 190 The following examples illustrate a small number of nicknames that 191 are consistent with the format defined above, along with the output 192 string resulting from application of the PRECIS rules, which would be 193 used for comparison purposes (note that the characters < and > are 194 used to delineate the actual nickname and are not part of the 195 nickname strings). 197 Table 1: A sample of legal nicknames 199 +---------------------------+-----------------------------------+ 200 | # | Nickname | Output for Comparison | 201 +---------------------------+-----------------------------------+ 202 | 1 | | | 203 +---------------------------+-----------------------------------+ 204 | 2 | | | 205 +---------------------------+-----------------------------------+ 206 | 3 | | | 207 +---------------------------+-----------------------------------+ 208 | 4 | | | 209 +---------------------------+-----------------------------------+ 210 | 5 | <Σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 211 +---------------------------+-----------------------------------+ 212 | 6 | <σ> | GREEK SMALL LETTER SIGMA (U+03C3) | 213 +---------------------------+-----------------------------------+ 214 | 7 | <ς> | GREEK SMALL LETTER FINAL SIGMA | 215 | | | (U+03C2) | 216 +---------------------------+-----------------------------------+ 217 | 8 | <♚> | BLACK CHESS KING (U+265A) | 218 +---------------------------+-----------------------------------+ 220 Regarding examples 5, 6, and 7: case-mapping of GREEK CAPITAL LETTER 221 SIGMA (U+03A3) to lowercase (i.e., to GREEK SMALL LETTER SIGMA, 222 U+03C3) during comparison would result in matching the nicknames in 223 examples 5 and 6; however, because the PRECIS mapping rules do not 224 account for the special status of GREEK SMALL LETTER FINAL SIGMA 225 (U+03C2), the nicknames in examples 5 and 7 or examples 6 and 7 would 226 not be matched. Regarding example 8: symbol characters such as BLACK 227 CHESS KING (U+265A) are allowed by the PRECIS FreeformClass and thus 228 can be used in nicknames. 230 The following examples illustrate strings that are not valid 231 nicknames because they violate the format defined above. 233 Table 2: A sample of strings that violate the nickname rules 235 +---------------------------------+---------------------------------+ 236 | # | Non-Nickname string | Notes | 237 +---------------------------------+---------------------------------+ 238 | 9 | < foo > | Leading and trailing spaces | 239 +---------------------------------+---------------------------------+ 240 | 10 | | Multiple spaces | 241 +---------------------------------+---------------------------------+ 242 | 10| <> | Zero-length string | 243 +---------------------------------+---------------------------------+ 245 4. Use in Application Protocols 247 This specification defines only the PRECIS-based rules for handling 248 of nickname strings. It is the responsibility of an application 249 protocol (e.g., MSRP, XCON, or XMPP) or application definition to 250 specify the protocol slots in which nickname strings can appear, the 251 entities that are expected to enforce the rules governing nickname 252 strings, and when in protocol processing or interface handling the 253 rules need to be enforced. See Section 6 of 254 [I-D.ietf-precis-framework] for guidelines about using PRECIS 255 profiles in applications. 257 Above and beyond the PRECIS-based rules specified here, application 258 protocols can also define application-specific rules governing 259 nickname strings (rules regarding the minimum or maximum length of 260 nicknames, further restrictions on allowable characters or character 261 ranges, safeguards to mitigate the effects of visually similar 262 characters, etc.). 264 Naturally, application protocols can also specify rules governing the 265 actual use of nicknames in applications (reserved nicknames, 266 authorization requirements for using nicknames, whether certain 267 nicknames can be prohibited, handling of duplicates, the relationship 268 between nicknames and underlying identifiers such as SIP URIs or 269 Jabber IDs, etc.). 271 Entities that enforce the rules specified in this document are 272 encouraged to be liberal in what they accept by following this 273 procedure: 275 1. Where possible, map characters (e.g, through width mapping, 276 additional mapping, case mapping, or normalization) and accept 277 the mapped string. 279 2. If mapping is not possible (e.g., because a character is 280 disallowed in the FreeformClass), reject the string. 282 5. IANA Considerations 284 The IANA shall add the following entry to the PRECIS Profiles 285 Registry: 287 Name: Nickname. 289 Base Class: FreeformClass. 291 Applicability: Nicknames in messaging and text conferencing 292 technologies; petnames for devices, accounts, and people; and 293 other uses of nicknames or petnames. 295 Replaces: None. 297 Width Mapping Rule: None (handled via NFKC). 299 Additional Mapping Rule: Map non-ASCII space characters to ASCII 300 space, strip leading and trailing space characters, map interior 301 sequences of multiple space characters to a single ASCII space. 303 Case Mapping Rule: For comparison purposes, map uppercase and 304 titlecase characters to lowercase using Unicode Default Case 305 Folding. 307 Normalization Rule: NFKC. 309 Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies. 311 Enforcement: To be specified by applications. 313 Specification: RFC XXXX. [Note to RFC Editor: please change "XXXX" 314 to the RFC number issued for this specification.] 316 6. Security Considerations 318 6.1. Reuse of PRECIS 320 The security considerations described in [I-D.ietf-precis-framework] 321 apply to the "FreeformClass" string class used in this document for 322 nicknames. 324 6.2. Reuse of Unicode 326 The security considerations described in [UTS39] apply to the use of 327 Unicode characters in nicknames. 329 6.3. Visually Similar Characters 331 [I-D.ietf-precis-framework] describes some of the security 332 considerations related to visually similar characters, also called 333 "confusable characters" or "confusables". 335 Although the mapping rules defined under Section 2 of this document 336 are designed in part to reduce the possibility of confusion about 337 nicknames, this document does not provide more detailed 338 recommendations regarding the handling of visually similar 339 characters, such as those provided in [UTS39]. 341 7. References 343 7.1. Normative References 345 [I-D.ietf-precis-framework] 346 Saint-Andre, P. and M. Blanchet, "Precis Framework: 347 Handling Internationalized Strings in Protocols", draft- 348 ietf-precis-framework-21 (work in progress), December 349 2014. 351 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 352 Requirement Levels", BCP 14, RFC 2119, March 1997. 354 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 355 10646", STD 63, RFC 3629, November 2003. 357 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 358 Internationalized Domain Names for Applications (IDNA)", 359 RFC 5893, August 2010. 361 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 362 6.3", 2013, 363 . 365 [UTS39] The Unicode Consortium, "Unicode Technical Standard #39: 366 Unicode Security Mechanisms", November 2013, 367 . 369 7.2. Informative References 371 [I-D.boulton-xcon-session-chat] 372 Barnes, M., Boulton, C., and S. Loreto, "Chatrooms within 373 a Centralized Conferencing (XCON) System", draft-boulton- 374 xcon-session-chat-08 (work in progress), July 2011. 376 [I-D.ietf-simple-chat] 377 Niemi, A., Garcia, M., and G. Sandbakken, "Multi-party 378 Chat Using the Message Session Relay Protocol (MSRP)", 379 draft-ietf-simple-chat-18 (work in progress), January 380 2013. 382 [RFC20] Cerf, V., "ASCII format for network interchange", RFC 20, 383 October 1969. 385 [RFC2811] Kalt, C., "Internet Relay Chat: Channel Management", RFC 386 2811, April 2000. 388 [RFC4975] Campbell, B., Mahy, R., and C. Jennings, "The Message 389 Session Relay Protocol (MSRP)", RFC 4975, September 2007. 391 [RFC5239] Barnes, M., Boulton, C., and O. Levin, "A Framework for 392 Centralized Conferencing", RFC 5239, June 2008. 394 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 395 Protocol (XMPP): Core", RFC 6120, March 2011. 397 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 398 Internationalization in the IETF", BCP 166, RFC 6365, 399 September 2011. 401 [XEP-0045] 402 Saint-Andre, P., "Multi-User Chat", XSF XEP 0045, February 403 2012. 405 [XEP-0172] 406 Saint-Andre, P. and V. Mercier, "User Nickname", XSF XEP 407 0172, March 2012. 409 Appendix A. Acknowledgements 411 Thanks to Kim Alvefur, Mary Barnes, Dave Cridland, Miguel Garcia, 412 Salvatore Loreto, and Enrico Marocco for their reviews and comments. 414 Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for 415 employing him during his work on earlier versions of this document. 417 Author's Address 419 Peter Saint-Andre 420 &yet 422 Email: peter@andyet.com 423 URI: https://andyet.com/