draft-ietf-ldapbis-strprep-02.txt   draft-ietf-ldapbis-strprep-03.txt 
Internet-Draft Kurt D. Zeilenga Internet-Draft Kurt D. Zeilenga
Intended Category: Standard Track OpenLDAP Foundation Intended Category: Standard Track OpenLDAP Foundation
Expires in six months 27 October 2003 Expires in six months 15 February 2004
LDAP: Internationalized String Preparation LDAP: Internationalized String Preparation
<draft-ietf-ldapbis-strprep-02.txt> <draft-ietf-ldapbis-strprep-03.txt>
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with all This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC2026. provisions of Section 10 of RFC2026.
Distribution of this memo is unlimited. Technical discussion of this Distribution of this memo is unlimited. Technical discussion of this
document will take place on the IETF LDAP Revision Working Group document will take place on the IETF LDAP Revision Working Group
mailing list <ietf-ldapbis@openldap.org>. Please send editorial mailing list <ietf-ldapbis@openldap.org>. Please send editorial
comments directly to the author <Kurt@OpenLDAP.org>. comments directly to the author <Kurt@OpenLDAP.org>.
skipping to change at page 1, line 33 skipping to change at page 1, line 33
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.''
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
<http://www.ietf.org/ietf/1id-abstracts.txt>. The list of <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
Internet-Draft Shadow Directories can be accessed at Internet-Draft Shadow Directories can be accessed at
<http://www.ietf.org/shadow.html>. <http://www.ietf.org/shadow.html>.
Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2004). All Rights Reserved.
Please see the Full Copyright section near the end of this document Please see the Full Copyright section near the end of this document
for more information. for more information.
Abstract Abstract
The previous Lightweight Directory Access Protocol (LDAP) technical The previous Lightweight Directory Access Protocol (LDAP) technical
specifications did not precisely define how character string matching specifications did not precisely define how character string matching
is to be performed. This lead to a number of usability and is to be performed. This led to a number of usability and
interoperability problems. This document defines string preparation interoperability problems. This document defines string preparation
algorithms for character-based matching rules defined for use in LDAP. algorithms for character-based matching rules defined for use in LDAP.
Conventions Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 [RFC2119]. document are to be interpreted as described in BCP 14 [RFC2119].
Character names in this document use the notation for code points and Character names in this document use the notation for code points and
skipping to change at page 2, line 49 skipping to change at page 2, line 49
For instance, the caseIgnoreMatch matching rule may be used to compare For instance, the caseIgnoreMatch matching rule may be used to compare
whether the commonName attribute contains a particular value without whether the commonName attribute contains a particular value without
regard for case and insignificant spaces. regard for case and insignificant spaces.
1.2. X.500 String Matching Rules 1.2. X.500 String Matching Rules
"X.520: Selected attribute types" [X.520] provides (amongst other "X.520: Selected attribute types" [X.520] provides (amongst other
things) value syntaxes and matching rules for comparing values things) value syntaxes and matching rules for comparing values
commonly used in the Directory. These specifications are inadequate commonly used in the Directory. These specifications are inadequate
for strings composed of characters from the Universal Character Set for strings composed of Unicode [Unicode] characters.
(UCS) [ISO10646], a superset of Unicode [Unicode].
The caseIgnoreMatch matching rule [X.520], for example, is simply The caseIgnoreMatch matching rule [X.520], for example, is simply
defined as being a case insensitive comparison where insignificant defined as being a case insensitive comparison where insignificant
spaces are ignored. For printableString, there is only one space spaces are ignored. For printableString, there is only one space
character and case mapping is bijective, hence this definition is character and case mapping is bijective, hence this definition is
sufficient. However, for UCS-based string types such as sufficient. However, for Unicode string types such as
universalString, this is not sufficient. For example, a case universalString, this is not sufficient. For example, a case
insensitive matching implementation which folded lower case characters insensitive matching implementation which folded lower case characters
to upper case would yield different different results than an to upper case would yield different different results than an
implementation which used upper case to lower case folding. Or one implementation which used upper case to lower case folding. Or one
implementation may view space as referring to only SPACE (U+0020), a implementation may view space as referring to only SPACE (U+0020), a
second implementation may view any character with the space separator second implementation may view any character with the space separator
(Zs) property as a space, and another implementation may view any (Zs) property as a space, and another implementation may view any
character with the whitespace (WS) category as a space. character with the whitespace (WS) category as a space.
The lack of precise specification for character string matching has The lack of precise specification for character string matching has
skipping to change at page 5, line 39 skipping to change at page 5, line 39
TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR) TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
(U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020). (U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
All other control code points (e.g., Cc) or code points with a control All other control code points (e.g., Cc) or code points with a control
function (e.g., Cf) are mapped to nothing. function (e.g., Cf) are mapped to nothing.
ZERO WIDTH SPACE (U+200B) is mapped to nothing. All other code points ZERO WIDTH SPACE (U+200B) is mapped to nothing. All other code points
with Separator (space, line, or paragraph) property (e.g, Zs, Zl, or with Separator (space, line, or paragraph) property (e.g, Zs, Zl, or
Zp) are mapped to SPACE (U+0020). Zp) are mapped to SPACE (U+0020).
Appendix B provides a table detailing the above mappings.
For case ignore, numeric, and stored prefix string matching rules, For case ignore, numeric, and stored prefix string matching rules,
characters are case folded per B.2 of [StringPrep]. characters are case folded per B.2 of [StringPrep].
The output is the mapped string. The output is the mapped string.
2.3. Normalize 2.3. Normalize
The input string is be normalized to Unicode Form KC (compatibility The input string is be normalized to Unicode Form KC (compatibility
composed) as described in [UAX15]. The output is the normalized composed) as described in [UAX15]. The output is the normalized
string. string.
2.4. Prohibit 2.4. Prohibit
All Unassigned code points are prohibited. Unassigned code points are All Unassigned code points are prohibited. Unassigned code points are
listed in Table A.1 of [StringPrep]. listed in Table A.1 of [StringPrep].
Characters which, per Section 5.8 of [Stringprep], change display
properties or are deprecated are prohibited. These characters are are
listed in Table C.8 of [StringPrep].
Private Use (U+E000-F8FF, F0000-FFFFD, 100000-10FFFD) code points are Private Use (U+E000-F8FF, F0000-FFFFD, 100000-10FFFD) code points are
prohibited. prohibited.
All non-character code points (U+FDD0-FDEF, FFFE-FFFF, 1FFFE-1FFFF, All non-character code points (U+FDD0-FDEF, FFFE-FFFF, 1FFFE-1FFFF,
2FFFE-2FFFF, 3FFFE-3FFFF, 4FFFE-4FFFF, 5FFFE-5FFFF, 6FFFE-6FFFF, 2FFFE-2FFFF, 3FFFE-3FFFF, 4FFFE-4FFFF, 5FFFE-5FFFF, 6FFFE-6FFFF,
7FFFE-7FFFF, 8FFFE-8FFFF, 9FFFE-9FFFF, AFFFE-AFFFF, BFFFE-BFFFF, 7FFFE-7FFFF, 8FFFE-8FFFF, 9FFFE-9FFFF, AFFFE-AFFFF, BFFFE-BFFFF,
CFFFE-CFFFF, DFFFE-DFFFF, EFFFE-EFFFF, FFFFE-FFFFF, 10FFFE-10FFFF) are CFFFE-CFFFF, DFFFE-DFFFF, EFFFE-EFFFF, FFFFE-FFFFF, 10FFFE-10FFFF) are
prohibited. prohibited.
Surrogate codes (U+D800-DFFFF) are prohibited. Surrogate codes (U+D800-DFFFF) are prohibited.
The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited. The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited.
The first code point of a string is prohibited from being a combining
character.
The step fails if the input string contains any prohibited code point. The step fails if the input string contains any prohibited code point.
The output is the input string. Otherwise, the output is the input string.
2.5. Check bidi 2.5. Check bidi
There are no bidirectional restrictions. The output is the input This step fails if the input string does not conform to the the
string. bidirectional character restrictions detailed in 6 of [Stringprep].
Otherwise, the output is the input string.
2.5. Insignificant Character Removal 2.6. Insignificant Character Removal
In this step, characters insignificant to the matching rule are to be In this step, characters insignificant to the matching rule are to be
removed. The characters to be removed differ from matching rule to removed. The characters to be removed differ from matching rule to
matching rule. matching rule.
Section 2.5.1 applies to case ignore and exact string matching. Section 2.6.1 applies to case ignore and exact string matching.
Section 2.5.2 applies to numericString matching. Section 2.6.2 applies to numericString matching.
Section 2.5.3 applies to telephoneNumber matching Section 2.6.3 applies to telephoneNumber matching.
2.5.1. Insignificant Space Removal 2.6.1. Insignificant Space Removal
For the purposes of this section, a space is defined to be the SPACE For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks. (U+0020) code point followed by no combining marks.
NOTE - The previous steps ensure that the string cannot contain any NOTE - The previous steps ensure that the string cannot contain any
code points in the separator class, other than SPACE (U+0020). code points in the separator class, other than SPACE (U+0020).
If the input string consists entirely of spaces or is empty, the If the input string consists entirely of spaces or is empty, the
output is a string consisting of exactly one space (e.g. " "). output is a string consisting of exactly one space (e.g. " ").
skipping to change at page 7, line 26 skipping to change at page 7, line 28
For example, removal of spaces from the Form KC string: For example, removal of spaces from the Form KC string:
"<SPACE><SPACE>foo<SPACE><SPACE>bar<SPACE><SPACE>" "<SPACE><SPACE>foo<SPACE><SPACE>bar<SPACE><SPACE>"
would result in the output string: would result in the output string:
"foo<SPACE>bar" "foo<SPACE>bar"
and the Form KC string: and the Form KC string:
"<SPACE><SPACE><SPACE>" "<SPACE><SPACE><SPACE>"
would result in the output string: would result in the output string:
"<SPACE>". "<SPACE>".
2.5.2. numericString Insignificant Character Removal 2.6.2. numericString Insignificant Character Removal
For the purposes of this section, a space is defined to be the SPACE For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks. (U+0020) code point followed by no combining marks.
All spaces are regarded as not significant. If the input string All spaces are regarded as not significant. If the input string
consists entirely of spaces or is empty, the output is a string consists entirely of spaces or is empty, the output is a string
consisting of exactly one space (e.g. " "). Otherwise, all spaces are consisting of exactly one space (e.g. " "). Otherwise, all spaces are
to be removed. to be removed.
For example, removal of spaces from the Form KC string: For example, removal of spaces from the Form KC string:
"<SPACE><SPACE>123<SPACE><SPACE>456<SPACE><SPACE>" "<SPACE><SPACE>123<SPACE><SPACE>456<SPACE><SPACE>"
would result in the output string: would result in the output string:
"123456" "123456"
and the Form KC string: and the Form KC string:
"<SPACE><SPACE><SPACE>" "<SPACE><SPACE><SPACE>"
would result in the output string: would result in the output string:
"<SPACE>". "<SPACE>".
2.5.3. telephoneNumber Insignificant Character Removal 2.6.3. telephoneNumber Insignificant Character Removal
For the purposes of this section, a hyphen is defined to be For the purposes of this section, a hyphen is defined to be
HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010), HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010),
NON-BREAKING HYPHEN (U+2011), MINUS SIGN (U+2212), SMALL HYPHEN-MINUS NON-BREAKING HYPHEN (U+2011), MINUS SIGN (U+2212), SMALL HYPHEN-MINUS
(U+FE63), or FULLWIDTH HYPHEN-MINUS (U+FF0D) code point followed by no (U+FE63), or FULLWIDTH HYPHEN-MINUS (U+FF0D) code point followed by no
combining marks and a space is defined to be the SPACE (U+0020) code combining marks and a space is defined to be the SPACE (U+0020) code
point followed by no combining marks. point followed by no combining marks.
All hyphens and spaces are considered insignificant. If the string All hyphens and spaces are considered insignificant. If the string
contains only spaces and hyphens or is empty, then the output is a contains only spaces and hyphens or is empty, then the output is a
skipping to change at page 8, line 46 skipping to change at page 9, line 4
The approach used in this document is based upon design principles and The approach used in this document is based upon design principles and
algorithms described in "Preparation of Internationalized Strings algorithms described in "Preparation of Internationalized Strings
('stringprep')" [StringPrep] by Paul Hoffman and Marc Blanchet. Some ('stringprep')" [StringPrep] by Paul Hoffman and Marc Blanchet. Some
additional guidance was drawn from Unicode Technical Standards, additional guidance was drawn from Unicode Technical Standards,
Technical Reports, and Notes. Technical Reports, and Notes.
This document is a product of the IETF LDAP Revision (LDAPBIS) Working This document is a product of the IETF LDAP Revision (LDAPBIS) Working
Group. Group.
6. Author's Address 6. Author's Address
Kurt D. Zeilenga
OpenLDAP Foundation
Kurt Zeilenga Email: Kurt@OpenLDAP.org
E-mail: <kurt@openldap.org>
7. References 7. References
7.1. Normative References 7.1. Normative References
[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 (also RFC 2119), March 1997. Requirement Levels", BCP 14 (also RFC 2119), March 1997.
[Roadmap] Zeilenga, K. (editor), "LDAP: Technical Specification [Roadmap] Zeilenga, K. (editor), "LDAP: Technical Specification
Road Map", draft-ietf-ldapbis-roadmap-xx.txt, a work in Road Map", draft-ietf-ldapbis-roadmap-xx.txt, a work in
progress. progress.
[StringPrep] Hoffman P. and M. Blanchet, "Preparation of [StringPrep] Hoffman P. and M. Blanchet, "Preparation of
Internationalized Strings ('stringprep')", Internationalized Strings ('stringprep')",
draft-hoffman-rfc3454bis-xx.txt, a work in progress. draft-hoffman-rfc3454bis-xx.txt, a work in progress.
[Syntaxes] Legg, S. (editor), "LDAP: Syntaxes and Matching Rules", [Syntaxes] Legg, S. (editor), "LDAP: Syntaxes and Matching Rules",
draft-ietf-ldapbis-syntaxes-xx.txt, a work in progress. draft-ietf-ldapbis-syntaxes-xx.txt, a work in progress.
[ISO10646] International Organization for Standardization,
"Universal Multiple-Octet Coded Character Set (UCS) -
Architecture and Basic Multilingual Plane", ISO/IEC
10646-1 : 1993.
[Unicode] The Unicode Consortium, "The Unicode Standard, Version [Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version 3.0" 3.2.0" is defined by "The Unicode Standard, Version 3.0"
(Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
as amended by the "Unicode Standard Annex #27: Unicode as amended by the "Unicode Standard Annex #27: Unicode
3.1" (http://www.unicode.org/reports/tr27/) and by the 3.1" (http://www.unicode.org/reports/tr27/) and by the
"Unicode Standard Annex #28: Unicode 3.2" "Unicode Standard Annex #28: Unicode 3.2"
(http://www.unicode.org/reports/tr28/). (http://www.unicode.org/reports/tr28/).
[UAX15] Davis, M. and M. Duerst, "Unicode Standard Annex #15: [UAX15] Davis, M. and M. Duerst, "Unicode Standard Annex #15:
Unicode Normalization Forms, Version 3.2.0". Unicode Normalization Forms, Version 3.2.0".
skipping to change at page 17, line 40 skipping to change at page 17, line 38
48| 021e | 01cf | ?? | 01e8 | 013d | ?? | 0147 | 01d1 | 48| 021e | 01cf | ?? | 01e8 | 013d | ?? | 0147 | 01d1 |
50| ?? | ?? | 0158 | 0160 | 0164 | 01d3 | ?? | ?? | 50| ?? | ?? | 0158 | 0160 | 0164 | 01d3 | ?? | ?? |
58| ?? | ?? | 017d | ?? | ?? | ?? | ?? | ?? | 58| ?? | ?? | 017d | ?? | ?? | ?? | ?? | ?? |
60| ?? | 01ce | ?? | 010d | 010f | 011b | ?? | 01e7 | 60| ?? | 01ce | ?? | 010d | 010f | 011b | ?? | 01e7 |
68| 021f | 01d0 | 01f0 | 01e9 | 013e | ?? | 0148 | 01d2 | 68| 021f | 01d0 | 01f0 | 01e9 | 013e | ?? | 0148 | 01d2 |
70| ?? | ?? | 0159 | 0161 | 0165 | 01d4 | ?? | ?? | 70| ?? | ?? | 0159 | 0161 | 0165 | 01d4 | ?? | ?? |
78| ?? | ?? | 017e | ?? | ?? | ?? | ?? | ?? | 78| ?? | ?? | 017e | ?? | ?? | ?? | ?? | ?? |
--+------+------+------+------+------+------+------+------+ --+------+------+------+------+------+------+------+------+
Table B.14: Mapping of T.61 Caron Accent Combinations Table B.14: Mapping of T.61 Caron Accent Combinations
Appendix B -- Mapping Table
Input Output
----- ------
0000-0008
0009-000D 0020
000E-001F
007F-009F
0085 0020
00A0 0020
00AD
034F
06DD
070F
1680 0020
1806
180B-180E
2000-200A 0020
200B-200F
2028-2029 0020
202A-202E
202F 0020
205F 0020
2060-2063
206A-206F
3000 0020
FEFF
FF00-FE0F
FFF9-FFFC
1D173-1D17A
E0001
E0020-E007F
Intellectual Property Rights Intellectual Property Rights
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights might or document or the extent to which any license under such rights might or
might not be available; neither does it represent that it has made any might not be available; neither does it represent that it has made any
effort to identify any such rights. Information on the IETF's effort to identify any such rights. Information on the IETF's
procedures with respect to rights in standards-track and procedures with respect to rights in standards-track and
standards-related documentation can be found in BCP-11. Copies of standards-related documentation can be found in BCP-11. Copies of
skipping to change at page 18, line 18 skipping to change at page 19, line 4
rights by implementors or users of this specification can be obtained rights by implementors or users of this specification can be obtained
from the IETF Secretariat. from the IETF Secretariat.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to practice rights which may cover technology that may be required to practice
this standard. Please address the information to the IETF Executive this standard. Please address the information to the IETF Executive
Director. Director.
Full Copyright Full Copyright
Copyright (C) The Internet Society (2004). All Rights Reserved.
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it others, and derivative works that comment on or otherwise explain it
or assist in its implmentation may be prepared, copied, published and or assist in its implementation may be prepared, copied, published and
distributed, in whole or in part, without restriction of any kind, distributed, in whole or in part, without restriction of any kind,
provided that the above copyright notice and this paragraph are provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be followed, copyrights defined in the Internet Standards process must be followed,
or as required to translate it into languages other than English. or as required to translate it into languages other than English.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/