draft-ietf-precis-7613bis-04.txt   draft-ietf-precis-7613bis-05.txt 
Network Working Group P. Saint-Andre Network Working Group P. Saint-Andre
Internet-Draft Filament Internet-Draft Filament
Obsoletes: 7613 (if approved) A. Melnikov Obsoletes: 7613 (if approved) A. Melnikov
Intended status: Standards Track Isode Ltd Intended status: Standards Track Isode Ltd
Expires: June 3, 2017 November 30, 2016 Expires: August 16, 2017 February 12, 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-04 draft-ietf-precis-7613bis-05
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. The preparation, enforcement, and comparison of passwords. The preparation, enforcement, and comparison of
internationalized strings (PRECIS) framework, RFC 7564, obsoletes RFC internationalized strings (PRECIS) framework, RFC 7564, obsoletes RFC
skipping to change at page 1, line 39 skipping to change at page 1, line 39
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 June 3, 2017. This Internet-Draft will expire on August 16, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 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 (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 . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 5 3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 6 3.2. Case Mapping vs. Case Preservation . . . . . . . . . . . 6
3.2.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 6 3.3. UsernameCaseMapped Profile . . . . . . . . . . . . . . . 7
3.2.2. Preparation . . . . . . . . . . . . . . . . . . . . . 6
3.2.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 7
3.2.4. Comparison . . . . . . . . . . . . . . . . . . . . . 7
3.3. UsernameCasePreserved 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 . . . . . . . . . . . . . . . . . . . . . 8 3.3.4. Comparison . . . . . . . . . . . . . . . . . . . . . 8
3.4. Case Mapping vs. Case Preservation . . . . . . . . . . . 8 3.4. UsernameCasePreserved Profile . . . . . . . . . . . . . . 8
3.4.1. Rules . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4.2. Preparation . . . . . . . . . . . . . . . . . . . . . 9
3.4.3. Enforcement . . . . . . . . . . . . . . . . . . . . . 9
3.4.4. Comparison . . . . . . . . . . . . . . . . . . . . . 10
3.5. Application-Layer Constructs . . . . . . . . . . . . . . 10 3.5. Application-Layer Constructs . . . . . . . . . . . . . . 10
3.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10 3.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10
4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 12 4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . 12
4.2. OpaqueString Profile . . . . . . . . . . . . . . . . . . 13 4.2. OpaqueString Profile . . . . . . . . . . . . . . . . . . 13
4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 13 4.2.1. Preparation . . . . . . . . . . . . . . . . . . . . . 13
4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 14 4.2.2. Enforcement . . . . . . . . . . . . . . . . . . . . . 14
4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 14 4.2.3. Comparison . . . . . . . . . . . . . . . . . . . . . 14
4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 15 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 15
5. Use in Application Protocols . . . . . . . . . . . . . . . . 15 5. Use in Application Protocols . . . . . . . . . . . . . . . . 15
skipping to change at page 3, line 25 skipping to change at page 3, line 25
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 preparing,
enforcing, and comparing internationalized strings that represent enforcing, and comparing internationalized strings that represent
usernames and passwords. Such strings consist of code points from usernames and passwords. Such strings consist of code points from
the Unicode character set [Unicode], with special attention to code the Unicode coded character set [Unicode], with special attention to
points outside the ASCII range [RFC20]. The rules for handling such code points outside the ASCII range [RFC20]. The rules for handling
strings are specified through profiles of the string classes defined such strings are specified through profiles of the string classes
in the preparation, enforcement, and comparison of internationalized defined in the preparation, enforcement, and comparison of
strings (PRECIS) framework specification [RFC7564]. internationalized strings (PRECIS) framework specification [RFC7564].
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 character SUPERSCRIPT ONE (U+00B9) as equivalent to DIGIT ONE Unicode code point SUPERSCRIPT ONE (U+00B9) as equivalent to DIGIT
(U+0031), because that would result in false positives during ONE (U+0031), because that would result in false positives during
comparison, authentication, and authorization (e.g., an attacker comparison, authentication, and authorization (e.g., an attacker
could easy spoof an account "user1@example.com"). could easy 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.)
skipping to change at page 6, line 7 skipping to change at page 6, line 7
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
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 This specification defines two profiles for usernames: one that
performs case mapping and one that performs case preservation (see performs case mapping and one that performs case preservation (see
further discussion under Section 3.4). further discussion under Section 3.2).
3.2. UsernameCaseMapped Profile 3.2. Case Mapping vs. Case Preservation
3.2.1. Rules In order to accommodate the widest range of username constructs in
applications, this document defines two username profiles:
UsernameCaseMapped and UsernameCasePreserved. These two profiles
differ only in the Case-Mapping Rule and are otherwise identical.
Case mapping is a matter for the application protocol, protocol
implementation, or end deployment. In general, this document
suggests that it is preferable to apply the UsernameCaseMapped
profile and therefore perform case mapping, because not doing so can
lead to false positives during authentication and authorization (as
described in [RFC6943]) and can result in confusion among end users,
given the prevalence of case mapping in many existing protocols and
applications. However, there can be good reasons to apply the
UsernameCasePreserved profile and thus not perform case mapping, such
as backward compatibility with deployed infrastructure.
In particular:
o SASL mechanisms that follow the recommendations in this document
MUST specify whether and when case mapping is to be applied to
authentication identifiers. SASL mechanisms SHOULD delay any case
mapping to the last possible moment, such as when doing a lookup
by username, performing username comparisons, or generating a
cryptographic salt from a username (if the last possible moment
happens on the server, then decisions about case mapping can be a
matter of deployment policy). In keeping with [RFC4422], SASL
mechanisms are not to apply this or any other profile to
authorization identifiers, only to authentication identifiers.
o Application protocols that use SASL (such as IMAP [RFC3501] and
the Extensible Messaging and Presence Protocol (XMPP) [RFC6120])
and that directly reuse this profile MUST specify whether or not
case mapping is to be applied to authorization identifiers. Such
"SASL application protocols" SHOULD delay any case-mapping of
authorization identifiers to the last possible moment, which
happens to necessarily be on the server side (this enables
decisions about case mapping to be a matter of deployment policy).
In keeping with [RFC4422], SASL application protocols are not to
apply this or any other profile to authentication identifiers,
only to authorization identifiers.
o Application protocols that do not use SASL (such as HTTP
authentication with the HTTP Basic and Digest schemes as specified
in [RFC7617] and [RFC7616]) but that directly reuse this profile
MUST specify whether and when case mapping is to be applied to
authentication identifiers or authorization identifiers, or both.
Such "non-SASL application protocols" SHOULD delay any case
mapping to the last possible moment, such as when doing a lookup
by username, performing username comparisons, or generating a
cryptographic salt from a username (if the last possible moment
happens on the server, then decisions about case mapping can be a
matter of deployment policy).
If the specification for a SASL mechanism, SASL application protocol,
or non-SASL application protocol uses the UsernameCaseMapped profile,
it MUST clearly describe whether case mapping is to be applied at the
level of the protocol itself, implementations thereof, or service
deployments (each of these approaches can be legitimate, depending on
the application in question).
3.3. UsernameCaseMapped Profile
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]; toLower() operation as defined in the Unicode Standard [Unicode];
see further discussion in Section 3.4. 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.2.2. Preparation 3.3.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.2.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
[RFC7564] would forbid fullwidth and halfwidth code points. [RFC7564] would forbid fullwidth and halfwidth 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
explicitly allowed by the PRECIS IdentifierClass defined in are explicitly allowed by the PRECIS IdentifierClass defined in
Section 4.2 of [RFC7564]. Section 4.2 of [RFC7564].
3.2.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 a string as described in Section 3.2.2 and MUST also apply prepare a string as described in Section 3.3.2 and MUST also apply
the following rules specified in Section 3.2.1 in the order shown: the following rules specified in Section 3.3.1 in the order 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 omitting a username entirely, because when internationalized strings
characters are accepted, a non-empty sequence of characters can are accepted, a non-empty sequence of characters can result in a
result in a zero-length username after canonicalization). zero-length username after canonicalization).
3.2.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.2.2 and profile MUST prepare each string as specified in Section 3.3.2 and
then MUST enforce the rules specified in Section 3.2.3. The two then MUST enforce the rules specified in Section 3.3.3. The two
strings are to be considered equivalent if they are an exact octet- strings are to be considered equivalent if and only if they are an
for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes called "bit-string identity").
3.3. UsernameCasePreserved Profile
3.3.1. Rules 3.4. UsernameCasePreserved Profile
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.
skipping to change at page 8, line 7 skipping to change at page 9, line 26
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.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.2.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
[RFC7564] would forbid fullwidth and halfwidth code points. [RFC7564] would forbid fullwidth and halfwidth 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 [RFC7564]. Section 4.2 of [RFC7564].
3.3.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.3.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.3.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
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 omitting a username entirely, because when internationalized strings
characters are accepted, a non-empty sequence of characters can are accepted, a non-empty sequence of characters can result in a
result in a zero-length username after canonicalization). zero-length username after canonicalization).
3.3.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.3.2 and profile MUST prepare each string as specified in Section 3.4.2 and
then MUST enforce the rules specified in Section 3.3.3. The two then MUST enforce the rules specified in Section 3.4.3. The two
strings are to be considered equivalent if they are an exact octet- strings are to be considered equivalent if and only if they are an
for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes called "bit-string identity").
3.4. Case Mapping vs. Case Preservation
In order to accommodate the widest range of username constructs in
applications, this document defines two username profiles:
UsernameCaseMapped and UsernameCasePreserved. These two profiles
differ only in the Case-Mapping Rule and are otherwise identical.
Case mapping is a matter for the application protocol, protocol
implementation, or end deployment. In general, this document
suggests that it is preferable to apply the UsernameCaseMapped
profile and therefore perform case mapping, because not doing so can
lead to false positives during authentication and authorization (as
described in [RFC6943]) and can result in confusion among end users,
given the prevalence of case mapping in many existing protocols and
applications. However, there can be good reasons to apply the
UsernameCasePreserved profile and thus not perform case mapping, such
as backward compatibility with deployed infrastructure.
In particular:
o SASL mechanisms that follow the recommendations in this document
MUST specify whether and when case mapping is to be applied to
authentication identifiers. SASL mechanisms SHOULD delay any case
mapping to the last possible moment, such as when doing a lookup
by username, performing username comparisons, or generating a
cryptographic salt from a username (if the last possible moment
happens on the server, then decisions about case mapping can be a
matter of deployment policy). In keeping with [RFC4422], SASL
mechanisms are not to apply this or any other profile to
authorization identifiers, only to authentication identifiers.
o Application protocols that use SASL (such as IMAP [RFC3501] and
the Extensible Messaging and Presence Protocol (XMPP) [RFC6120])
and that directly reuse this profile MUST specify whether or not
case mapping is to be applied to authorization identifiers. Such
"SASL application protocols" SHOULD delay any case-mapping of
authorization identifiers to the last possible moment, which
happens to necessarily be on the server side (this enables
decisions about case mapping to be a matter of deployment policy).
In keeping with [RFC4422], SASL application protocols are not to
apply this or any other profile to authentication identifiers,
only to authorization identifiers.
o Application protocols that do not use SASL (such as HTTP
authentication with the HTTP Basic and Digest schemes as specified
in [RFC7617] and [RFC7616]) but that directly reuse this profile
MUST specify whether and when case mapping is to be applied to
authentication identifiers or authorization identifiers, or both.
Such "non-SASL application protocols" SHOULD delay any case
mapping to the last possible moment, such as when doing a lookup
by username, performing username comparisons, or generating a
cryptographic salt from a username (if the last possible moment
happens on the server, then decisions about case mapping can be a
matter of deployment policy).
If the specification for a SASL mechanism, SASL application protocol,
or non-SASL application protocol uses the UsernameCaseMapped profile,
it MUST clearly describe whether case mapping is to be applied at the
level of the protocol itself, implementations thereof, or service
deployments (each of these approaches can be legitimate, depending on
the application in question).
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 Although such a construct is not a profile of the PRECIS
IdentifierClass (because U+0020 SPACE is not allowed in the IdentifierClass (because U+0020 SPACE is not allowed in the
IdentifierClass), it can be created at the application layer because IdentifierClass), it can be created at the application layer because
skipping to change at page 12, line 25 skipping to change at page 12, line 25
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
| 11| <&#x265A;> | A user part of BLACK CHESS KING | | 11| <&#x265A;> | A user part of BLACK CHESS KING |
| | | (U+265A) | | | | (U+265A) |
+--------------------------+---------------------------------+ +--------------------------+---------------------------------+
Table 2: A Sample of Strings That Violate the Userpart Rule Table 2: A Sample of Strings That Violate the Userpart Rule
Here again, several points are worth noting. Regarding example 8: Here again, several points are worth noting. Regarding example 8:
although this is not a valid userpart, it is a valid username because although this is not a valid userpart, it is a valid username because
it is a space-separated sequence of userparts. Regarding example 10: it is a space-separated sequence of userparts. Regarding example 10:
the Unicode character ROMAN NUMERAL FOUR (U+2163) has a compatibility the Unicode code point ROMAN NUMERAL FOUR (U+2163) has a
equivalent of the string formed of LATIN CAPITAL LETTER I (U+0049) compatibility equivalent of the string formed of LATIN CAPITAL LETTER
and LATIN CAPITAL LETTER V (U+0056), but code points with I (U+0049) and LATIN CAPITAL LETTER V (U+0056), but code points with
compatibility equivalents are not allowed in the PRECIS compatibility equivalents are not allowed in the PRECIS
IdentifierClass. Regarding example 11: symbol characters such as IdentifierClass. Regarding example 11: symbol characters such as
BLACK CHESS KING (U+265A) are not allowed in the PRECIS BLACK CHESS KING (U+265A) are not allowed in the PRECIS
IdentifierClass. 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
skipping to change at page 13, line 25 skipping to change at page 13, line 25
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. The prohibition of zero-
length passwords is not a recommendation regarding password length passwords is not a recommendation regarding password
strength (because a password of only one byte is highly insecure) strength (because a password of only one byte is highly insecure)
but is meant to prevent applications from mistakenly omitting a but is meant to prevent applications from mistakenly omitting a
password entirely; such an outcome is possible when password entirely; such an outcome is possible when
internationalized characters are accepted, because a non-empty internationalized strings are accepted, because a non-empty
sequence of characters can result in a zero-length password after sequence of characters can result in a zero-length password after
canonicalization. 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
skipping to change at page 14, line 31 skipping to change at page 14, line 31
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 positives and thus to reduced equivalents would lead to false positives 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 range and inapplicable to passwords, because they can reduce the
of characters that are allowed in a string and therefore reduce repertoire of characters that are allowed in a string and
the amount of entropy that is possible in a password. Such rules therefore reduce the amount of entropy that is possible in a
are intended to minimize the possibility that the same string password. Such rules are intended to minimize the possibility
will be displayed differently on a layout system set for right- that the same string will be displayed differently on a layout
to-left display and a layout system set for left-to-right system set for right-to-left display and a layout system set for
display; however, passwords are typically not displayed at all left-to-right display; however, passwords are typically not
and are rarely meant to be interoperable across different layout displayed at all and are rarely meant to be interoperable across
systems in the way that non-secret strings like domain names and different layout systems in the way that non-secret strings like
usernames are. Furthermore, it is perfectly acceptable for domain names and usernames are. Furthermore, it is perfectly
opaque strings other than passwords to be presented differently acceptable for opaque strings other than passwords to be
in different layout systems, as long as the presentation is presented differently in different layout systems, as long as the
consistent in any given layout system. presentation is consistent in any given layout system.
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 they are an exact octet- strings are to be considered equivalent if and only if they are an
for-octet match (sometimes called "bit-string identity"). exact octet-for-octet match (sometimes 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 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 |
 End of changes. 33 change blocks. 
135 lines changed or deleted 132 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/