draft-ietf-precis-7613bis-11.txt   rfc8265.txt 
Network Working Group P. Saint-Andre Internet Engineering Task Force (IETF) P. Saint-Andre
Internet-Draft Filament Request for Comments: 8265 Jabber.org
Obsoletes: 7613 (if approved) A. Melnikov Obsoletes: 7613 A. Melnikov
Intended status: Standards Track Isode Ltd Category: Standards Track Isode Ltd
Expires: January 26, 2018 July 25, 2017 ISSN: 2070-1721 October 2017
Preparation, Enforcement, and Comparison of Internationalized Strings Preparation, Enforcement, and Comparison of Internationalized Strings
Representing Usernames and Passwords Representing Usernames and Passwords
draft-ietf-precis-7613bis-11
Abstract Abstract
This document describes updated methods for handling Unicode strings This document describes updated methods for handling Unicode strings
representing usernames and passwords. The previous approach was representing usernames and passwords. The previous approach was
known as SASLprep (RFC 4013) and was based on stringprep (RFC 3454). known as SASLprep (RFC 4013) and was based on Stringprep (RFC 3454).
The methods specified in this document provide a more sustainable The methods specified in this document provide a more sustainable
approach to the handling of internationalized usernames and approach to the handling of internationalized usernames and
passwords. This document obsoletes RFC 7613. passwords. This document obsoletes RFC 7613.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on January 26, 2018. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8265.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
skipping to change at page 2, line 22 skipping to change at page 2, line 19
3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 5 3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. Case Mapping vs. Case Preservation . . . . . . . . . . . 6 3.2. Case Mapping vs. Case Preservation . . . . . . . . . . . 6
3.3. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 7 3.3. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 7
3.3.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.2. Preparation . . . . . . . . . . . . . . . . . . . . . 8 3.3.2. Preparation . . . . . . . . . . . . . . . . . . . . . 8
3.3.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 8 3.3.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 8
3.3.4. Comparison . . . . . . . . . . . . . . . . . . . . . 9 3.3.4. Comparison . . . . . . . . . . . . . . . . . . . . . 9
3.4. UsernameCasePreserved Profile . . . . . . . . . . . . . . 9 3.4. UsernameCasePreserved Profile . . . . . . . . . . . . . . 9
3.4.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 9 3.4.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4.2. Preparation . . . . . . . . . . . . . . . . . . . . . 10 3.4.2. Preparation . . . . . . . . . . . . . . . . . . . . . 9
3.4.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 10 3.4.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 10
3.4.4. Comparison . . . . . . . . . . . . . . . . . . . . . 10 3.4.4. Comparison . . . . . . . . . . . . . . . . . . . . . 10
3.5. Application-Layer Constructs . . . . . . . . . . . . . . 11 3.5. Application-Layer Constructs . . . . . . . . . . . . . . 11
3.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 11 3.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 11
4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 13 4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 13
4.2. OpaqueString Profile . . . . . . . . . . . . . . . . . . 14 4.2. OpaqueString Profile . . . . . . . . . . . . . . . . . . 14
4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 14 4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 14
4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 15 4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 14
4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 16 4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 15
4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 16 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 15
5. Use in Application Protocols . . . . . . . . . . . . . . . . 17 5. Use in Application Protocols . . . . . . . . . . . . . . . . 16
6. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.1. Usernames . . . . . . . . . . . . . . . . . . . . . . . . 18 6.1. Usernames . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 19 6.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 19
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
7.1. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 20 7.1. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 20
7.2. UsernameCasePreserved Profile . . . . . . . . . . . . . . 21 7.2. UsernameCasePreserved Profile . . . . . . . . . . . . . . 20
7.3. OpaqueString Profile . . . . . . . . . . . . . . . . . . 21 7.3. OpaqueString Profile . . . . . . . . . . . . . . . . . . 21
7.4. Stringprep Profile . . . . . . . . . . . . . . . . . . . 22 7.4. Stringprep Profile . . . . . . . . . . . . . . . . . . . 22
8. Security Considerations . . . . . . . . . . . . . . . . . . . 22 8. Security Considerations . . . . . . . . . . . . . . . . . . . 22
8.1. Password/Passphrase Strength . . . . . . . . . . . . . . 22 8.1. Password/Passphrase Strength . . . . . . . . . . . . . . 22
8.2. Password/Passphrase Comparison . . . . . . . . . . . . . 22 8.2. Password/Passphrase Comparison . . . . . . . . . . . . . 22
8.3. Identifier Comparison . . . . . . . . . . . . . . . . . . 23 8.3. Identifier Comparison . . . . . . . . . . . . . . . . . . 22
8.4. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 23 8.4. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 22
8.5. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . 23 8.5. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . 22
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 23
9.1. Normative References . . . . . . . . . . . . . . . . . . 23 9.1. Normative References . . . . . . . . . . . . . . . . . . 23
9.2. Informative References . . . . . . . . . . . . . . . . . 24 9.2. Informative References . . . . . . . . . . . . . . . . . 24
Appendix A. Changes from RFC 7613 . . . . . . . . . . . . . . . 25
Appendix A. Changes from RFC 7613 . . . . . . . . . . . . . . . 26 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 26
Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
1. Introduction 1. Introduction
Usernames and passwords are widely used for authentication and Usernames and passwords are widely used for authentication and
authorization on the Internet, either directly when provided in authorization on the Internet, either directly when provided in
plaintext (as in the PLAIN Simple Authentication and Security Layer plaintext (as in the PLAIN Simple Authentication and Security Layer
(SASL) mechanism [RFC4616] and the HTTP Basic scheme [RFC7617]) or (SASL) mechanism [RFC4616] and the HTTP Basic scheme [RFC7617]) or
indirectly when provided as the input to a cryptographic algorithm indirectly when provided as the input to a cryptographic algorithm
such as a hash function (as in the Salted Challenge Response such as a hash function (as in the Salted Challenge Response
Authentication Mechanism (SCRAM) SASL mechanism [RFC5802] and the Authentication Mechanism (SCRAM) SASL mechanism [RFC5802] and the
HTTP Digest scheme [RFC7616]). HTTP Digest scheme [RFC7616]).
To increase the likelihood that the input and comparison of usernames To increase the likelihood that the input and comparison of usernames
and passwords will work in ways that make sense for typical users and passwords will work in ways that make sense for typical users
throughout the world, this document defines rules for preparing, throughout the world, this document defines rules for handling
enforcing, and comparing internationalized strings that represent internationalized strings that represent usernames and passwords.
usernames and passwords. Such strings consist of code points from Such strings consist of code points from the Unicode coded character
the Unicode coded character set [Unicode], with special attention to set [Unicode], with special attention to code points outside the
code points outside the ASCII range [RFC20]. The rules for handling ASCII range [RFC20]. The rules for handling such strings are
such strings are specified through profiles of the string classes specified through profiles of the string classes defined in the
defined in the preparation, enforcement, and comparison of preparation, enforcement, and comparison of internationalized strings
internationalized strings (PRECIS) framework specification (PRECIS) framework specification [RFC8264].
[I-D.ietf-precis-7564bis].
Profiles of the PRECIS framework enable software to handle Unicode Profiles of the PRECIS framework enable software to handle Unicode
code points outside the ASCII range in an automated way, so that such code points outside the ASCII range in an automated way, so that such
code points are treated carefully and consistently in application code points are treated carefully and consistently in application
protocols. In large measure, these profiles are designed to protect protocols. In large measure, these profiles are designed to protect
application developers from the potentially negative consequences of application developers from the potentially negative consequences of
supporting the full range of Unicode code points. For instance, in supporting the full range of Unicode code points. For instance, in
almost all application protocols it would be dangerous to treat the almost all application protocols it would be dangerous to treat the
Unicode code point SUPERSCRIPT ONE (U+00B9) as equivalent to DIGIT Unicode code point "¹" (SUPERSCRIPT ONE, U+00B9) as equivalent to "1"
ONE (U+0031), because that would result in false accepts during (DIGIT ONE, U+0031), because that would result in false accepts
comparison, authentication, and authorization (e.g., an attacker during comparison, authentication, and authorization (e.g., an
could easy spoof an account "user1@example.com"). attacker could easily spoof an account "user1@example.com").
Whereas a naive use of Unicode would make such attacks trivially Whereas a naive use of Unicode would make such attacks trivially
easy, the PRECIS profile defined here for usernames generally easy, the PRECIS profile defined here for usernames generally
protects applications from inadvertently causing such problems. protects applications from inadvertently causing such problems.
(Similar considerations apply to passwords, although here it is (Similar considerations apply to passwords, although here it is
desirable to support a wider range of characters so as to maximize desirable to support a wider range of characters so as to maximize
entropy for purposes of authentication.) entropy for purposes of authentication.)
The methods defined here might be applicable wherever usernames or The methods defined here might be applicable wherever usernames or
passwords are used. However, the methods are not intended for use in passwords are used. However, the methods are not intended for use in
preparing strings that are not usernames (e.g., Lightweight Directory preparing strings that are not usernames (e.g., Lightweight Directory
Access Protocol (LDAP) distinguished names), nor in cases where Access Protocol (LDAP) distinguished names), nor in cases where
identifiers or secrets are not strings (e.g., keys and certificates) identifiers or secrets are not strings (e.g., keys and certificates)
or require specialized handling. or require specialized handling.
Although the historical predecessor of this document was the SASLprep Although the historical predecessor of this document was the SASLprep
profile of stringprep [RFC3454]), the approach defined here can be profile of Stringprep [RFC3454]), the approach defined here can be
used by technologies other than SASL [RFC4422], such as HTTP used by technologies other than SASL [RFC4422], such as HTTP
authentication as specified in [RFC7617] and [RFC7616]. authentication as specified in [RFC7617] and [RFC7616].
This document does not modify the handling of internationalized This document does not modify the handling of internationalized
strings in usernames and passwords as prescribed by existing strings in usernames and passwords as prescribed by existing
application protocols that use SASLprep. If the community that uses application protocols that use SASLprep. If the community that uses
such an application protocol wishes to modernize its handling of such an application protocol wishes to modernize its handling of
internationalized strings to use PRECIS instead of stringprep, it internationalized strings to use PRECIS instead of Stringprep, it
needs to explicitly update the existing application protocol needs to explicitly update the existing application protocol
definition (one example is [RFC7622]). Non-coordinated updates to definition (one example is [RFC7622]). Non-coordinated updates to
protocol implementations are discouraged because they can have a protocol implementations are discouraged because they can have a
negative impact on interoperability and security. negative impact on interoperability and security.
2. Terminology 2. Terminology
A "username" or "user identifier" is a string of characters A "username" or "user identifier" is a string of characters
designating an account on a computing device or system, often but not designating an account on a computing device or system, often but not
necessarily for use by a person. Although some devices and system necessarily for use by a person. Although some devices and systems
might allow a username to be part or all of a person's name, and a might allow a username to be part or all of a person's name and a
person might want their account designator to be part or all of their person might want their account designator to be part or all of their
name, because of the complexities involved that outcome is not name, because of the complexities involved, that outcome is not
guaranteed for all human names on all computing devices or systems guaranteed for all human names on all computing devices or systems
that follow the rules defined in this specification. Protocol that follow the rules defined in this specification. Protocol
designers and application developers who wish to allow a wider range designers and application developers who wish to allow a wider range
of characters are encouraged to consider a separation between more of characters are encouraged to consider a separation between more
restrictive account identifiers and more expressive display names. restrictive account identifiers and more expressive display names or
nicknames (see [RFC8266]).
A "password" is a string of characters that allows access to a A "password" is a string of characters that allows access to a
computing device or system, often associated with a particular computing device or system, often associated with a particular
username. A password is not literally limited to a word, because a username. A password is not literally limited to a word, because a
password could be a passphrase consisting of more than one word, password could be a passphrase consisting of more than one word,
perhaps separated by spaces, punctuation, or other non-alphanumeric perhaps separated by spaces, punctuation, or other non-alphanumeric
characters. characters.
Some SASL mechanisms (e.g., CRAM-MD5, DIGEST-MD5, and SCRAM) specify Some SASL mechanisms (e.g., CRAM-MD5, DIGEST-MD5, and SCRAM) specify
that the authentication identity used in the context of such that the authentication identity used in the context of such
mechanisms is a "simple user name" (see Section 2 of [RFC4422] as mechanisms is a "simple username" (see Section 2 of [RFC4422] as well
well as [RFC4013]). Various application technologies also assume as [RFC4013]). Various application technologies also assume that the
that the identity of a user or account takes the form of a username identity of a user or account takes the form of a username (e.g.,
(e.g., authentication for the Hypertext Transfer Protocol as authentication for the Hypertext Transfer Protocol as specified in
specified in [RFC7617] and [RFC7616]), whether or not they use SASL. [RFC7617] and [RFC7616]), whether or not they use SASL. Note well
that the exact form of a username in any particular SASL mechanism or
Note well that the exact form of a username in any particular SASL application technology is a matter for implementation and deployment;
mechanism or application technology is a matter for implementation note also that a username does not necessarily map to any particular
and deployment, and that a username does not necessarily map to any application identifier.
particular application identifier.
Many important terms used in this document are defined in [RFC5890], Many important terms used in this document are defined in [RFC5890],
[RFC6365], [I-D.ietf-precis-7564bis], and [Unicode]. The term "non- [RFC6365], [RFC8264], and [Unicode]. The term "non-ASCII space"
ASCII space" refers to any Unicode code point having a Unicode refers to any Unicode code point having a Unicode general category of
general category of "Zs", with the exception of U+0020 (here called "Zs", naturally with the exception of SPACE (U+0020).
"ASCII space").
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119]. BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Usernames 3. Usernames
3.1. Definition 3.1. Definition
This document specifies that a username is a string of Unicode code This document specifies that a username is a string of Unicode code
points [Unicode] that is structured as an ordered sequence of points [Unicode] that is structured as an ordered sequence of
"userparts" and expressed in a standard Unicode Encoding Form (such "userparts" and expressed in a standard Unicode Encoding Form (such
as UTF-8 [RFC3629]). A userpart is allowed to contain only code as UTF-8 [RFC3629]). A userpart is allowed to contain only code
points that are allowed by the PRECIS IdentifierClass defined in points that are allowed by the PRECIS IdentifierClass defined in
Section 4.2 of [I-D.ietf-precis-7564bis], and thus consists almost Section 4.2 of [RFC8264] and thus consists almost exclusively of
exclusively of letters and digits. A username can consist of a letters and digits. A username can consist of a single userpart or a
single userpart or a space-separated sequence of userparts. space-separated sequence of userparts.
The syntax for a username is defined as follows, using the Augmented The syntax for a username is defined as follows, using the Augmented
Backus-Naur Form (ABNF) [RFC5234]. Backus-Naur Form (ABNF) [RFC5234].
username = userpart *(1*SP userpart) username = userpart *(1*SP userpart)
userpart = 1*(idpoint) userpart = 1*(idpoint)
; ;
; an "idpoint" is a Unicode code point that ; an "idpoint" is a Unicode code point that
; can be contained in a string conforming to ; can be contained in a string conforming to
; the PRECIS IdentifierClass ; the PRECIS IdentifierClass
; ;
All code points and blocks not explicitly allowed in the PRECIS All code points and blocks not explicitly allowed in the PRECIS
IdentifierClass are disallowed; this includes private use code IdentifierClass are disallowed; this includes private-use code
points, surrogate code points, and the other code points and blocks points, surrogate code points, and the other code points and blocks
that were defined as "Prohibited Output" in [RFC4013]. In addition, that were defined as "Prohibited Output" in Section 2.3 of [RFC4013]
common constructions such as "user@example.com" (e.g., the Network (when corrected per [Err1812]). In addition, common constructions
Access Identifier from [RFC7542]) are allowed as usernames under this such as "user@example.com" (e.g., the Network Access Identifier from
specification, as they were under [RFC4013]. [RFC7542]) are allowed as usernames under this specification, as they
were under [RFC4013].
Implementation Note: The username construct defined in this Implementation Note: The username construct defined in this
document does not necessarily match what all deployed applications document does not necessarily match what all deployed applications
might refer to as a "username" or "userid" but instead provides a might refer to as a "username" or "userid" but instead provides a
relatively safe subset of Unicode code points that can be used in relatively safe subset of Unicode code points that can be used in
existing SASL mechanisms and in application protocols that use existing SASL mechanisms and in application protocols that use
SASL, and even in most application protocols that do not currently SASL, and even in most application protocols that do not currently
use SASL. use SASL.
A username MUST NOT be zero bytes in length. This rule is to be A username MUST NOT be zero bytes in length. This rule is to be
enforced after any normalization and mapping of code points. enforced after any normalization and mapping of code points.
This specification defines two profiles for usernames: the
UsernameCaseMapped profile performs case mapping, and the
UsernameCasePreserved performs case preservation (see further
discussion under Section 3.2).
In protocols that provide usernames as input to a cryptographic In protocols that provide usernames as input to a cryptographic
algorithm such as a hash function, the client will need to perform algorithm such as a hash function, the client will need to perform
enforcement of the rules for the UsernameCaseMapped or enforcement of the rules for the UsernameCaseMapped or
UsernameCasePreserved profile before applying the algorithm. UsernameCasePreserved profile before applying the algorithm.
This specification defines two profiles for usernames: one that
performs case mapping and one that performs case preservation (see
further discussion under Section 3.2).
3.2. Case Mapping vs. Case Preservation 3.2. Case Mapping vs. Case Preservation
In order to accommodate the widest range of username constructs in In order to accommodate the widest range of username constructs in
applications, this document defines two username profiles: applications, this document defines two username profiles:
UsernameCaseMapped and UsernameCasePreserved. These two profiles UsernameCaseMapped and UsernameCasePreserved. These two profiles
differ only in the Case-Mapping Rule and are otherwise identical. differ only in their use (or not) of the Case Mapping Rule and are
otherwise identical.
Case mapping is a matter for the application protocol, protocol Case mapping is a matter for the application protocol, protocol
implementation, or end deployment. In general, this document implementation, or end deployment. In general, this document
suggests that it is preferable to apply the UsernameCaseMapped suggests that it is preferable to apply the UsernameCaseMapped
profile and therefore perform case mapping, because not doing so can profile and therefore perform case mapping, because not doing so can
lead to false accepts during authentication and authorization (as lead to false accepts during authentication and authorization (as
described in [RFC6943]) and can result in confusion among end users, described in [RFC6943]) and can result in confusion among end users,
given the prevalence of case mapping in many existing protocols and given the prevalence of case mapping in many existing protocols and
applications. However, there can be good reasons to apply the applications. However, there can be good reasons to apply the
UsernameCasePreserved profile and thus not perform case mapping, such UsernameCasePreserved profile and thus not perform case mapping, such
skipping to change at page 7, line 5 skipping to change at page 6, line 51
o SASL mechanisms that follow the recommendations in this document o SASL mechanisms that follow the recommendations in this document
MUST specify whether and when case mapping is to be applied to MUST specify whether and when case mapping is to be applied to
authentication identifiers. Because case mapping results in authentication identifiers. Because case mapping results in
information loss, in order to retain that information for as long information loss, in order to retain that information for as long
as possible during processing, implementations SHOULD delay any as possible during processing, implementations SHOULD delay any
case mapping to the last possible moment, such as when doing a case mapping to the last possible moment, such as when doing a
lookup by username, performing username comparisons, or generating lookup by username, performing username comparisons, or generating
a cryptographic salt from a username (if the last possible moment a cryptographic salt from a username (if the last possible moment
happens on a server, then decisions about case mapping can be a happens on a server, then decisions about case mapping can be a
matter of deployment policy). In keeping with [RFC4422], SASL matter of service deployment policy). In keeping with [RFC4422],
mechanisms are not to apply this or any other profile to SASL mechanisms are not to apply this or any other profile to
authorization identifiers, only to authentication identifiers. authorization identifiers, only to authentication identifiers.
o Application protocols that use SASL (such as IMAP [RFC3501] and o Application protocols that use SASL (such as IMAP [RFC3501] and
the Extensible Messaging and Presence Protocol (XMPP) [RFC6120]) the Extensible Messaging and Presence Protocol (XMPP) [RFC6120])
and that directly reuse this profile MUST specify whether or not and that directly reuse this profile MUST specify whether or not
case mapping is to be applied to authorization identifiers. Such case mapping is to be applied to authorization identifiers. Such
"SASL application protocols" SHOULD delay any case-mapping of "SASL application protocols" SHOULD delay any case mapping of
authorization identifiers to the last possible moment, which authorization identifiers to the last possible moment, which
happens to necessarily be on the server side (this enables happens to necessarily be on the server side (this enables
decisions about case mapping to be a matter of deployment policy). decisions about case mapping to be a matter of service deployment
In keeping with [RFC4422], SASL application protocols are not to policy). In keeping with [RFC4422], SASL application protocols
apply this or any other profile to authentication identifiers, are not to apply this or any other profile to authentication
only to authorization identifiers. identifiers, only to authorization identifiers.
o Application protocols that do not use SASL (such as HTTP o Application protocols that do not use SASL (such as HTTP
authentication with the HTTP Basic and Digest schemes as specified authentication with the HTTP Basic and Digest schemes as specified
in [RFC7617] and [RFC7616]) but that directly reuse this profile in [RFC7617] and [RFC7616]) but that directly reuse this profile
MUST specify whether and when case mapping is to be applied to MUST specify whether and when case mapping is to be applied to
authentication identifiers or authorization identifiers, or both. authentication identifiers or authorization identifiers, or both.
Such "non-SASL application protocols" SHOULD delay any case Such "non-SASL application protocols" SHOULD delay any case
mapping to the last possible moment, such as when doing a lookup mapping to the last possible moment, such as when doing a lookup
by username, performing username comparisons, or generating a by username, performing username comparisons, or generating a
cryptographic salt from a username (if the last possible moment cryptographic salt from a username (if the last possible moment
happens on the server, then decisions about case mapping can be a happens on the server, then decisions about case mapping can be a
matter of deployment policy). matter of service deployment policy).
If the specification for a SASL mechanism, SASL application protocol, If the specification for a SASL mechanism, SASL application protocol,
or non-SASL application protocol uses the UsernameCaseMapped profile, or non-SASL application protocol uses the UsernameCaseMapped profile,
it MUST clearly describe whether case mapping is to be applied at the it MUST clearly describe whether case mapping is to be applied at the
level of the protocol itself, implementations thereof, or service level of the protocol itself, implementations thereof, or service
deployments (each of these approaches can be legitimate, depending on deployments (each of these approaches can be legitimate, depending on
the application in question). the application in question).
3.3. UsernameCaseMapped Profile 3.3. UsernameCaseMapped Profile
3.3.1. Rules 3.3.1. Rules
The following rules are defined for use within the UsernameCaseMapped The following rules are defined for use within the UsernameCaseMapped
profile of the PRECIS IdentifierClass. profile of the PRECIS IdentifierClass.
1. Width-Mapping Rule: Map fullwidth and halfwidth code points to 1. Width Mapping Rule: Map fullwidth and halfwidth code points to
their decomposition mappings (see Unicode Standard Annex #11 their decomposition mappings (see Unicode Standard Annex #11
[UAX11]). [UAX11]).
2. Additional Mapping Rule: There is no additional mapping rule. 2. Additional Mapping Rule: There is no additional mapping rule.
3. Case-Mapping Rule: Map uppercase and titlecase code points to 3. Case Mapping Rule: Map uppercase and titlecase code points to
their lowercase equivalents, preferably using the Unicode their lowercase equivalents, preferably using the Unicode
toLower() operation as defined in the Unicode Standard [Unicode]; toLowerCase() operation as defined in the Unicode Standard
see further discussion in Section 3.2. [Unicode]; see further discussion in Section 3.2.
4. Normalization Rule: Apply Unicode Normalization Form C (NFC) to 4. Normalization Rule: Apply Unicode Normalization Form C (NFC) to
all strings. all strings.
5. Directionality Rule: Apply the "Bidi Rule" defined in [RFC5893] 5. Directionality Rule: Apply the "Bidi Rule" defined in [RFC5893]
to strings that contain right-to-left code points (i.e., each of to strings that contain right-to-left code points (i.e., each of
the six conditions of the Bidi Rule must be satisfied); for the six conditions of the Bidi Rule must be satisfied); for
strings that do not contain right-to-left code points, there is strings that do not contain right-to-left code points, there is
no special processing for directionality. no special processing for directionality.
3.3.2. Preparation 3.3.2. Preparation
An entity that prepares an input string for subsequent enforcement An entity that prepares an input string for subsequent enforcement
according to this profile MUST proceed as follows (applying the steps according to this profile MUST proceed as follows (applying the steps
in the order shown). in the order shown).
1. Apply the width-mapping rule specified in Section 3.3.1. It is 1. Apply the width mapping rule specified in Section 3.3.1. It is
necessary to apply the rule at this point because otherwise the necessary to apply the rule at this point because otherwise the
PRECIS "HasCompat" category specified in Section 9.17 of PRECIS "HasCompat" category specified in Section 9.17 of
[I-D.ietf-precis-7564bis] would forbid fullwidth and halfwidth [RFC8264] would forbid fullwidth and halfwidth code points.
code points.
2. Ensure that the string consists only of Unicode code points that 2. Ensure that the string consists only of Unicode code points that
are explicitly allowed by the PRECIS IdentifierClass defined in are explicitly allowed by the PRECIS IdentifierClass defined in
Section 4.2 of [I-D.ietf-precis-7564bis]. Section 4.2 of [RFC8264].
3.3.3. Enforcement 3.3.3. Enforcement
An entity that performs enforcement according to this profile MUST An entity that performs enforcement according to this profile MUST
prepare an input string as described in Section 3.3.2 and MUST also prepare an input string as described in Section 3.3.2 and MUST also
apply the following rules specified in Section 3.3.1 in the order apply the following rules specified in Section 3.3.1 in the order
shown: shown:
1. Case-Mapping Rule 1. Case Mapping Rule
2. Normalization Rule 2. Normalization Rule
3. Directionality Rule 3. Directionality Rule
After all of the foregoing rules have been enforced, the entity MUST After all of the foregoing rules have been enforced, the entity MUST
ensure that the username is not zero bytes in length (this is done ensure that the username is not zero bytes in length (this is done
after enforcing the rules to prevent applications from mistakenly after enforcing the rules to prevent applications from mistakenly
omitting a username entirely, because when internationalized strings omitting a username entirely, because when internationalized strings
are accepted, a non-empty sequence of characters can result in a are accepted, a non-empty sequence of characters can result in a
skipping to change at page 9, line 23 skipping to change at page 9, line 21
3.3.4. Comparison 3.3.4. Comparison
An entity that performs comparison of two strings according to this An entity that performs comparison of two strings according to this
profile MUST prepare each string as specified in Section 3.3.2 and profile MUST prepare each string as specified in Section 3.3.2 and
then MUST enforce the rules specified in Section 3.3.3. The two then MUST enforce the rules specified in Section 3.3.3. The two
strings are to be considered equivalent if and only if they are an strings are to be considered equivalent if and only if they are an
exact octet-for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes called "bit-string identity").
Until an implementation determines whether two strings are to be Until an implementation determines whether two strings are to be
considered equivalent, it MUST NOT treat them as equivalent (in considered equivalent, it MUST NOT treat them as equivalent (in
particular, it MUST NOT assume that an input string conforms to the particular, it MUST NOT assume that two input strings are equivalent
rules before the comparison operation has been completed). before the comparison operation has been completed).
3.4. UsernameCasePreserved Profile 3.4. UsernameCasePreserved Profile
3.4.1. Rules 3.4.1. Rules
The following rules are defined for use within the The following rules are defined for use within the
UsernameCasePreserved profile of the PRECIS IdentifierClass. UsernameCasePreserved profile of the PRECIS IdentifierClass.
1. Width-Mapping Rule: Map fullwidth and halfwidth code points to 1. Width Mapping Rule: Map fullwidth and halfwidth code points to
their decomposition mappings (see Unicode Standard Annex #11 their decomposition mappings (see Unicode Standard Annex #11
[UAX11]). [UAX11]).
2. Additional Mapping Rule: There is no additional mapping rule. 2. Additional Mapping Rule: There is no additional mapping rule.
3. Case-Mapping Rule: There is no case-mapping rule. 3. Case Mapping Rule: There is no case mapping rule.
4. Normalization Rule: Apply Unicode Normalization Form C (NFC) to 4. Normalization Rule: Apply Unicode Normalization Form C (NFC) to
all strings. all strings.
5. Directionality Rule: Apply the "Bidi Rule" defined in [RFC5893] 5. Directionality Rule: Apply the "Bidi Rule" defined in [RFC5893]
to strings that contain right-to-left code points (i.e., each of to strings that contain right-to-left code points (i.e., each of
the six conditions of the Bidi Rule must be satisfied); for the six conditions of the Bidi Rule must be satisfied); for
strings that do not contain right-to-left code points, there is strings that do not contain right-to-left code points, there is
no special processing for directionality. no special processing for directionality.
3.4.2. Preparation 3.4.2. Preparation
An entity that prepares a string for subsequent enforcement according An entity that prepares a string for subsequent enforcement according
to this profile MUST proceed as follows (applying the steps in the to this profile MUST proceed as follows (applying the steps in the
order shown). order shown).
1. Apply the width-mapping rule specified in Section 3.3.1. It is 1. Apply the width mapping rule specified in Section 3.4.1. It is
necessary to apply the rule at this point because otherwise the necessary to apply the rule at this point because otherwise the
PRECIS "HasCompat" category specified in Section 9.17 of PRECIS "HasCompat" category specified in Section 9.17 of
[I-D.ietf-precis-7564bis] would forbid fullwidth and halfwidth [RFC8264] would forbid fullwidth and halfwidth code points.
code points.
2. Ensure that the string consists only of Unicode code points that 2. Ensure that the string consists only of Unicode code points that
are explicitly allowed by the PRECIS IdentifierClass defined in are explicitly allowed by the PRECIS IdentifierClass defined in
Section 4.2 of [I-D.ietf-precis-7564bis]. Section 4.2 of [RFC8264].
3.4.3. Enforcement 3.4.3. Enforcement
An entity that performs enforcement according to this profile MUST An entity that performs enforcement according to this profile MUST
prepare a string as described in Section 3.4.2 and MUST also apply prepare a string as described in Section 3.4.2 and MUST also apply
the following rules specified in Section 3.4.1 in the order shown: the following rules specified in Section 3.4.1 in the order shown:
1. Normalization Rule 1. Normalization Rule
2. Directionality Rule 2. Directionality Rule
skipping to change at page 11, line 7 skipping to change at page 10, line 48
3.4.4. Comparison 3.4.4. Comparison
An entity that performs comparison of two strings according to this An entity that performs comparison of two strings according to this
profile MUST prepare each string as specified in Section 3.4.2 and profile MUST prepare each string as specified in Section 3.4.2 and
then MUST enforce the rules specified in Section 3.4.3. The two then MUST enforce the rules specified in Section 3.4.3. The two
strings are to be considered equivalent if and only if they are an strings are to be considered equivalent if and only if they are an
exact octet-for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes called "bit-string identity").
Until an implementation determines whether two strings are to be Until an implementation determines whether two strings are to be
considered equivalent, it MUST NOT treat them as equivalent (in considered equivalent, it MUST NOT treat them as equivalent (in
particular, it MUST NOT assume that an input string conforms to the particular, it MUST NOT assume that two input strings are equivalent
rules before the comparison operation has been completed). before the comparison operation has been completed).
3.5. Application-Layer Constructs 3.5. Application-Layer Constructs
Both the UsernameCaseMapped and UsernameCasePreserved profiles enable Both the UsernameCaseMapped and UsernameCasePreserved profiles enable
an application protocol, implementation, or deployment to create an application protocol, implementation, or deployment to create
application-layer constructs such as a username that is a space- application-layer constructs such as a username that is a space-
separated set of userparts like "Firstname Middlename Lastname". separated set of userparts like "Firstname Middlename Lastname".
Although such a construct is not a profile of the PRECIS Such a construct is not a profile of the PRECIS IdentifierClass,
IdentifierClass (because U+0020 SPACE is not allowed in the because SPACE (U+0020) is not allowed in the IdentifierClass;
IdentifierClass), it can be created at the application layer because however, it can be created at the application layer because SPACE
U+0020 SPACE can be used as a separator between instances of the (U+0020) can be used as a separator between instances of the PRECIS
PRECIS IdentifierClass (e.g., userparts as defined in this IdentifierClass (e.g., userparts as defined in this specification).
specification).
3.6. Examples 3.6. Examples
The following examples illustrate a small number of userparts (not The following examples illustrate a small number of userparts (not
usernames) that are consistent with the format defined above (note usernames) that are consistent with the format defined above (note
that the characters "<" and ">" are used here to delineate the actual that the characters "<" and ">" are used here to delineate the actual
userparts and are not part of the userpart strings). userparts and are not part of the userpart strings).
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| # | Userpart | Notes | | # | Userpart | Notes |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 1 | <juliet@example.com> | The at-sign is allowed in the | | 1 | <juliet@example.com> | The "at" sign ("@") is allowed |
| | | PRECIS IdentifierClass | | | | in the PRECIS IdentifierClass |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 2 | <fussball> | | | 2 | <fussball> | |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 3 | <fu&#xDF;ball> | The third character is LATIN | | 3 | <fußball> | The third character is LATIN |
| | | SMALL LETTER SHARP S (U+00DF) | | | | SMALL LETTER SHARP S (U+00DF) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 4 | <&#x3C0;> | A userpart of GREEK SMALL | | 4 | <π> | A userpart of GREEK SMALL |
| | | LETTER PI (U+03C0) | | | | LETTER PI (U+03C0) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 5 | <&#x3A3;> | A userpart of GREEK CAPITAL | | 5 | <Σ> | A userpart of GREEK CAPITAL |
| | | LETTER SIGMA (U+03A3) | | | | LETTER SIGMA (U+03A3) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 6 | <&#x3C3;> | A userpart of GREEK SMALL | | 6 | <σ> | A userpart of GREEK SMALL |
| | | LETTER SIGMA (U+03C3) | | | | LETTER SIGMA (U+03C3) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 7 | <&#x3C2;> | A userpart of GREEK SMALL | | 7 | <ς> | A userpart of GREEK SMALL |
| | | LETTER FINAL SIGMA (U+03C2) | | | | LETTER FINAL SIGMA (U+03C2) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
Table 1: A Sample of Legal Userparts Table 1: A Sample of Legal Userparts
Several points are worth noting. Regarding examples 2 and 3: Regarding examples 2 and 3: although in German writing the character
although in German the character eszett (LATIN SMALL LETTER SHARP S eszett "ß" (LATIN SMALL LETTER SHARP S, U+00DF) can mostly be used
(U+00DF)) can mostly be used interchangeably with the two characters interchangeably with the two characters "ss", the userparts in these
"ss", the userparts in these examples are different and (if desired) examples are different and (if desired) a server would need to
a server would need to enforce a registration policy that disallows enforce a registration policy that disallows one of them if the other
one of them if the other is registered. Regarding examples 5, 6, and is registered.
7: optional case-mapping of GREEK CAPITAL LETTER SIGMA (U+03A3) to
lowercase (i.e., to GREEK SMALL LETTER SIGMA (U+03C3)) during Regarding examples 5, 6, and 7: optional case mapping of "Σ" (GREEK
comparison would result in matching the userparts in examples 5 and CAPITAL LETTER SIGMA, U+03A3) to the lowercase character "σ" (GREEK
6; however, because the PRECIS mapping rules do not account for the SMALL LETTER SIGMA, U+03C3) during comparison would result in
special status of GREEK SMALL LETTER FINAL SIGMA (U+03C2), the matching the userparts in examples 5 and 6; however, because the
userparts in examples 5 and 7 or examples 6 and 7 would not be PRECIS mapping rules do not account for the special status of the
matched during comparison. character "ς" (GREEK SMALL LETTER FINAL SIGMA, U+03C2), the userparts
in examples 5 and 7 or examples 6 and 7 would not be matched during
comparison.
The following examples illustrate strings that are not valid The following examples illustrate strings that are not valid
userparts (not usernames) because they violate the format defined userparts (not usernames) because they violate the format defined
above. above.
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| # | Non-Userpart String | Notes | | # | Non-Userpart String | Notes |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 8 | <foo bar> | Space (U+0020) is disallowed in | | 8 | <foo bar> | SPACE (U+0020) is disallowed in |
| | | the userpart | | | | the userpart |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 9 | <> | Zero-length userpart | | 9 | <> | Zero-length userpart |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 10| <henry&#x2163;> | The sixth character is ROMAN | | 10| <henryⅣ> | The sixth character is ROMAN |
| | | NUMERAL FOUR (U+2163) | | | | NUMERAL FOUR (U+2163) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 11| <&#x265A;> | A user part of BLACK CHESS KING | | 11| <∞> | A userpart of INFINITY (U+221E) |
| | | (U+265A) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
Table 2: A Sample of Strings That Violate the Userpart Rule Table 2: A Sample of Strings That Violate the Userpart Rules
Here again, several points are worth noting. Regarding example 8: Regarding example 8: although this is not a valid userpart, it is a
although this is not a valid userpart, it is a valid username because valid username because it is a space-separated sequence of userparts.
it is a space-separated sequence of userparts. Regarding example 10:
the Unicode code point ROMAN NUMERAL FOUR (U+2163) has a Regarding example 10: the character "Ⅳ" (ROMAN NUMERAL FOUR, U+2163)
compatibility equivalent of the string formed of LATIN CAPITAL LETTER has a compatibility equivalent of the characters "I" (LATIN CAPITAL
I (U+0049) and LATIN CAPITAL LETTER V (U+0056), but code points with LETTER I, U+0049) and "V" (LATIN CAPITAL LETTER V, U+0056), but code
compatibility equivalents are not allowed in the PRECIS points with compatibility equivalents are not allowed in the PRECIS
IdentifierClass. Regarding example 11: symbol characters such as
BLACK CHESS KING (U+265A) are not allowed in the PRECIS
IdentifierClass. IdentifierClass.
Regarding example 11: symbol characters such as "∞" (INFINITY,
U+221E) are not allowed in the PRECIS IdentifierClass.
4. Passwords 4. Passwords
4.1. Definition 4.1. Definition
This document specifies that a password is a string of Unicode code This document specifies that a password is a string of Unicode code
points [Unicode] that is conformant to the OpaqueString profile points [Unicode] that is conformant to the OpaqueString profile
(specified below) of the PRECIS FreeformClass defined in Section 4.3 (specified below) of the PRECIS FreeformClass defined in Section 4.3
of [I-D.ietf-precis-7564bis], and that is expressed in a standard of [RFC8264] and expressed in a standard Unicode Encoding Form (such
Unicode Encoding Form (such as UTF-8 [RFC3629]). as UTF-8 [RFC3629]).
The syntax for a password is defined as follows, using the Augmented The syntax for a password is defined as follows, using the Augmented
Backus-Naur Form (ABNF) [RFC5234]. Backus-Naur Form (ABNF) [RFC5234].
password = 1*(freepoint) password = 1*(freepoint)
; ;
; a "freepoint" is a Unicode code point that ; a "freepoint" is a Unicode code point that
; can be contained in a string conforming to ; can be contained in a string conforming to
; the PRECIS FreeformClass ; the PRECIS FreeformClass
; ;
All code points and blocks not explicitly allowed in the PRECIS All code points and blocks not explicitly allowed in the PRECIS
FreeformClass are disallowed; this includes private use code points, FreeformClass are disallowed; this includes private-use code points,
surrogate code points, and the other code points and blocks defined surrogate code points, and the other code points and blocks defined
as "Prohibited Output" in Section 2.3 of [RFC4013] (when corrected as "Prohibited Output" in Section 2.3 of [RFC4013] (when corrected
per [Err1812]). per [Err1812]).
A password MUST NOT be zero bytes in length. This rule is to be A password MUST NOT be zero bytes in length. This rule is to be
enforced after any normalization and mapping of code points. enforced after any normalization and mapping of code points.
Note: Some existing systems allow an empty string in places where Note: Some existing systems allow an empty string in places where
a password would be expected (e.g., command-line tools that might a password would be expected (e.g., command-line tools that might
be called from an automated script, or servers that might need to be called from an automated script, or servers that might need to
be restarted without human intervention). From the perspective of be restarted without human intervention). From the perspective of
this document (and RFC 4013 before it), these empty strings are this document (and RFC 4013 before it), these empty strings are
not passwords but are workarounds for the practical difficulty of not passwords but are workarounds for the practical difficulty of
using passwords in certain scenarios. The prohibition of zero- using passwords in certain scenarios.
length passwords is not a recommendation regarding password
strength (because a password of only one byte is highly insecure) Note: The prohibition of zero-length passwords is not a
but is meant to prevent applications from mistakenly omitting a recommendation regarding password strength (because a password of
password entirely; such an outcome is possible when only one byte is highly insecure) but is meant to prevent
internationalized strings are accepted, because a non-empty applications from mistakenly omitting a password entirely; such an
sequence of characters can result in a zero-length password after outcome is possible when internationalized strings are accepted,
canonicalization. because a non-empty sequence of characters can result in a zero-
length password after canonicalization.
In protocols that provide passwords as input to a cryptographic In protocols that provide passwords as input to a cryptographic
algorithm such as a hash function, the client will need to perform algorithm such as a hash function, the client will need to perform
enforcement of the rules for the OpaqueString profile before applying enforcement of the rules for the OpaqueString profile before applying
the algorithm, because the password is not available to the server in the algorithm, because the password is not available to the server in
plaintext form. plaintext form.
4.2. OpaqueString Profile 4.2. OpaqueString Profile
The definition of the OpaqueString profile is provided in the The definition of the OpaqueString profile is provided in the
following sections, including detailed information about preparation, following sections, including detailed information about preparation,
enforcement, and comparison (for details on the distinction between enforcement, and comparison (for details on the distinction between
these actions, refer to [I-D.ietf-precis-7564bis]). these actions, refer to [RFC8264]).
4.2.1. Preparation 4.2.1. Preparation
An entity that prepares a string according to this profile MUST An entity that prepares a string according to this profile MUST
ensure that the string consists only of Unicode code points that are ensure that the string consists only of Unicode code points that are
explicitly allowed by the FreeformClass base string class defined in explicitly allowed by the FreeformClass string class defined in
[I-D.ietf-precis-7564bis]. [RFC8264].
4.2.2. Enforcement 4.2.2. Enforcement
An entity that performs enforcement according to this profile MUST An entity that performs enforcement according to this profile MUST
prepare a string as described in Section 4.2.1 and MUST also apply prepare a string as described in Section 4.2.1 and MUST also apply
the rules specified below for the OpaqueString profile (these rules the rules specified below for the OpaqueString profile (these rules
MUST be applied in the order shown): MUST be applied in the order shown):
1. Width-Mapping Rule: Fullwidth and halfwidth code points MUST NOT 1. Width Mapping Rule: Fullwidth and halfwidth code points MUST NOT
be mapped to their decomposition mappings (see Unicode Standard be mapped to their decomposition mappings (see Unicode Standard
Annex #11 [UAX11]). Annex #11 [UAX11]).
2. Additional Mapping Rule: Any instances of non-ASCII space MUST be 2. Additional Mapping Rule: Any instances of non-ASCII space MUST be
mapped to ASCII space (U+0020); a non-ASCII space is any Unicode mapped to SPACE (U+0020); a non-ASCII space is any Unicode code
code point having a Unicode general category of "Zs" (with the point having a Unicode general category of "Zs", with the
exception of U+0020). As was the case in RFC 4013, the inclusion exception of SPACE (U+0020). As was the case in RFC 4013, the
of only ASCII space prevents confusion with various non-ASCII inclusion of only SPACE (U+0020) prevents confusion with various
space code points, many of which are difficult to reproduce non-ASCII space code points, many of which are difficult to
across different input methods. reproduce across different input methods.
3. Case-Mapping Rule: There is no case mapping rule (because mapping 3. Case Mapping Rule: There is no case mapping rule (because mapping
uppercase and titlecase code points to their lowercase uppercase and titlecase code points to their lowercase
equivalents would lead to false accepts and thus to reduced equivalents would lead to false accepts and thus to reduced
security). security).
4. Normalization Rule: Unicode Normalization Form C (NFC) MUST be 4. Normalization Rule: Unicode Normalization Form C (NFC) MUST be
applied to all strings. applied to all strings.
5. Directionality Rule: There is no directionality rule. The "Bidi 5. Directionality Rule: There is no directionality rule. The "Bidi
Rule" (defined in [RFC5893]) and similar rules are unnecessary Rule" (defined in [RFC5893]) and similar rules are unnecessary
and inapplicable to passwords, because they can reduce the and inapplicable to passwords, because they can reduce the
skipping to change at page 16, line 15 skipping to change at page 15, line 32
4.2.3. Comparison 4.2.3. Comparison
An entity that performs comparison of two strings according to this An entity that performs comparison of two strings according to this
profile MUST prepare each string as specified in Section 4.2.1 and profile MUST prepare each string as specified in Section 4.2.1 and
then MUST enforce the rules specified in Section 4.2.2. The two then MUST enforce the rules specified in Section 4.2.2. The two
strings are to be considered equivalent if and only if they are an strings are to be considered equivalent if and only if they are an
exact octet-for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes called "bit-string identity").
Until an implementation determines whether two strings are to be Until an implementation determines whether two strings are to be
considered equivalent, it MUST NOT treat them as equivalent (in considered equivalent, it MUST NOT treat them as equivalent (in
particular, it MUST NOT assume that an input string conforms to the particular, it MUST NOT assume that two input strings are equivalent
rules before the comparison operation has been completed). before the comparison operation has been completed).
See Section 8.2 regarding comparison of passwords and passphrases. See Section 8.2 regarding comparison of passwords and passphrases.
4.3. Examples 4.3. Examples
The following examples illustrate a small number of passwords that The following examples illustrate a small number of passwords that
are consistent with the format defined above (note that the are consistent with the format defined above (note that the
characters "<" and ">" are used here to delineate the actual characters "<" and ">" are used here to delineate the actual
passwords and are not part of the password strings). passwords and are not part of the password strings).
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| # | Password | Notes | | # | Password | Notes |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 12| <correct horse battery staple> | ASCII space is allowed | | 12| <correct horse battery staple> | SPACE (U+0020) is allowed |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 13| <Correct Horse Battery Staple> | Differs by case from | | 13| <Correct Horse Battery Staple> | Differs by case from |
| | | example 12 | | | | example 12 |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 14| <&#x3C0;&#xDF;&#xE5;> | Non-ASCII letters are OK | | 14| <πßå> | Non-ASCII letters are OK |
| | | (e.g., GREEK SMALL LETTER | | | | (e.g., GREEK SMALL LETTER |
| | | PI (U+03C0)) | | | | PI (U+03C0)) |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 15| <Jack of &#x2666;s> | Symbols are OK (e.g., BLACK | | 15| <Jack of ♦s> | Symbols are OK (e.g., BLACK |
| | | DIAMOND SUIT (U+2666)) | | | | DIAMOND SUIT (U+2666)) |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 16| <foo&#x1680;bar> | OGHAM SPACE MARK (U+1680) is | | 16| <foo bar> | OGHAM SPACE MARK (U+1680) is |
| | | mapped to U+0020, and thus | | | | mapped to SPACE (U+0020); |
| | | the full string is mapped to | | | | thus, the full string is |
| | | <foo bar> | | | | mapped to <foo bar> |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
Table 3: A Sample of Legal Passwords Table 3: A Sample of Legal Passwords
The following example illustrates a string that is not a valid The following examples illustrate strings that are not valid
password because it violates the format defined above. passwords because they violate the format defined above.
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| # | Password | Notes | | # | Password | Notes |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 17| <> | Zero-length passwords are | | 17| <> | Zero-length passwords are |
| | | disallowed | | | | disallowed |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
| 18| <my cat is a &#x9;by> | Control characters like TAB | | 18| <my cat is a &#x9;by> | Control characters like TAB |
| | | are disallowed | | | | (U+0009) are disallowed |
+------------------------------------+------------------------------+ +------------------------------------+------------------------------+
Table 4: A Sample of Strings That Violate the Password Rules Table 4: A Sample of Strings That Violate the Password Rules
Note: Following the "XML Notation" used in [RFC3987], the character
TAB (U+0009) in example 18 is represented as &#x9 because otherwise
it could not be shown in running text.
5. Use in Application Protocols 5. Use in Application Protocols
This specification defines only the PRECIS-based rules for the This specification defines only the PRECIS-based rules for the
handling of strings conforming to the UsernameCaseMapped and handling of strings conforming to the UsernameCaseMapped and
UsernameCasePreserved profiles of the PRECIS IdentifierClass, and UsernameCasePreserved profiles of the PRECIS IdentifierClass, and
strings conforming to the OpaqueString profile of the PRECIS strings conforming to the OpaqueString profile of the PRECIS
FreeformClass. It is the responsibility of an application protocol FreeformClass. It is the responsibility of an application protocol
to specify the protocol slots in which such strings can appear, the to specify the protocol slots in which such strings can appear, the
entities that are expected to enforce the rules governing such entities that are expected to enforce the rules governing such
strings, and at what points during protocol processing or interface strings, and at what points during protocol processing or interface
handling the rules need to be enforced. See Section 6 of handling the rules need to be enforced. See Section 6 of [RFC8264]
[I-D.ietf-precis-7564bis] for guidelines on using PRECIS profiles in for guidelines on using PRECIS profiles in applications.
applications.
Above and beyond the PRECIS-based rules specified here, application Above and beyond the PRECIS-based rules specified here, application
protocols can also define application-specific rules governing such protocols can also define application-specific rules governing such
strings (rules regarding minimum or maximum length, further strings (rules regarding minimum or maximum length, further
restrictions on allowable code points or character ranges, safeguards restrictions on allowable code points or character ranges, safeguards
to mitigate the effects of visually similar characters, etc.), to mitigate the effects of visually similar characters, etc.),
application-layer constructs (see Section 3.5), and related matters. application-layer constructs (see Section 3.5), and related matters.
Some PRECIS profile definitions encourage entities that enforce the Some PRECIS profile definitions encourage entities that enforce the
rules to be liberal in what they accept. However, for usernames and rules to be liberal in what they accept. However, for usernames and
passwords such a policy can be problematic, because it can lead to passwords such a policy can be problematic, because it can lead to
false accepts. An in-depth discussion can be found in [RFC6943]. false accepts. An in-depth discussion can be found in [RFC6943].
Applying the rules for any given PRECIS profile is not necessarily an Applying the rules for any given PRECIS profile is not necessarily an
idempotent procedure for all code points. Therefore, an idempotent procedure for all code points. Therefore, an
implementation SHOULD apply the rules repeatedly until the output implementation SHOULD apply the rules repeatedly until the output
string is stable; if the output string does not stabilize after string is stable; if the output string does not stabilize after
reapplying the rules three (3) additional times, the implementation reapplying the rules three (3) additional times after the first
SHOULD terminate application of the rules and reject the input string application, the implementation SHOULD terminate application of the
as invalid. rules and reject the input string as invalid.
6. Migration 6. Migration
The rules defined in this specification differ slightly from those The rules defined in this specification differ slightly from those
defined by the SASLprep specification [RFC4013] (but not from defined by the SASLprep specification [RFC4013] (but not from
[RFC7613]). In order to smooth the process of migrating from [RFC7613]). In order to smooth the process of migrating from
SASLprep to the approach defined herein, the following sections SASLprep to the approach defined herein, the following sections
describe these differences, along with their implications for describe these differences, along with their implications for
migration, in more detail. migration, in more detail.
skipping to change at page 18, line 31 skipping to change at page 18, line 9
(NFKC), whereas the UsernameCaseMapped and UsernameCasePreserved (NFKC), whereas the UsernameCaseMapped and UsernameCasePreserved
profiles employ Unicode Normalization Form C (NFC). In practice, profiles employ Unicode Normalization Form C (NFC). In practice,
this change is unlikely to cause significant problems, because this change is unlikely to cause significant problems, because
NFKC provides methods for mapping Unicode code points with NFKC provides methods for mapping Unicode code points with
compatibility equivalents to those equivalents, whereas the PRECIS compatibility equivalents to those equivalents, whereas the PRECIS
IdentifierClass entirely disallows Unicode code points with IdentifierClass entirely disallows Unicode code points with
compatibility equivalents (i.e., during comparison, NFKC is more compatibility equivalents (i.e., during comparison, NFKC is more
"aggressive" about finding matches than NFC). A few examples "aggressive" about finding matches than NFC). A few examples
might suffice to indicate the nature of the problem: might suffice to indicate the nature of the problem:
1. LATIN SMALL LETTER LONG S (U+017F) is compatibility equivalent 1. "ſ" (LATIN SMALL LETTER LONG S, U+017F) is compatibility
to LATIN SMALL LETTER S (U+0073). equivalent to "s" (LATIN SMALL LETTER S, U+0073).
2. ROMAN NUMERAL FOUR (U+2163) is compatibility equivalent to 2. "Ⅳ" (ROMAN NUMERAL FOUR, U+2163) is compatibility equivalent
LATIN CAPITAL LETTER I (U+0049) and LATIN CAPITAL LETTER V to "I" (LATIN CAPITAL LETTER I, U+0049) and "V" (LATIN CAPITAL
(U+0056). LETTER V, U+0056).
3. LATIN SMALL LIGATURE FI (U+FB01) is compatibility equivalent 3. "fi" (LATIN SMALL LIGATURE FI, U+FB01) is compatibility
to LATIN SMALL LETTER F (U+0066) and LATIN SMALL LETTER I equivalent to "f" (LATIN SMALL LETTER F, U+0066) and "i"
(U+0069). (LATIN SMALL LETTER I, U+0069).
Under SASLprep, the use of NFKC also handled the mapping of Under SASLprep, the use of NFKC also handled the mapping of
fullwidth and halfwidth code points to their decomposition fullwidth and halfwidth code points to their decomposition
mappings. mappings.
For migration purposes, operators might want to search their For migration purposes, operators might want to search their
database of usernames for names containing Unicode code points database of usernames for names containing Unicode code points
with compatibility equivalents and, where there is no conflict, with compatibility equivalents and, where there is no conflict,
map those code points to their equivalents. Naturally, it is map those code points to their equivalents. Naturally, it is
possible that during this process the operator will discover possible that during this process the operator will discover
conflicting usernames (e.g., HENRYIV with the last two code points conflicting usernames; for instance, "HENRYIV" with the last two
being LATIN CAPITAL LETTER I (U+0049) and LATIN CAPITAL LETTER V code points being LATIN CAPITAL LETTER I (U+0049) and LATIN
(U+0056) vs. "HENRYIV" with the last character being ROMAN NUMERAL CAPITAL LETTER V (U+0056) as opposed to "HENRYⅣ" with the last
FOUR (U+2163), which is compatibility equivalent to U+0049 and character being "Ⅳ" (ROMAN NUMERAL FOUR, U+2163), which is
U+0056); in these cases, the operator will need to determine how compatibility equivalent to U+0049 and U+0056). In these cases,
to proceed -- for instance, by disabling the account whose name the operator will need to determine how to proceed, for instance,
contains a Unicode code point with a compatibility equivalent. by disabling the account whose name contains a Unicode code point
Such cases are probably rare, but it is important for operators to with a compatibility equivalent. Such cases are probably rare,
be aware of them. but it is important for operators to be aware of them.
o SASLprep mapped the "characters commonly mapped to nothing" from o SASLprep mapped the "characters commonly mapped to nothing" (from
Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS
IdentifierClass entirely disallows most of these code points, IdentifierClass entirely disallows most of these code points,
which correspond to the code points from the PRECIS "M" category which correspond to the code points from the PRECIS "M" category
defined under Section 9.13 of [I-D.ietf-precis-7564bis]. For defined under Section 9.13 of [RFC8264]. For migration purposes,
migration purposes, the operator might want to remove from the operator might want to remove from usernames any code points
usernames any code points contained in the PRECIS "M" category contained in the PRECIS "M" category (e.g., SOFT HYPHEN (U+00AD)).
(e.g., SOFT HYPHEN (U+00AD)). Because these code points would Because these code points would have been "mapped to nothing" in
have been "mapped to nothing" in stringprep, in practice a user Stringprep, in practice a user would not notice the difference if,
would not notice the difference if, upon migration to PRECIS, the upon migration to PRECIS, the code points are removed.
code points are removed.
o SASLprep allowed uppercase and titlecase code points, whereas the o SASLprep allowed uppercase and titlecase code points, whereas the
UsernameCaseMapped profile maps uppercase and titlecase code UsernameCaseMapped profile maps uppercase and titlecase code
points to their lowercase equivalents (by contrast, the points to their lowercase equivalents (by contrast, the
UsernameCasePreserved profile matches SASLprep in this regard). UsernameCasePreserved profile matches SASLprep in this regard).
For migration purposes, the operator can use either the For migration purposes, the operator can use either the
UsernameCaseMapped profile (thus losing the case information) or UsernameCaseMapped profile (thus losing the case information) or
the UsernameCasePreserved profile (thus ignoring case difference the UsernameCasePreserved profile (thus ignoring case difference
when comparing usernames). when comparing usernames).
skipping to change at page 19, line 50 skipping to change at page 19, line 28
o SASLprep specified the use of Unicode Normalization Form KC o SASLprep specified the use of Unicode Normalization Form KC
(NFKC), whereas the OpaqueString profile employs Unicode (NFKC), whereas the OpaqueString profile employs Unicode
Normalization Form C (NFC). Because NFKC is more aggressive about Normalization Form C (NFC). Because NFKC is more aggressive about
finding matches than NFC, in practice this change is unlikely to finding matches than NFC, in practice this change is unlikely to
cause significant problems and indeed has the security benefit of cause significant problems and indeed has the security benefit of
probably resulting in fewer false accepts when comparing probably resulting in fewer false accepts when comparing
passwords. A few examples might suffice to indicate the nature of passwords. A few examples might suffice to indicate the nature of
the problem: the problem:
1. LATIN SMALL LETTER LONG S (U+017F) is compatibility equivalent 1. "ſ" (LATIN SMALL LETTER LONG S, U+017F) is compatibility
to LATIN SMALL LETTER S (U+0073). equivalent to "s" (LATIN SMALL LETTER S, U+0073).
2. ROMAN NUMERAL FOUR (U+2163) is compatibility equivalent to 2. "Ⅳ" (ROMAN NUMERAL FOUR, U+2163) is compatibility equivalent
LATIN CAPITAL LETTER I (U+0049) and LATIN CAPITAL LETTER V to "I" (LATIN CAPITAL LETTER I, U+0049) and "V" (LATIN CAPITAL
(U+0056). LETTER V, U+0056).
3. LATIN SMALL LIGATURE FI (U+FB01) is compatibility equivalent 3. "fi" (LATIN SMALL LIGATURE FI, U+FB01) is compatibility
to LATIN SMALL LETTER F (U+0066) and LATIN SMALL LETTER I equivalent to "f" (LATIN SMALL LETTER F, U+0066) and "i"
(U+0069). (LATIN SMALL LETTER I, U+0069).
Under SASLprep, the use of NFKC also handled the mapping of Under SASLprep, the use of NFKC also handled the mapping of
fullwidth and halfwidth code points to their decomposition fullwidth and halfwidth code points to their decomposition
mappings. Although it is expected that code points with mappings. Although it is expected that code points with
compatibility equivalents are rare in existing passwords, some compatibility equivalents are rare in existing passwords, some
passwords that matched when SASLprep was used might no longer work passwords that matched when SASLprep was used might no longer work
when the rules in this specification are applied. when the rules in this specification are applied.
o SASLprep mapped the "characters commonly mapped to nothing" from o SASLprep mapped the "characters commonly mapped to nothing" (from
Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS
FreeformClass entirely disallows such code points, which FreeformClass entirely disallows such code points, which
correspond to the code points from the PRECIS "M" category defined correspond to the code points from the PRECIS "M" category defined
under Section 9.13 of [I-D.ietf-precis-7564bis]. In practice, under Section 9.13 of [RFC8264]. In practice, this change will
this change will probably have no effect on comparison, but user- probably have no effect on comparison, but user-oriented software
oriented software might reject such code points instead of might reject such code points instead of ignoring them during
ignoring them during password preparation. password preparation.
7. IANA Considerations 7. IANA Considerations
IANA has made the updates described below. IANA has made the updates described below.
7.1. UsernameCaseMapped Profile 7.1. UsernameCaseMapped Profile
IANA has added the following entry to the "PRECIS Profiles" registry. IANA has added the following entry to the "PRECIS Profiles" registry.
Name: UsernameCaseMapped. Name: UsernameCaseMapped.
Base Class: IdentifierClass. Base Class: IdentifierClass.
Applicability: Usernames in security and application protocols. Applicability: Usernames in security and application protocols.
Replaces: The SASLprep profile of stringprep. Replaces: The SASLprep profile of Stringprep.
Width-Mapping Rule: Map fullwidth and halfwidth code points to their Width Mapping Rule: Map fullwidth and halfwidth code points to their
decomposition mappings. decomposition mappings.
Additional Mapping Rule: None. Additional Mapping Rule: None.
Case-Mapping Rule: Map uppercase and titlecase code points to Case Mapping Rule: Map uppercase and titlecase code points to
lowercase. lowercase.
Normalization Rule: NFC. Normalization Rule: NFC.
Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies. Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies.
Enforcement: To be defined by security or application protocols that Enforcement: To be defined by security or application protocols that
use this profile. use this profile.
Specification: [[this document]], Section 3.2. Specification: Section 3.3 of RFC 8265.
7.2. UsernameCasePreserved Profile 7.2. UsernameCasePreserved Profile
IANA has added the following entry to the "PRECIS Profiles" registry. IANA has added the following entry to the "PRECIS Profiles" registry.
Name: UsernameCasePreserved. Name: UsernameCasePreserved.
Base Class: IdentifierClass. Base Class: IdentifierClass.
Applicability: Usernames in security and application protocols. Applicability: Usernames in security and application protocols.
Replaces: The SASLprep profile of stringprep. Replaces: The SASLprep profile of Stringprep.
Width-Mapping Rule: Map fullwidth and halfwidth code points to their Width Mapping Rule: Map fullwidth and halfwidth code points to their
decomposition mappings. decomposition mappings.
Additional Mapping Rule: None. Additional Mapping Rule: None.
Case-Mapping Rule: None. Case Mapping Rule: None.
Normalization Rule: NFC. Normalization Rule: NFC.
Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies. Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies.
Enforcement: To be defined by security or application protocols that Enforcement: To be defined by security or application protocols that
use this profile. use this profile.
Specification: [[this document]], Section 3.3. Specification: Section 3.4 of RFC 8265.
7.3. OpaqueString Profile 7.3. OpaqueString Profile
IANA has added the following entry to the "PRECIS Profiles" registry. IANA has added the following entry to the "PRECIS Profiles" registry.
Name: OpaqueString. Name: OpaqueString.
Base Class: FreeformClass. Base Class: FreeformClass.
Applicability: Passwords and other opaque strings in security and Applicability: Passwords and other opaque strings in security and
application protocols. application protocols.
Replaces: The SASLprep profile of stringprep. Replaces: The SASLprep profile of Stringprep.
Width-Mapping Rule: None. Width Mapping Rule: None.
Additional Mapping Rule: Map non-ASCII space code points to ASCII Additional Mapping Rule: Map non-ASCII space code points to SPACE
space. (U+0020).
Case-Mapping Rule: None. Case Mapping Rule: None.
Normalization Rule: NFC. Normalization Rule: NFC.
Directionality Rule: None. Directionality Rule: None.
Enforcement: To be defined by security or application protocols that Enforcement: To be defined by security or application protocols that
use this profile. use this profile.
Specification: [[this document]], Section 4.2. Specification: Section 4.2 of RFC 8265.
7.4. Stringprep Profile 7.4. Stringprep Profile
The stringprep specification [RFC3454] did not provide for entries in The Stringprep specification [RFC3454] did not provide for entries in
the "Stringprep Profiles" registry to have any state except "Current" the "Stringprep Profiles" registry to have any state except "Current"
or "Not Current". Because RFC 7613 obsoleted RFC 4013, which or "Not Current". Because RFC 7613 obsoleted RFC 4013, which
registered the SASLprep profile of stringprep, IANA previously marked registered the SASLprep profile of Stringprep, IANA previously marked
that profile as "Not Current" and cited RFC 7613 as an additional that profile as "Not Current" and cited RFC 7613 as an additional
reference. IANA is requested to modify the profile so that this reference. IANA has modified the profile so that the current
document is cited at the additional reference. document is now cited as the additional reference.
8. Security Considerations 8. Security Considerations
8.1. Password/Passphrase Strength 8.1. Password/Passphrase Strength
The ability to include a wide range of characters in passwords and The ability to include a wide range of characters in passwords and
passphrases can increase the potential for creating a strong password passphrases can increase the potential for creating a strong password
with high entropy. However, in practice, the ability to include such with high entropy. However, in practice, the ability to include such
characters ought to be weighed against the possible need to reproduce characters ought to be weighed against the possible need to reproduce
them on various devices using various input methods. them on various devices using various input methods.
skipping to change at page 23, line 7 skipping to change at page 22, line 37
In systems that conform to modern best practices for security, In systems that conform to modern best practices for security,
verification of passwords during authentication will not use the verification of passwords during authentication will not use the
comparison defined in Section 4.2.3. Instead, because the system comparison defined in Section 4.2.3. Instead, because the system
performs cryptographic calculations to verify the password, it will performs cryptographic calculations to verify the password, it will
prepare the password as defined in Section 4.2.1 and enforce the prepare the password as defined in Section 4.2.1 and enforce the
rules as defined in Section 4.2.2 before performing the relevant rules as defined in Section 4.2.2 before performing the relevant
calculations. calculations.
8.3. Identifier Comparison 8.3. Identifier Comparison
The process of comparing identifiers (such as SASL simple user names, The process of comparing identifiers (such as SASL simple usernames,
authentication identifiers, and authorization identifiers) can lead authentication identifiers, and authorization identifiers) can lead
to either false rejects or false accepts, both of which have security to either false rejects or false accepts, both of which have security
implications. A more detailed discussion can be found in [RFC6943]. implications. A more detailed discussion can be found in [RFC6943].
8.4. Reuse of PRECIS 8.4. Reuse of PRECIS
The security considerations described in [I-D.ietf-precis-7564bis] The security considerations described in [RFC8264] apply to the
apply to the IdentifierClass and FreeformClass base string classes IdentifierClass and FreeformClass string classes used in this
used in this document for usernames and passwords, respectively. document for usernames and passwords, respectively.
8.5. Reuse of Unicode 8.5. Reuse of Unicode
The security considerations described in [UTS39] apply to the use of The security considerations described in [UTS39] apply to the use of
Unicode code points in usernames and passwords. Unicode code points in usernames and passwords.
9. References 9. References
9.1. Normative References 9.1. Normative References
[I-D.ietf-precis-7564bis]
Saint-Andre, P. and M. Blanchet, "PRECIS Framework:
Preparation, Enforcement, and Comparison of
Internationalized Strings in Application Protocols",
draft-ietf-precis-7564bis-10 (work in progress), July
2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <http://www.rfc-editor.org/info/rfc3629>. 2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008, DOI 10.17487/RFC5234, January 2008,
<http://www.rfc-editor.org/info/rfc5234>. <https://www.rfc-editor.org/info/rfc5234>.
[RFC5890] Klensin, J., "Internationalized Domain Names for [RFC5890] Klensin, J., "Internationalized Domain Names for
Applications (IDNA): Definitions and Document Framework", Applications (IDNA): Definitions and Document Framework",
RFC 5890, DOI 10.17487/RFC5890, August 2010, RFC 5890, DOI 10.17487/RFC5890, August 2010,
<http://www.rfc-editor.org/info/rfc5890>. <https://www.rfc-editor.org/info/rfc5890>.
[RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in
Internationalization in the IETF", BCP 166, RFC 6365, Internationalization in the IETF", BCP 166, RFC 6365,
DOI 10.17487/RFC6365, September 2011, DOI 10.17487/RFC6365, September 2011,
<http://www.rfc-editor.org/info/rfc6365>. <https://www.rfc-editor.org/info/rfc6365>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8264] Saint-Andre, P. and M. Blanchet, "PRECIS Framework:
Preparation, Enforcement, and Comparison of
Internationalized Strings in Application Protocols",
RFC 8264, DOI 10.17487/RFC8264, October 2017,
<https://www.rfc-editor.org/info/rfc8264>.
[UAX11] Unicode Standard Annex #11, "East Asian Width", edited by [UAX11] Unicode Standard Annex #11, "East Asian Width", edited by
Ken Lunde. An integral part of The Unicode Standard, Ken Lunde. An integral part of The Unicode Standard,
<http://unicode.org/reports/tr11/>. <http://unicode.org/reports/tr11/>.
[Unicode] The Unicode Consortium, "The Unicode Standard", [Unicode] The Unicode Consortium, "The Unicode Standard",
<http://www.unicode.org/versions/latest/>. <http://www.unicode.org/versions/latest/>.
9.2. Informative References 9.2. Informative References
[Err1812] RFC Errata, "Erratum ID 1812", RFC 4013, [Err1812] RFC Errata, Erratum ID 1812, RFC 4013,
<http://www.rfc-editor.org>. <https://www.rfc-editor.org/errata/eid1812>.
[RFC20] Cerf, V., "ASCII format for network interchange", STD 80, [RFC20] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969, RFC 20, DOI 10.17487/RFC0020, October 1969,
<http://www.rfc-editor.org/info/rfc20>. <https://www.rfc-editor.org/info/rfc20>.
[RFC3454] Hoffman, P. and M. Blanchet, "Preparation of [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of
Internationalized Strings ("stringprep")", RFC 3454, Internationalized Strings ("stringprep")", RFC 3454,
DOI 10.17487/RFC3454, December 2002, DOI 10.17487/RFC3454, December 2002,
<http://www.rfc-editor.org/info/rfc3454>. <https://www.rfc-editor.org/info/rfc3454>.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
<http://www.rfc-editor.org/info/rfc3501>. <https://www.rfc-editor.org/info/rfc3501>.
[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", RFC 3987, DOI 10.17487/RFC3987,
January 2005, <https://www.rfc-editor.org/info/rfc3987>.
[RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names [RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names
and Passwords", RFC 4013, DOI 10.17487/RFC4013, February and Passwords", RFC 4013, DOI 10.17487/RFC4013, February
2005, <http://www.rfc-editor.org/info/rfc4013>. 2005, <https://www.rfc-editor.org/info/rfc4013>.
[RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple [RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple
Authentication and Security Layer (SASL)", RFC 4422, Authentication and Security Layer (SASL)", RFC 4422,
DOI 10.17487/RFC4422, June 2006, DOI 10.17487/RFC4422, June 2006,
<http://www.rfc-editor.org/info/rfc4422>. <https://www.rfc-editor.org/info/rfc4422>.
[RFC4616] Zeilenga, K., Ed., "The PLAIN Simple Authentication and [RFC4616] Zeilenga, K., Ed., "The PLAIN Simple Authentication and
Security Layer (SASL) Mechanism", RFC 4616, Security Layer (SASL) Mechanism", RFC 4616,
DOI 10.17487/RFC4616, August 2006, DOI 10.17487/RFC4616, August 2006,
<http://www.rfc-editor.org/info/rfc4616>. <https://www.rfc-editor.org/info/rfc4616>.
[RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams,
"Salted Challenge Response Authentication Mechanism "Salted Challenge Response Authentication Mechanism
(SCRAM) SASL and GSS-API Mechanisms", RFC 5802, (SCRAM) SASL and GSS-API Mechanisms", RFC 5802,
DOI 10.17487/RFC5802, July 2010, DOI 10.17487/RFC5802, July 2010,
<http://www.rfc-editor.org/info/rfc5802>. <https://www.rfc-editor.org/info/rfc5802>.
[RFC5893] Alvestrand, H., Ed. and C. Karp, "Right-to-Left Scripts [RFC5893] Alvestrand, H., Ed. and C. Karp, "Right-to-Left Scripts
for Internationalized Domain Names for Applications for Internationalized Domain Names for Applications
(IDNA)", RFC 5893, DOI 10.17487/RFC5893, August 2010, (IDNA)", RFC 5893, DOI 10.17487/RFC5893, August 2010,
<http://www.rfc-editor.org/info/rfc5893>. <https://www.rfc-editor.org/info/rfc5893>.
[RFC6120] Saint-Andre, P., "Extensible Messaging and Presence [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120,
March 2011, <http://www.rfc-editor.org/info/rfc6120>. March 2011, <https://www.rfc-editor.org/info/rfc6120>.
[RFC6943] Thaler, D., Ed., "Issues in Identifier Comparison for [RFC6943] Thaler, D., Ed., "Issues in Identifier Comparison for
Security Purposes", RFC 6943, DOI 10.17487/RFC6943, May Security Purposes", RFC 6943, DOI 10.17487/RFC6943, May
2013, <http://www.rfc-editor.org/info/rfc6943>. 2013, <https://www.rfc-editor.org/info/rfc6943>.
[RFC7542] DeKok, A., "The Network Access Identifier", RFC 7542, [RFC7542] DeKok, A., "The Network Access Identifier", RFC 7542,
DOI 10.17487/RFC7542, May 2015, DOI 10.17487/RFC7542, May 2015,
<http://www.rfc-editor.org/info/rfc7542>. <https://www.rfc-editor.org/info/rfc7542>.
[RFC7613] Saint-Andre, P. and A. Melnikov, "Preparation, [RFC7613] Saint-Andre, P. and A. Melnikov, "Preparation,
Enforcement, and Comparison of Internationalized Strings Enforcement, and Comparison of Internationalized Strings
Representing Usernames and Passwords", RFC 7613, Representing Usernames and Passwords", RFC 7613,
DOI 10.17487/RFC7613, August 2015, DOI 10.17487/RFC7613, August 2015,
<http://www.rfc-editor.org/info/rfc7613>. <https://www.rfc-editor.org/info/rfc7613>.
[RFC7616] Shekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, "HTTP [RFC7616] Shekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, "HTTP
Digest Access Authentication", RFC 7616, Digest Access Authentication", RFC 7616,
DOI 10.17487/RFC7616, September 2015, DOI 10.17487/RFC7616, September 2015,
<http://www.rfc-editor.org/info/rfc7616>. <https://www.rfc-editor.org/info/rfc7616>.
[RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme",
RFC 7617, DOI 10.17487/RFC7617, September 2015, RFC 7617, DOI 10.17487/RFC7617, September 2015,
<http://www.rfc-editor.org/info/rfc7617>. <https://www.rfc-editor.org/info/rfc7617>.
[RFC7622] Saint-Andre, P., "Extensible Messaging and Presence [RFC7622] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Address Format", RFC 7622, Protocol (XMPP): Address Format", RFC 7622,
DOI 10.17487/RFC7622, September 2015, DOI 10.17487/RFC7622, September 2015,
<http://www.rfc-editor.org/info/rfc7622>. <https://www.rfc-editor.org/info/rfc7622>.
[RFC8266] Saint-Andre, P., "Preparation, Enforcement, and Comparison
of Internationalized Strings Representing Nicknames",
RFC 8266, DOI 10.17487/RFC8266, October 2017,
<https://www.rfc-editor.org/info/rfc8266>.
[UTS39] Unicode Technical Standard #39, "Unicode Security [UTS39] Unicode Technical Standard #39, "Unicode Security
Mechanisms", edited by Mark Davis and Michel Suignard, Mechanisms", edited by Mark Davis and Michel Suignard,
<http://unicode.org/reports/tr39/>. <http://unicode.org/reports/tr39/>.
Appendix A. Changes from RFC 7613 Appendix A. Changes from RFC 7613
The following changes were made from [RFC7613]. The following changes were made from [RFC7613].
o Corrected the order of operations for the UsernameCaseMapped o Corrected the order of operations for the UsernameCaseMapped
profile to ensure consistency with RFC 7564. profile to ensure consistency with [RFC8264].
o In accordance with working group discussions and updates to o In accordance with working group discussions and updates to
[I-D.ietf-precis-7564bis], removed the use of the Unicode [RFC8264], removed the use of the Unicode toCaseFold() operation
CaseFold() operation in favor of the Unicode toLower() operation. in favor of the Unicode toLowerCase() operation.
o Modified the presentation (but not the content) of the rules. o Modified the presentation (but not the content) of the rules.
o Removed UTF-8 as a mandatory encoding, because that is a matter o Removed UTF-8 as a mandatory encoding, because that is a matter
for the application. for the application.
o Clarified several editorial matters. o Clarified several editorial matters.
o Updated references. o Updated references.
See [RFC7613] for a description of the differences from [RFC4013]. See [RFC7613] for a description of the differences from [RFC4013].
Appendix B. Acknowledgements Acknowledgements
Thanks to Christian Schudt and Sam Whited for their bug reports and Thanks to Christian Schudt and Sam Whited for their bug reports and
feedback. feedback.
See [RFC7613] for acknowledgements related to the specification that See [RFC7613] for acknowledgements related to the specification that
this document supersedes. this document supersedes.
Authors' Addresses Authors' Addresses
Peter Saint-Andre Peter Saint-Andre
Filament Jabber.org
18335 E 103rd Ave, Suite 203 P.O. Box 787
Commerce City, CO 80022 Parker, CO 80134
USA United States of America
Phone: +1 720 256 6756 Phone: +1 720 256 6756
Email: peter@filament.com Email: stpeter@jabber.org
URI: https://filament.com/ URI: https://www.jabber.org/
Alexey Melnikov Alexey Melnikov
Isode Ltd Isode Ltd
5 Castle Business Village 5 Castle Business Village
36 Station Road 36 Station Road
Hampton, Middlesex TW12 2BX Hampton, Middlesex TW12 2BX
United Kingdom United Kingdom
Email: Alexey.Melnikov@isode.com Email: Alexey.Melnikov@isode.com
 End of changes. 134 change blocks. 
287 lines changed or deleted 299 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/