< draft-ietf-precis-saslprepbis-10.txt   draft-ietf-precis-saslprepbis-11.txt >
PRECIS P. Saint-Andre PRECIS P. Saint-Andre
Internet-Draft &yet Internet-Draft &yet
Obsoletes: 4013 (if approved) A. Melnikov Obsoletes: 4013 (if approved) A. Melnikov
Intended status: Standards Track Isode Ltd Intended status: Standards Track Isode Ltd
Expires: May 25, 2015 November 21, 2014 Expires: May 30, 2015 November 26, 2014
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-saslprepbis-10 draft-ietf-precis-saslprepbis-11
Abstract Abstract
This document describes methods for handling Unicode strings This document describes methods for handling Unicode strings
representing usernames and passwords. This document obsoletes RFC representing usernames and passwords. This document obsoletes RFC
4013. 4013.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 34 skipping to change at page 1, line 34
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 25, 2015. This Internet-Draft will expire on May 30, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 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 (http://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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 4
3.2. UsernameIdentifierClass Profile . . . . . . . . . . . . . 5 3.2. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 5
3.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 5 3.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 5
3.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 5 3.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 6
3.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 6 3.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 6
3.3. Case Mapping . . . . . . . . . . . . . . . . . . . . . . 6 3.3. UsernameCasePreserved Profile . . . . . . . . . . . . . . 6
3.4. Application-Layer Constructs . . . . . . . . . . . . . . 7 3.3.1. Preparation . . . . . . . . . . . . . . . . . . . . . 6
3.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 7
4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3.3. Comparison . . . . . . . . . . . . . . . . . . . . . 7
4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 9 3.4. Case Mapping vs. Case Preservation . . . . . . . . . . . 7
4.2. PasswordFreeformClass Profile . . . . . . . . . . . . . . 10 3.5. Application-Layer Constructs . . . . . . . . . . . . . . 9
4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 10 3.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 10 4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 11 4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 10
4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 11 4.2. Password Profile . . . . . . . . . . . . . . . . . . . . 11
5. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 11
5.1. Usernames . . . . . . . . . . . . . . . . . . . . . . . . 12 4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 12
5.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 12
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 12
6.1. UsernameIdentifierClass Profile . . . . . . . . . . . . . 14 5. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2. PasswordFreeformClass Profile . . . . . . . . . . . . . . 15 5.1. Usernames . . . . . . . . . . . . . . . . . . . . . . . . 13
7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 5.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 15
7.1. Password/Passphrase Strength . . . . . . . . . . . . . . 15 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16
7.2. Identifier Comparison . . . . . . . . . . . . . . . . . . 16 6.1. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 16
7.3. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 16 6.2. UsernameCasePreserved Profile . . . . . . . . . . . . . . 16
7.4. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . 16 6.3. Password Profile . . . . . . . . . . . . . . . . . . . . 17
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17
8.1. Normative References . . . . . . . . . . . . . . . . . . 16 7.1. Password/Passphrase Strength . . . . . . . . . . . . . . 17
8.2. Informative References . . . . . . . . . . . . . . . . . 16 7.2. Identifier Comparison . . . . . . . . . . . . . . . . . . 18
Appendix A. Differences from RFC 4013 . . . . . . . . . . . . . 18 7.3. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 18
Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 19 7.4. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . 18
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.1. Normative References . . . . . . . . . . . . . . . . . . 18
8.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Differences from RFC 4013 . . . . . . . . . . . . . 20
Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 21
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
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 SASL PLAIN mechanism [RFC4616] or the HTTP Basic plaintext (as in the SASL PLAIN mechanism [RFC4616] or the HTTP Basic
scheme [RFC2617] / [I-D.ietf-httpauth-basicauth-update]) or scheme [RFC2617] / [I-D.ietf-httpauth-basicauth-update]) 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 SASL SCRAM mechanism [RFC5802] or such as a hash function (as in the SASL SCRAM mechanism [RFC5802] or
the HTTP Digest scheme [RFC2617] / [I-D.ietf-httpauth-digest]). the HTTP Digest scheme [RFC2617] / [I-D.ietf-httpauth-digest]).
skipping to change at page 5, line 26 skipping to change at page 5, line 35
existing SASL mechanisms and SASL-using application protocols, and existing SASL mechanisms and SASL-using application protocols, and
even in most application protocols that do not currently use SASL. even in most application protocols that do not currently 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.
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
proper preparation of the username before applying the algorithm. proper preparation of the username before applying the algorithm.
3.2. UsernameIdentifierClass Profile This specification defines two profiles for usernames: one that
performs case mapping and one that performs case preservation (see
further discussion under Section 3.4).
The definition of the UsernameIdentifierClass profile is provided in 3.2. UsernameCaseMapped Profile
the following sections, including detailed information about
preparation, enforcement, and comparison (on the distinction between The definition of the UsernameCaseMapped profile of the
these actions, refer to [I-D.ietf-precis-framework]). IdentifierClass is provided in the following sections, including
detailed information about preparation, enforcement, and comparison
(on the distinction between these actions, refer to
[I-D.ietf-precis-framework]).
3.2.1. Preparation 3.2.1. Preparation
An entity that prepares a string for inclusion in a username slot An entity that prepares a string according to this profile MUST
MUST ensure that the string consists only of Unicode code points that ensure that the string consists only of Unicode code points that
conform to the "IdentifierClass" base string class defined in conform to the "IdentifierClass" base string class defined in
[I-D.ietf-precis-framework]. In addition, the string MUST be encoded [I-D.ietf-precis-framework]. In addition, the string MUST be encoded
as UTF-8 [RFC3629]. as UTF-8 [RFC3629].
3.2.2. Enforcement 3.2.2. Enforcement
An entity that performs enforcement in username slots MUST prepare a An entity that performs enforcement according to this profile MUST
string as described in the previous section and MUST also apply the prepare a string as described in the previous section and MUST also
rules specified below for the UsernameIdentifierClass profile (these apply the rules specified below for the UsernameCaseMapped profile
rules MUST be applied in the order shown). (these rules MUST be applied in the order shown).
1. Width Mapping Rule: Fullwidth and halfwidth characters MUST be 1. Width Mapping Rule: Fullwidth and halfwidth characters MUST be
mapped to their decomposition mappings. mapped to their decomposition mappings.
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 (although see 3. Case Mapping Rule: Uppercase and titlecase characters MUST be
Section 3.3 below). mapped to their lowercase equivalents, preferably using Unicode
Default Case Folding as defined in Chapter 3 of the Unicode
Standard [UNICODE].
4. Normalization Rule: Unicode Normalization Form C (NFC) MUST be 4. Normalization Rule: Unicode Normalization Form C (NFC) MUST be
applied to all characters. applied to all characters.
5. Directionality Rule: Applications MUST apply the "Bidi Rule" 5. Directionality Rule: Applications MUST apply the "Bidi Rule"
defined in [RFC5893] (i.e., each of the six conditions of the defined in [RFC5893] (i.e., each of the six conditions of the
Bidi Rule must be satisfied). Bidi Rule must be satisfied).
3.2.3. Comparison 3.2.3. Comparison
An entity that performs comparison of two strings before or after An entity that performs comparison of two strings according to this
their inclusion in username slots MUST prepare each string and profile MUST prepare each string and enforce the rules specified in
enforce the rules specified in the previous two sections. The two the previous two sections. The two strings are to be considered
strings are to be considered equivalent if they are an exact octet- equivalent if they are an exact octet-for-octet match (sometimes
for-octet match (sometimes called "bit-string identity"). called "bit-string identity").
3.3. Case Mapping 3.3. UsernameCasePreserved Profile
The definition of the UsernameCasePreserved profile of the
IdentifierClass is provided in the following sections, including
detailed information about preparation, enforcement, and comparison
(on the distinction between these actions, refer to
[I-D.ietf-precis-framework]).
3.3.1. Preparation
An entity that prepares a string according to this profile MUST
ensure that the string consists only of Unicode code points that
conform to the "IdentifierClass" base string class defined in
[I-D.ietf-precis-framework]. In addition, the string MUST be encoded
as UTF-8 [RFC3629].
3.3.2. Enforcement
An entity that performs enforcement according to this profile MUST
prepare a string as described in the previous section and MUST also
apply the rules specified below for the UsernameCasePreserved profile
(these rules MUST be applied in the order shown).
1. Width Mapping Rule: Fullwidth and halfwidth characters MUST be
mapped to their decomposition mappings.
2. Additional Mapping Rule: There is no additional mapping rule.
3. Case Mapping Rule: Uppercase and titlecase characters MUST NOT be
mapped to their lowercase equivalents.
4. Normalization Rule: Unicode Normalization Form C (NFC) MUST be
applied to all characters.
5. Directionality Rule: Applications MUST apply the "Bidi Rule"
defined in [RFC5893] (i.e., each of the six conditions of the
Bidi Rule must be satisfied).
3.3.3. Comparison
An entity that performs comparison of two strings according to this
profile MUST prepare each string and enforce the rules specified in
the previous two sections. The two strings are to be considered
equivalent if they are an exact octet-for-octet match (sometimes
called "bit-string identity").
3.4. Case Mapping vs. Case Preservation
In order to accomodate the widest range of username constructs in
applications, this document defines two username profiles:
UsernameCaseMapped and UsernameCasePreserved.
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 perform case mapping, since not suggests that it is preferable to apply the UsernameCaseMapped
doing so can lead to false positives during authentication and profile and therefore perform case mapping, since not doing so can
authorization (as described in [RFC6943]) and can result in confusion lead to false positives during authentication and authorization (as
among end users given the prevalence of case mapping in many existing described in [RFC6943]) and can result in confusion among end users
protocols and applications. However, there can be good reasons to given the prevalence of case mapping in many existing protocols and
not perform case mapping, such as backward compatibility with applications. However, there can be good reasons to apply the
deployed infrastructure. UsernameCasePreserved profile and thus not perform case mapping, such
as backward compatibility with deployed infrastructure.
In particular: In particular:
o SASL mechanisms that directly re-use this profile MUST specify o SASL mechanisms that follow the recommendations in this document
whether and when case mapping is to be applied to authentication MUST specify whether and when case mapping is to be applied to
identifiers. SASL mechanisms SHOULD delay any case mapping to the authentication identifiers. SASL mechanisms SHOULD delay any case
last possible moment, such as when doing a lookup by username, mapping to the last possible moment, such as when doing a lookup
username comparisons, or generating a cryptographic salt from a by username, username comparisons, or generating a cryptographic
username (if the last possible moment happens on the server, then salt from a username (if the last possible moment happens on the
decisions about case mapping can be a matter of deployment server, then decisions about case mapping can be a matter of
policy). In keeping with [RFC4422], SASL mechanisms are not to deployment policy). In keeping with [RFC4422], SASL mechanisms
apply this or any other profile to authorization identifiers. are not to apply this or any other profile to authorization
identifiers.
o Application protocols that use SASL (such as IMAP [RFC3501] and o Application protocols that use SASL (such as IMAP [RFC3501] and
XMPP [RFC6120]) and that directly re-use this profile MUST specify XMPP [RFC6120]) and that directly re-use this profile MUST specify
whether case mapping is to be applied to authorization whether case mapping is to be applied to authorization
identifiers. Such "SASL application protocols" SHOULD delay any identifiers. Such "SASL application protocols" SHOULD delay any
case mapping of authorization identifiers to the last possible case mapping of authorization identifiers to the last possible
moment, which happens to necessarily be on the server side (this moment, which happens to necessarily be on the server side (this
enables decisions about case mapping to be a matter of deployment enables decisions about case mapping to be a matter of deployment
policy). In keeping with [RFC4422], SASL application protocols policy). In keeping with [RFC4422], SASL application protocols
are not to apply this or any other profile to authentication are not to apply this or any other profile to authentication
skipping to change at page 7, line 22 skipping to change at page 8, line 44
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 and authorization identifiers. Such authentication identifiers and authorization identifiers. Such
"non-SASL application protocols" SHOULD delay any case mapping to "non-SASL application protocols" SHOULD delay any case mapping to
the last possible moment, such as when doing a lookup by username, the last possible moment, such as when doing a lookup by username,
username comparisons, or generating a cryptographic salt from a username comparisons, or generating a cryptographic salt from a
username (if the last possible moment happens on the server, then username (if the last possible moment happens on the server, then
decisions about case mapping can be a matter of deployment decisions about case mapping can be a matter of deployment
policy). 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 specifies the handling of case or non-SASL application protocol uses the UsernameCaseMapped profile,
mapping for strings that conform to the UsernameIdentifierClass, it it MUST clearly describe whether case mapping is to be applied at the
MUST clearly describe whether case mapping is required, recommended, level of the protocol itself, implementations thereof, or service
or optional at the level of the protocol itself, implementations deployments (all of these approaches can be legitimate depending on
thereof, or service deployments. the application in question).
Informational Note: The LocalpartIdentifierClass profile defined
in [I-D.ietf-xmpp-6122bis] is identical to the
UsernameIdentifierClass profile defined here, except that the
LocalpartIdentifierClass profile specifies case mapping.
3.4. Application-Layer Constructs 3.5. Application-Layer Constructs
The username rule allows an application protocol, implementation, or Both the UsernameCaseMapped and UsernameCasePreserved profiles allow
deployment to create application-layer constructs such as an application protocol, implementation, or deployment to create
"user@domain" or "Firstname Middlename Lastname" (e.g., because the application-layer constructs such as "user@domain" or "Firstname
PRECIS IdentifierClass allows any ASCII7 character, because spaces Middlename Lastname". One example of the former is the Network
can be used to separate userpart instances, and because domain names Access Identifier specified in [I-D.ietf-radext-nai]. (Such
as specified in [RFC5890] and [RFC5892] are a subset of the PRECIS constructs are possible because the PRECIS IdentifierClass allows any
IdentifierClass). ASCII7 character, because spaces can be used to separate userpart
instances, and because domain names as specified in [RFC5890] and
[RFC5892] are a subset of the PRECIS IdentifierClass.)
3.5. 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).
Table 1: A sample of legal userparts Table 1: A sample of legal userparts
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| # | Userpart | Notes | | # | Userpart | Notes |
skipping to change at page 10, line 20 skipping to change at page 11, line 34
Note: The prohibition on zero-length passwords is not a Note: The prohibition on zero-length passwords is not a
recommendation regarding password strength (since a password of recommendation regarding password strength (since a password of
only one byte is highly insecure), but is meant to prevent only one byte is highly insecure), but is meant to prevent
applications from omitting a password entirely. applications from omitting a password entirely.
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
proper preparation of the password before applying the algorithm, proper preparation of the password before applying the algorithm,
since the password is not available to the server in plaintext form. since the password is not available to the server in plaintext form.
4.2. PasswordFreeformClass Profile 4.2. Password Profile
The definition of the PasswordFreeformClass profile is provided in The definition of the Password profile is provided in the following
the following sections, including detailed information about sections, including detailed information about preparation,
preparation, enforcement, and comparison (on the distinction between enforcement, and comparison (on the distinction between these
these actions, refer to [I-D.ietf-precis-framework]). actions, refer to [I-D.ietf-precis-framework]).
4.2.1. Preparation 4.2.1. Preparation
An entity that prepares a string for inclusion in a password slot An entity that prepares a string according to this profile MUST
MUST ensure that the string consists only of Unicode code points that ensure that the string consists only of Unicode code points that
conform to the "FreeformClass" base string class defined in conform to the "FreeformClass" base string class defined in
[I-D.ietf-precis-framework]. In addition, the string MUST be encoded [I-D.ietf-precis-framework]. In addition, the string MUST be encoded
as UTF-8 [RFC3629]. as UTF-8 [RFC3629].
4.2.2. Enforcement 4.2.2. Enforcement
An entity that performs enforcement in password slots MUST prepare a An entity that performs enforcement according to this profile MUST
string as described in the previous section and MUST also apply the prepare a string as described in the previous section and MUST also
rules specified below for the PasswordFreeformClass (these rules MUST apply the rules specified below for the Password (these rules MUST be
be applied in the order shown). applied in the order shown).
1. Width Mapping Rule: Fullwidth and halfwidth characters MUST NOT 1. Width Mapping Rule: Fullwidth and halfwidth characters MUST NOT
be mapped to their decomposition mappings. be mapped to their decomposition mappings.
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 ASCII space (U+0020); a non-ASCII space is any Unicode
code point having a general category of "Zs", naturally with the code point having a general category of "Zs", naturally with the
exception of U+0020. exception of U+0020.
3. Case Mapping Rule: Uppercase and titlecase characters MUST NOT be 3. Case Mapping Rule: Uppercase and titlecase characters MUST NOT be
skipping to change at page 11, line 22 skipping to change at page 12, line 40
amount of entropy that is possible in a password. Furthermore, amount of entropy that is possible in a password. Furthermore,
such rules are intended to minimize the possibility that the same such rules are intended to minimize the possibility that the same
string will be displayed differently on a system set for right- string will be displayed differently on a system set for right-
to-left display and a system set for left-to-right display; to-left display and a system set for left-to-right display;
however, passwords are typically not displayed at all and are however, passwords are typically not displayed at all and are
rarely meant to be interoperable across different systems in the rarely meant to be interoperable across different systems in the
way that non-secret strings like domain names and usernames are. way that non-secret strings like domain names and usernames are.
4.2.3. Comparison 4.2.3. Comparison
An entity that performs comparison of two strings before or after An entity that performs comparison of two strings according to this
their inclusion in password slots MUST prepare each string and profile MUST prepare each string and enforce the rules specified in
enforce the rules specified in the previous two sections. The two the previous two sections. The two strings are to be considered
strings are to be considered equivalent if they are an exact octet- equivalent if they are an exact octet-for-octet match (sometimes
for-octet match (sometimes called "bit-string identity"). called "bit-string identity").
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 passwords characters < and > are used here to delineate the actual passwords
and are not part of the password strings). and are not part of the password strings).
Table 3: A sample of legal passwords Table 3: A sample of legal passwords
skipping to change at page 12, line 33 skipping to change at page 13, line 51
sections describe these differences, along with their implications sections describe these differences, along with their implications
for migration, in more detail. for migration, in more detail.
5.1. Usernames 5.1. Usernames
Deployments that currently use SASLprep for handling usernames might Deployments that currently use SASLprep for handling usernames might
need to scrub existing data when migrating to use of the rules need to scrub existing data when migrating to use of the rules
defined in this specification. In particular: defined in this specification. In particular:
o SASLprep specified the use of Unicode Normalization Form KC o SASLprep specified the use of Unicode Normalization Form KC
(NFKC), whereas the UsernameIdentifierClass profile employs (NFKC), whereas the UsernameCaseMapped and UsernameCasePreserved
Unicode Normalization Form C (NFC). In practice this change is profiles employ Unicode Normalization Form C (NFC). In practice
unlikely to cause significant problems, because NFKC provides this change is unlikely to cause significant problems, because
methods for mapping Unicode code points with compatibility NFKC provides methods for mapping Unicode code points with
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. U+017F LATIN SMALL LETTER LONG S is compatibility equivalent 1. U+017F LATIN SMALL LETTER LONG S is compatibility equivalent
to U+0073 LATIN SMALL LETTER S to U+0073 LATIN SMALL LETTER S
2. U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to 2. U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to
U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER
skipping to change at page 13, line 26 skipping to change at page 14, line 43
IdentifierClass entirely disallows most of these characters, which IdentifierClass entirely disallows most of these characters, which
correspond to the code points from the "M" category defined under correspond to the code points from the "M" category defined under
Section 8.13 of [I-D.ietf-precis-framework] (with the exception of Section 8.13 of [I-D.ietf-precis-framework] (with the exception of
U+1806 MONGOLIAN TODO SOFT HYPHEN, which was "commonly mapped to U+1806 MONGOLIAN TODO SOFT HYPHEN, which was "commonly mapped to
nothing" in Unicode 3.2 but at the time of this writing does not nothing" in Unicode 3.2 but at the time of this writing does not
have a derived property of Default_Ignorable_Code_Point in Unicode have a derived property of Default_Ignorable_Code_Point in Unicode
7.0). For migration purposes, deployments might want to remove 7.0). For migration purposes, deployments might want to remove
code points contained in the PRECIS "M" category from usernames. code points contained in the PRECIS "M" category from usernames.
o SASLprep allowed uppercase and titlecase characters, whereas the o SASLprep allowed uppercase and titlecase characters, whereas the
UsernameIdentifierClass profile maps uppercase and titlecase UsernameCaseMapped profile maps uppercase and titlecase characters
characters to their lowercase equivalents. For migration to their lowercase equivalents (by contrast, the
purposes, deployments can either convert uppercase and titlecase UsernameCasePreserved profile matches SASLprep in this regard).
characters to their lowercase equivalents in usernames (thus For migration purposes, deployments can either use the
losing the case information) or preserve uppercase and titlecase UsernameCaseMapped profile (thus losing the case information) or
characters and ignore the case difference when comparing use the UsernameCasePreserved profile (thus ignoring case
usernames. difference when comparing usernames).
5.2. Passwords 5.2. Passwords
Depending on local service policy, migration from RFC 4013 to this Depending on local service policy, migration from RFC 4013 to this
specification might not involve any scrubbing of data (since specification might not involve any scrubbing of data (since
passwords might not be stored in the clear anyway); however, service passwords might not be stored in the clear anyway); however, service
providers need to be aware of possible issues that might arise during providers need to be aware of possible issues that might arise during
migration. In particular: migration. In particular:
o SASLprep specified the use of Unicode Normalization Form KC o SASLprep specified the use of Unicode Normalization Form KC
(NFKC), whereas the PasswordFreeformClass profile employs Unicode (NFKC), whereas the Password profile employs Unicode Normalization
Normalization Form C (NFC). Because NFKC is more aggressive about Form C (NFC). Because NFKC is more aggressive about finding
finding matches than NFC, in practice this change is unlikely to matches than NFC, in practice this change is unlikely to cause
cause significant problems and indeed has the security benefit of significant problems and indeed has the security benefit of
probably resulting in fewer false positives when comparing probably resulting in fewer false positives 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. U+017F LATIN SMALL LETTER LONG S is compatibility equivalent 1. U+017F LATIN SMALL LETTER LONG S is compatibility equivalent
to U+0073 LATIN SMALL LETTER S to U+0073 LATIN SMALL LETTER S
2. U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to 2. U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to
U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER
V V
skipping to change at page 14, line 35 skipping to change at page 16, line 10
nothing in Unicode 3.2 but at the time of this writing is allowed nothing in Unicode 3.2 but at the time of this writing is allowed
by Unicode 7.0). In practice, this change will probably have no by Unicode 7.0). In practice, this change will probably have no
effect on comparison, but user-oriented software might reject such effect on comparison, but user-oriented software might reject such
code points instead of ignoring them during password preparation. code points instead of ignoring them during password preparation.
6. IANA Considerations 6. IANA Considerations
The IANA shall add the following entries to the PRECIS Profiles The IANA shall add the following entries to the PRECIS Profiles
Registry. Registry.
6.1. UsernameIdentifierClass Profile 6.1. UsernameCaseMapped Profile
Name: UsernameIdentifierClass. Name: UsernameCaseMapped.
Base Class: IdentifierClass.
Applicability: Usernames in security and application protocols. Applicability: Usernames in security and application protocols.
Replaces: The SASLprep profile of Stringprep.
Width Mapping Rule: Map fullwidth and halfwidth characters to their
decomposition mappings.
Additional Mapping Rule: None.
Case Mapping Rule: Map uppercase and titlecase characters to
lowercase.
Normalization Rule: NFC.
Directionality Rule: The "Bidi Rule" defined in RFC 5893 applies.
Enforcement: To be defined by security or application protocols that
use this profile.
Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to
the number issued for this specification.]
6.2. UsernameCasePreserved Profile
Name: UsernameCasePreserved.
Base Class: IdentifierClass. Base Class: IdentifierClass.
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 characters to their Width Mapping Rule: Map fullwidth and halfwidth characters to their
decomposition mappings. decomposition mappings.
Additional Mapping Rule: None. Additional Mapping Rule: None.
Case Mapping Rule: To be defined by security or application Case Mapping Rule: None.
protocols that use this profile.
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: RFC XXXX. [Note to RFC Editor: please change XXXX to Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to
the number issued for this specification.] the number issued for this specification.]
6.2. PasswordFreeformClass Profile 6.3. Password Profile
Name: PasswordFreeformClass.
Applicability: Passwords in security and application protocols. Name: Password.
Base Class: FreeformClass Base Class: FreeformClass
Applicability: Passwords in security and 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 characters to ASCII Additional Mapping Rule: Map non-ASCII space characters to ASCII
space. space.
Case Mapping Rule: None. Case Mapping Rule: None.
Normalization Rule: NFC. Normalization Rule: NFC.
skipping to change at page 17, line 15 skipping to change at page 19, line 15
[I-D.ietf-httpauth-basicauth-update] [I-D.ietf-httpauth-basicauth-update]
Reschke, J., "The 'Basic' HTTP Authentication Scheme", Reschke, J., "The 'Basic' HTTP Authentication Scheme",
draft-ietf-httpauth-basicauth-update-02 (work in draft-ietf-httpauth-basicauth-update-02 (work in
progress), October 2014. progress), October 2014.
[I-D.ietf-httpauth-digest] [I-D.ietf-httpauth-digest]
Shekh-Yusef, R., Ahrens, D., and S. Bremer, "HTTP Digest Shekh-Yusef, R., Ahrens, D., and S. Bremer, "HTTP Digest
Access Authentication", draft-ietf-httpauth-digest-08 Access Authentication", draft-ietf-httpauth-digest-08
(work in progress), August 2014. (work in progress), August 2014.
[I-D.ietf-xmpp-6122bis] [I-D.ietf-radext-nai]
Saint-Andre, P., "Extensible Messaging and Presence DeKok, A., "The Network Access Identifier", draft-ietf-
Protocol (XMPP): Address Format", draft-ietf-xmpp- radext-nai-11 (work in progress), November 2014.
6122bis-16 (work in progress), November 2014.
[RFC20] Cerf, V., "ASCII format for network interchange", RFC 20, [RFC20] Cerf, V., "ASCII format for network interchange", RFC 20,
October 1969. October 1969.
[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP Leach, P., Luotonen, A., and L. Stewart, "HTTP
Authentication: Basic and Digest Access Authentication", Authentication: Basic and Digest Access Authentication",
RFC 2617, June 1999. RFC 2617, June 1999.
[RFC3454] Hoffman, P. and M. Blanchet, "Preparation of [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of
skipping to change at page 18, line 50 skipping to change at page 20, line 50
except those which were explicitly disallowed, whereas PRECIS except those which were explicitly disallowed, whereas PRECIS
profiles disallow all characters except those which are explicitly profiles disallow all characters except those which are explicitly
allowed (this "inclusion model" was originally used for allowed (this "inclusion model" was originally used for
internationalized domain names in [RFC5891]; see [RFC5894] for internationalized domain names in [RFC5891]; see [RFC5894] for
further discussion). It is important to keep this distinction in further discussion). It is important to keep this distinction in
mind when comparing the technology defined in this document to mind when comparing the technology defined in this document to
SASLprep [RFC4013]. SASLprep [RFC4013].
The following substantive modifications were made from RFC 4013. The following substantive modifications were made from RFC 4013.
o A single SASLprep algorithm was replaced by two separate o A single SASLprep algorithm was replaced by three separate
algorithms: one for usernames and another for passwords. algorithms: one for usernames with case mapping, one for usernames
with case preservation, and one for passwords.
o The new preparation algorithms use PRECIS instead of a stringprep o The new preparation algorithms use PRECIS instead of a stringprep
profile. The new algorithms work independenctly of Unicode profile. The new algorithms work independenctly of Unicode
versions. versions.
o As recommended in the PRECIS framework, changed the Unicode o As recommended in the PRECIS framework, changed the Unicode
normalization form from NFKC to NFC. normalization form from NFKC to NFC.
o Some Unicode code points that were mapped to nothing in RFC 4013 o Some Unicode code points that were mapped to nothing in RFC 4013
are simply disallowed by PRECIS. are simply disallowed by PRECIS.
Appendix B. Acknowledgements Appendix B. Acknowledgements
The following individuals provided helpful feedback on this document: The following individuals provided helpful feedback on this document:
Marc Blanchet, Alan DeKok, Joe Hildebrand, Jeffrey Hutzelman, Simon Marc Blanchet, Alan DeKok, Joe Hildebrand, Jeffrey Hutzelman, Simon
Josefsson, Jonathan Lennox, James Manger, Matt Miller, Chris Newman, Josefsson, Jonathan Lennox, James Manger, Matt Miller, Chris Newman,
Yutaka OIWA, Pete Resnick, Andrew Sullivan, and Nico Williams. Nico Yutaka OIWA, Pete Resnick, Andrew Sullivan, and Nico Williams. Nico
in particular deserves special recognition for providing text that in particular deserves special recognition for providing text that
was used in Section 3.3. Thanks also to Yoshiro YONEYA and Takahiro was used in Section 3.4. Thanks also to Yoshiro YONEYA and Takahiro
NEMOTO for implementation feedback. NEMOTO for implementation feedback.
This document borrows some text from [RFC4013] and [RFC6120]. This document borrows some text from [RFC4013] and [RFC6120].
Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for
employing him during his work on earlier versions of this document. employing him during his work on earlier versions of this document.
Authors' Addresses Authors' Addresses
Peter Saint-Andre Peter Saint-Andre
 End of changes. 40 change blocks. 
134 lines changed or deleted 224 lines changed or added

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