]> git.sur5r.net Git - openldap/blob - doc/drafts/draft-ietf-ldapbis-strprep-xx.txt
Return to release engineering
[openldap] / doc / drafts / draft-ietf-ldapbis-strprep-xx.txt
1
2
3
4
5
6
7 Internet-Draft                                      Kurt D. Zeilenga
8 Intended Category: Standard Track                OpenLDAP Foundation
9 Expires in six months                                23 January 2006
10
11
12
13                 LDAP: Internationalized String Preparation
14                    <draft-ietf-ldapbis-strprep-07.txt>
15
16
17
18 Status of this Memo
19
20   This document is intended to be published as a Standard Track RFC.
21   Distribution of this memo is unlimited.  Technical discussion of this
22   document will take place on the IETF LDAP Revision Working Group
23   mailing list <ietf-ldapbis@openldap.org>.  Please send editorial
24   comments directly to the editor <Kurt@OpenLDAP.org>.
25
26   By submitting this Internet-Draft, each author represents that any
27   applicable patent or other IPR claims of which he or she is aware have
28   been or will be disclosed, and any of which he or she becomes aware
29   will be disclosed, in accordance with Section 6 of BCP 79.
30
31   Internet-Drafts are working documents of the Internet Engineering Task
32   Force (IETF), its areas, and its working groups. Note that other
33   groups may also distribute working documents as Internet-Drafts.
34
35   Internet-Drafts are draft documents valid for a maximum of six months
36   and may be updated, replaced, or obsoleted by other documents at any
37   time. It is inappropriate to use Internet-Drafts as reference material
38   or to cite them other than as "work in progress."
39
40   The list of current Internet-Drafts can be accessed at
41   http://www.ietf.org/1id-abstracts.html
42
43   The list of Internet-Draft Shadow Directories can be accessed at
44   http://www.ietf.org/shadow.html
45
46
47   Copyright (C) The Internet Society (2006).  All Rights Reserved.
48
49   Please see the Full Copyright section near the end of this document
50   for more information.
51
52
53
54
55
56
57
58 Zeilenga                        LDAPprep                        [Page 1]
59 \f
60 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
61
62
63 Abstract
64
65   The previous Lightweight Directory Access Protocol (LDAP) technical
66   specifications did not precisely define how character string matching
67   is to be performed.  This led to a number of usability and
68   interoperability problems.  This document defines string preparation
69   algorithms for character-based matching rules defined for use in LDAP.
70
71
72 Conventions and Terms
73
74   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
75   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
76   document are to be interpreted as described in BCP 14 [RFC2119].
77
78   Character names in this document use the notation for code points and
79   names from the Unicode Standard [Unicode].  For example, the letter
80   "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
81   In the lists of mappings and the prohibited characters, the "U+" is
82   left off to make the lists easier to read.  The comments for character
83   ranges are shown in square brackets (such as "[CONTROL CHARACTERS]")
84   and do not come from the standard.
85
86   Note: a glossary of terms used in Unicode can be found in [Glossary].
87   Information on the Unicode character encoding model can be found in
88   [CharModel].
89
90   The term "combining mark", as used in this specification, refers to
91   any Unicode [Unicode] code point which has a mark property (Mn, Mc,
92   Me).  Appendix A provides a definitive list of combining marks.
93
94
95 1. Introduction
96
97 1.1. Background
98
99   A Lightweight Directory Access Protocol (LDAP) [Roadmap] matching rule
100   [Syntaxes] defines an algorithm for determining whether a presented
101   value matches an attribute value in accordance with the criteria
102   defined for the rule.  The proposition may be evaluated to True,
103   False, or Undefined.
104
105       True      - the attribute contains a matching value,
106
107       False     - the attribute contains no matching value,
108
109       Undefined - it cannot be determined whether the attribute contains
110                   a matching value or not.
111
112
113
114 Zeilenga                        LDAPprep                        [Page 2]
115 \f
116 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
117
118
119   For instance, the caseIgnoreMatch matching rule may be used to compare
120   whether the commonName attribute contains a particular value without
121   regard for case and insignificant spaces.
122
123
124 1.2. X.500 String Matching Rules
125
126   "X.520: Selected attribute types" [X.520] provides (amongst other
127   things) value syntaxes and matching rules for comparing values
128   commonly used in the Directory.  These specifications are inadequate
129   for strings composed of Unicode [Unicode] characters.
130
131   The caseIgnoreMatch matching rule [X.520], for example, is simply
132   defined as being a case insensitive comparison where insignificant
133   spaces are ignored.  For printableString, there is only one space
134   character and case mapping is bijective, hence this definition is
135   sufficient.  However, for Unicode string types such as
136   universalString, this is not sufficient.  For example, a case
137   insensitive matching implementation which folded lower case characters
138   to upper case would yield different different results than an
139   implementation which used upper case to lower case folding.  Or one
140   implementation may view space as referring to only SPACE (U+0020), a
141   second implementation may view any character with the space separator
142   (Zs) property as a space, and another implementation may view any
143   character with the whitespace (WS) category as a space.
144
145   The lack of precise specification for character string matching has
146   led to significant interoperability problems.  When used in
147   certificate chain validation, security vulnerabilities can arise.  To
148   address these problems, this document defines precise algorithms for
149   preparing character strings for matching.
150
151
152 1.3. Relationship to "stringprep"
153
154   The character string preparation algorithms described in this document
155   are based upon the "stringprep" approach [RFC3454].  In "stringprep",
156   presented and stored values are first prepared for comparison and so
157   that a character-by-character comparison yields the "correct" result.
158
159   The approach used here is a refinement of the "stringprep" [RFC3454]
160   approach.  Each algorithm involves two additional preparation steps.
161
162   a) prior to applying the Unicode string preparation steps outlined in
163      "stringprep", the string is transcoded to Unicode;
164
165   b) after applying the Unicode string preparation steps outlined in
166      "stringprep", the string is modified to appropriately handle
167
168
169
170 Zeilenga                        LDAPprep                        [Page 3]
171 \f
172 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
173
174
175      characters insignificant to the matching rule.
176
177   Hence, preparation of character strings for X.500 matching involves
178   the following steps:
179
180       1) Transcode
181       2) Map
182       3) Normalize
183       4) Prohibit
184       5) Check Bidi (Bidirectional)
185       6) Insignificant Character Handling
186
187   These steps are described in Section 2.
188
189   It is noted that while various tables of Unicode characters included
190   or referenced by this specification are derived from Unicode [UNICODE]
191   data, these tables are to be considered definitive for the purpose of
192   implementing this specification.
193
194
195 1.4. Relationship to the LDAP Technical Specification
196
197   This document is a integral part of the LDAP technical specification
198   [Roadmap] which obsoletes the previously defined LDAP technical
199   specification [RFC3377] in its entirety.
200
201   This document details new LDAP internationalized character string
202   preparation algorithms used by [Syntaxes] and possible other technical
203   specifications defining LDAP syntaxes and/or matching rules.
204
205
206 1.5. Relationship to X.500
207
208   LDAP is defined [Roadmap] in X.500 terms as an X.500 access mechanism.
209   As such, there is a strong desire for alignment between LDAP and X.500
210   syntax and semantics.  The character string preparation algorithms
211   described in this document are based upon "Internationalized String
212   Matching Rules for X.500" [XMATCH] proposal to ITU/ISO Joint Study
213   Group 2.
214
215
216 2. String Preparation
217
218   The following six-step process SHALL be applied to each presented and
219   attribute value in preparation for character string matching rule
220   evaluation.
221
222       1) Transcode
223
224
225
226 Zeilenga                        LDAPprep                        [Page 4]
227 \f
228 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
229
230
231       2) Map
232       3) Normalize
233       4) Prohibit
234       5) Check bidi
235       6) Insignificant Character Handling
236
237   Failure in any step causes the assertion to evaluate to Undefined.
238
239   The character repertoire of this process is Unicode 3.2 [Unicode].
240
241   Note that this six-step process specification is intended to described
242   expected matching behavior.   Implementations are free use alternative
243   processes so long as the matching rule evaluation behavior provided is
244   consistent with the behavior described by this specification.
245
246
247 2.1. Transcode
248
249   Each non-Unicode string value is transcoded to Unicode.
250
251   PrintableString [X.680] value are transcoded directly to Unicode.
252
253   UniversalString, UTF8String, and bmpString [X.680] values need not be
254   transcoded as they are Unicode-based strings (in the case of
255   bmpString, a subset of Unicode).
256
257   TeletexString [X.680] values are transcoded to Unicode.  As there is
258   no standard for mapping TeletexString values to Unicode, the mapping
259   is left a local matter.
260
261   For these and other reasons, use of TeletexString is NOT RECOMMENDED.
262
263   The output is the transcoded string.
264
265
266 2.2. Map
267
268   SOFT HYPHEN (U+00AD) and MONGOLIAN TODO SOFT HYPHEN (U+1806) code
269   points are mapped to nothing.  COMBINING GRAPHEME JOINER (U+034F) and
270   VARIATION SELECTORs (U+180B-180D, FF00-FE0F) code points are also
271   mapped to nothing.  The OBJECT REPLACEMENT CHARACTER (U+FFFC) is
272   mapped to nothing.
273
274   CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
275   TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
276   (U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
277
278   All other control code (e.g., Cc) points or code points with a control
279
280
281
282 Zeilenga                        LDAPprep                        [Page 5]
283 \f
284 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
285
286
287   function (e.g., Cf) are mapped to nothing.  The following is a
288   complete list of these code points: U+0000-0008, 000E-001F, 007F-0084,
289   0086-009F, 06DD, 070F, 180E, 200C-200F, 202A-202E, 2060-2063,
290   206A-206F, FEFF, FFF9-FFFB, 1D173-1D17A, E0001, E0020-E007F.
291
292   ZERO WIDTH SPACE (U+200B) is mapped to nothing.  All other code points
293   with Separator (space, line, or paragraph) property (e.g, Zs, Zl, or
294   Zp) are mapped to SPACE (U+0020).  The following is a complete list of
295   these code points: U+0020, 00A0, 1680, 2000-200A, 2028-2029, 202F,
296   205F, 3000.
297
298   For case ignore, numeric, and stored prefix string matching rules,
299   characters are case folded per B.2 of [RFC3454].
300
301   The output is the mapped string.
302
303
304 2.3. Normalize
305
306   The input string is be normalized to Unicode Form KC (compatibility
307   composed) as described in [UAX15].  The output is the normalized
308   string.
309
310
311 2.4. Prohibit
312
313   All Unassigned code points are prohibited.  Unassigned code points are
314   listed in Table A.1 of [RFC3454].
315
316   Characters which, per Section 5.8 of [Stringprep], change display
317   properties or are deprecated are prohibited.  These characters are are
318   listed in Table C.8 of [RFC3454].
319
320   Private Use code points are prohibited.  These characters are listed
321   in Table C.3 of [RFC3454].
322
323   All non-character code points are prohibited.  These code points are
324   listed in Table C.4 of [RFC3454].
325
326   Surrogate codes are prohibited.  These characters are listed in Table
327   C.5 of [RFC3454].
328
329   The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited.
330
331   The step fails if the input string contains any prohibited code point.
332   Otherwise, the output is the input string.
333
334
335
336
337
338 Zeilenga                        LDAPprep                        [Page 6]
339 \f
340 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
341
342
343 2.5. Check bidi
344
345   Bidirectional characters are ignored.
346
347
348 2.6. Insignificant Character Handling
349
350   In this step, the string is modified to ensure proper handling of
351   characters insignificant to the matching rule.  This modification
352   differs from matching rule to matching rule.
353
354   Section 2.6.1 applies to case ignore and exact string matching.
355   Section 2.6.2 applies to numericString matching.
356   Section 2.6.3 applies to telephoneNumber matching.
357
358
359 2.6.1. Insignificant Space Handling
360
361   For the purposes of this section, a space is defined to be the SPACE
362   (U+0020) code point followed by no combining marks.
363
364   NOTE - The previous steps ensure that the string cannot contain any
365          code points in the separator class, other than SPACE (U+0020).
366
367   If the input string contains at least one non-space character, then
368   the string is modified such that the string starts with exactly one
369   space character, ends with exactly one SPACE character, and that any
370   inner (non-empty) sequence of space characters is replaced with
371   exactly two SPACE characters.  For instance, the input strings
372   "foo<SPACE>bar<SPACE><SPACE>", results in the output
373   "<SPACE>foo<SPACE><SPACE>bar<SPACE>".
374
375   Otherwise, if the string being prepared is an initial, any, or final
376   substring, then the output string is exactly one SPACE character, else
377   the output string is exactly two SPACEs.
378
379   Appendix B discusses the rationale for the behavior.
380
381
382 2.6.2. numericString Insignificant Character Handling
383
384   For the purposes of this section, a space is defined to be the SPACE
385   (U+0020) code point followed by no combining marks.
386
387   All spaces are regarded as insignificant and are to be removed.
388
389   For example, removal of spaces from the Form KC string:
390       "<SPACE><SPACE>123<SPACE><SPACE>456<SPACE><SPACE>"
391
392
393
394 Zeilenga                        LDAPprep                        [Page 7]
395 \f
396 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
397
398
399   would result in the output string:
400       "123456"
401   and the Form KC string:
402       "<SPACE><SPACE><SPACE>"
403   would result in the output string:
404       "" (an empty string).
405
406
407 2.6.3. telephoneNumber Insignificant Character Handling
408
409   For the purposes of this section, a hyphen is defined to be
410   HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010),
411   NON-BREAKING HYPHEN (U+2011), MINUS SIGN (U+2212), SMALL HYPHEN-MINUS
412   (U+FE63), or FULLWIDTH HYPHEN-MINUS (U+FF0D) code point followed by no
413   combining marks and a space is defined to be the SPACE (U+0020) code
414   point followed by no combining marks.
415
416   All hyphens and spaces are considered insignificant and are to be
417   removed.
418
419   For example, removal of hyphens and spaces from the Form KC string:
420       "<SPACE><HYPHEN>123<SPACE><SPACE>456<SPACE><HYPHEN>"
421   would result in the output string:
422       "123456"
423   and the Form KC string:
424       "<HYPHEN><HYPHEN><HYPHEN>"
425   would result in the (empty) output string:
426       "".
427
428
429 3. Security Considerations
430
431   "Preparation for International Strings ('stringprep')" [RFC3454]
432   security considerations generally apply to the algorithms described
433   here.
434
435
436 4. Acknowledgments
437
438   The approach used in this document is based upon design principles and
439   algorithms described in "Preparation of Internationalized Strings
440   ('stringprep')" [RFC3454] by Paul Hoffman and Marc Blanchet.  Some
441   additional guidance was drawn from Unicode Technical Standards,
442   Technical Reports, and Notes.
443
444   This document is a product of the IETF LDAP Revision (LDAPBIS) Working
445   Group.
446
447
448
449
450 Zeilenga                        LDAPprep                        [Page 8]
451 \f
452 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
453
454
455 5. Author's Address
456
457   Kurt D. Zeilenga
458   OpenLDAP Foundation
459
460   Email: Kurt@OpenLDAP.org
461
462
463 6. References
464
465   [[Note to the RFC Editor: please replace the citation tags used in
466   referencing Internet-Drafts with tags of the form RFCnnnn where
467   possible.]]
468
469
470 6.1. Normative References
471
472   [RFC2119]     Bradner, S., "Key words for use in RFCs to Indicate
473                 Requirement Levels", BCP 14 (also RFC 2119), March 1997.
474
475   [RFC3454]     Hoffman, P. and M. Blanchet, "Preparation of
476                 Internationalized Strings ('stringprep')", RFC 3454,
477                 December 2002.
478
479   [Roadmap]     Zeilenga, K. (editor), "LDAP: Technical Specification
480                 Road Map", draft-ietf-ldapbis-roadmap-xx.txt, a work in
481                 progress.
482
483   [Syntaxes]    Legg, S. (editor), "LDAP: Syntaxes and Matching Rules",
484                 draft-ietf-ldapbis-syntaxes-xx.txt, a work in progress.
485
486   [Unicode]     The Unicode Consortium, "The Unicode Standard, Version
487                 3.2.0" is defined by "The Unicode Standard, Version 3.0"
488                 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
489                 as amended by the "Unicode Standard Annex #27: Unicode
490                 3.1" (http://www.unicode.org/reports/tr27/) and by the
491                 "Unicode Standard Annex #28: Unicode 3.2"
492                 (http://www.unicode.org/reports/tr28/).
493
494   [UAX15]       Davis, M. and M. Duerst, "Unicode Standard Annex #15:
495                 Unicode Normalization Forms, Version 3.2.0".
496                 <http://www.unicode.org/unicode/reports/tr15/tr15-22.html>,
497                 March 2002.
498
499   [X.680]       International Telecommunication Union -
500                 Telecommunication Standardization Sector, "Abstract
501                 Syntax Notation One (ASN.1) - Specification of Basic
502                 Notation", X.680(2002) (also ISO/IEC 8824-1:2002).
503
504
505
506 Zeilenga                        LDAPprep                        [Page 9]
507 \f
508 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
509
510
511 6.2. Informative References
512
513   [X.500]       International Telecommunication Union -
514                 Telecommunication Standardization Sector, "The Directory
515                 -- Overview of concepts, models and services,"
516                 X.500(1993) (also ISO/IEC 9594-1:1994).
517
518   [X.501]       International Telecommunication Union -
519                 Telecommunication Standardization Sector, "The Directory
520                 -- Models," X.501(1993) (also ISO/IEC 9594-2:1994).
521
522   [X.520]       International Telecommunication Union -
523                 Telecommunication Standardization Sector, "The
524                 Directory: Selected Attribute Types", X.520(1993) (also
525                 ISO/IEC 9594-6:1994).
526
527   [Glossary]    The Unicode Consortium, "Unicode Glossary",
528                 <http://www.unicode.org/glossary/>.
529
530   [CharModel]   Whistler, K. and M. Davis, "Unicode Technical Report
531                 #17, Character Encoding Model", UTR17,
532                 <http://www.unicode.org/unicode/reports/tr17/>, August
533                 2000.
534
535   [Filters]     Smith, M. (editor), LDAPbis WG, "LDAP: String
536                 Representation of Search Filters",
537                 draft-ietf-ldapbis-filter-xx.txt, a work in progress.
538
539   [XMATCH]      Zeilenga, K., "Internationalized String Matching Rules
540                 for X.500", draft-zeilenga-ldapbis-strmatch-xx.txt, a
541                 work in progress.
542
543
544 Appendix A.  Combining Marks
545
546                 This appendix is normative.
547
548                 This table was derived from Unicode [Unicode] data
549                 files, it lists all code points with the Mn, Mc, or Me
550                 properties.  This table is to be considered definitive
551                 for the purposes of implementation of this
552                 specification.
553
554
555                 0300-034F 0360-036F 0483-0486 0488-0489 0591-05A1
556                 05A3-05B9 05BB-05BC 05BF 05C1-05C2 05C4 064B-0655 0670
557                 06D6-06DC 06DE-06E4 06E7-06E8 06EA-06ED 0711 0730-074A
558                 07A6-07B0 0901-0903 093C 093E-094F 0951-0954 0962-0963
559
560
561
562 Zeilenga                        LDAPprep                       [Page 10]
563 \f
564 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
565
566
567                 0981-0983 09BC 09BE-09C4 09C7-09C8 09CB-09CD 09D7
568                 09E2-09E3 0A02 0A3C 0A3E-0A42 0A47-0A48 0A4B-0A4D
569                 0A70-0A71 0A81-0A83 0ABC 0ABE-0AC5 0AC7-0AC9 0ACB-0ACD
570                 0B01-0B03 0B3C 0B3E-0B43 0B47-0B48 0B4B-0B4D 0B56-0B57
571                 0B82 0BBE-0BC2 0BC6-0BC8 0BCA-0BCD 0BD7 0C01-0C03
572                 0C3E-0C44 0C46-0C48 0C4A-0C4D 0C55-0C56 0C82-0C83
573                 0CBE-0CC4 0CC6-0CC8 0CCA-0CCD 0CD5-0CD6 0D02-0D03
574                 0D3E-0D43 0D46-0D48 0D4A-0D4D 0D57 0D82-0D83 0DCA
575                 0DCF-0DD4 0DD6 0DD8-0DDF 0DF2-0DF3 0E31 0E34-0E3A
576                 0E47-0E4E 0EB1 0EB4-0EB9 0EBB-0EBC 0EC8-0ECD 0F18-0F19
577                 0F35 0F37 0F39 0F3E-0F3F 0F71-0F84 0F86-0F87 0F90-0F97
578                 0F99-0FBC 0FC6 102C-1032 1036-1039 1056-1059 1712-1714
579                 1732-1734 1752-1753 1772-1773 17B4-17D3 180B-180D 18A9
580                 20D0-20EA 302A-302F 3099-309A FB1E FE00-FE0F FE20-FE23
581                 1D165-1D169 1D16D-1D172 1D17B-1D182 1D185-1D18B
582                 1D1AA-1D1AD
583
584
585
586 Appendix B.  Substrings Matching
587
588                 This appendix is non-normative.
589
590                 In absence of substrings matching, the insignificant
591                 space handling for case ignore/exact matching could be
592                 simplified.   Specifically, the handling could be as
593                 require all sequences of one or more spaces be replaced
594                 with one space and, if string contains non-space
595                 characters, removal of all all leading spaces and
596                 trailing spaces.
597
598                 In the presence of substrings matching, this simplified
599                 space handling would lead to unexpected and undesirable
600                 matching behavior.  For instance:
601   1) (CN=foo\20*\20bar) would match the CN value "foobar" but not
602     "foo<SPACE>bar" nor "foo<SPACE><SPACE>bar";
603   2) (CN=*\20foobar\20*) would match "foobar", but (CN=*\20*foobar*\20*)
604     would not;
605   3) (CN=foo\20*\20bar) would match "foo<SPACE>X<SPACE>bar" but not
606     "foo<SPACE><SPACE>bar".
607
608   Note to readers not familiar with LDAP substrings matching: the LDAP
609   filter [Filters] assertion (CN=A*B*C) says "match any value (of the
610   attribute CN) which begins with A, contains B after A, ends with C
611   where C is also after B."
612
613   The first case illustrates that this simplified space handling would
614   cause leading and trailing spaces in substrings of the string to be
615
616
617
618 Zeilenga                        LDAPprep                       [Page 11]
619 \f
620 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
621
622
623   regarded as insignificant.  However, only leading and trailing (as
624   well as multiple consecutive spaces) of the string (as a whole) are
625   insignificant.
626
627   The second case illustrates that this simplified space handling would
628   cause sub-partitioning failures.  That is, if a prepared any substring
629   matches a partition of the attribute value, then an assertion
630   constructed by subdividing that substring into multiple substrings
631   should also match.
632
633   The third case illustrates that this simplified space handling causes
634   another partitioning failure.  Though both the initial or final
635   strings match different portions of "foo<SPACE>X<SPACE>bar" with
636   neither matching the X portion, they don't match a string consisting
637   of the two matched portions less the unmatched X portion.
638
639   In designing an appropriate approach for space handling for substrings
640   matching, one must study key aspects of X.500 case exact/ignore
641   matching.  X.520 [X.520] says:
642       The [substrings] rule returns TRUE if there is a partitioning of
643       the attribute value (into portions) such that:
644       - the specified substrings (initial, any, final) match different
645         portions of the value in the order of the strings sequence;
646       - initial, if present, matches the first portion of the value;
647       - final, if present, matches the last portion of the value;
648       - any, if present, matches some arbitrary portion of the value.
649
650   That is, the substrings assertion (CN=foo\20*\20bar) matches the
651   attribute value "foo<SPACE><SPACE>bar" as the value can be partitioned
652   into the portions "foo<SPACE>" and "<SPACE>bar" meeting the above
653   requirements.
654
655   X.520 also says:
656       [T]he following spaces are regarded as not significant:
657       - leading spaces (i.e. those preceding the first character that is
658         not a space);
659       - trailing spaces (i.e. those following the last character that is
660         not a space);
661       - multiple consecutive spaces (these are taken as equivalent to a
662         single space character).
663
664   This statement applies to the assertion values and attribute values
665   as whole strings, and not individually to substrings of an assertion
666   value.  In particular, the statements should be taken to mean that
667   if an assertion value and attribute value match without any
668   consideration to insignificant characters, then that assertion value
669   should also match any attribute value which differs only by inclusion
670   or removal of insignificant characters.
671
672
673
674 Zeilenga                        LDAPprep                       [Page 12]
675 \f
676 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
677
678
679   Hence, the assertion (CN=foo\20*\20bar) matches
680   "foo<SPACE><SPACE><SPACE>bar" and "foo<SPACE>bar" as these values
681   only differ from "foo<SPACE><SPACE>bar" by the inclusion or removal
682   of insignificant spaces.
683
684   Astute readers of this text will also note that there are special
685   cases where the specified space handling does not ignore spaces
686   which could be considered insignificant.   For instance, the assertion
687   (CN=\20*\20*\20) does not match "<SPACE><SPACE><SPACE>"
688   (insignificant spaces present in value) nor " " (insignificant
689   spaces not present in value).   However, as these cases have no
690   practical application that cannot be met by simple assertions, e.g.
691   (cn=\20), and this minor anomaly can only be fully addressed by a
692   preparation algorithm to be used in conjunction with
693   character-by-character partitioning and matching, the anomaly is
694   considered acceptable.
695
696
697
698 Intellectual Property Rights
699
700   The IETF takes no position regarding the validity or scope of any
701   Intellectual Property Rights or other rights that might be claimed
702   to pertain to the implementation or use of the technology described
703   in this document or the extent to which any license under such
704   rights might or might not be available; nor does it represent that
705   it has made any independent effort to identify any such rights.
706   Information on the procedures with respect to rights in RFC documents
707   can be found in BCP 78 and BCP 79.
708
709   Copies of IPR disclosures made to the IETF Secretariat and any
710   assurances of licenses to be made available, or the result of an
711   attempt made to obtain a general license or permission for the use
712   of such proprietary rights by implementers or users of this
713   specification can be obtained from the IETF on-line IPR repository
714   at http://www.ietf.org/ipr.
715
716   The IETF invites any interested party to bring to its attention any
717   copyrights, patents or patent applications, or other proprietary
718   rights that may cover technology that may be required to implement
719   this standard.  Please address the information to the IETF at
720   ietf-ipr@ietf.org.
721
722
723
724 Full Copyright
725
726   Copyright (C) The Internet Society (2006).
727
728
729
730 Zeilenga                        LDAPprep                       [Page 13]
731 \f
732 Internet-Draft        draft-ietf-ldapbis-strprep-07      23 January 2006
733
734
735   This document is subject to the rights, licenses and restrictions
736   contained in BCP 78, and except as set forth therein, the authors
737   retain all their rights.
738
739   This document and the information contained herein are provided on an
740   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
741   REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
742   INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
743   IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
744   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
745   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786 Zeilenga                        LDAPprep                       [Page 14]
787 \f