draft-ietf-asid-ldapv3-filter-01.txt   draft-ietf-asid-ldapv3-filter-02.txt 
Network Working Group Tim Howes Network Working Group Tim Howes
INTERNET DRAFT Netscape Communications Corp. INTERNET DRAFT Netscape Communications Corp.
Expires in six months
The String Representation of LDAP Search Filters The String Representation of LDAP Search Filters
<draft-ietf-asid-ldapv3-filter-01.txt> <draft-ietf-asid-ldapv3-filter-02.txt>
1. Status of this Memo 1. Status of this Memo
This document is an Internet-Draft. Internet-Drafts are working docu- This document is an Internet-Draft. Internet-Drafts are working docu-
ments of the Internet Engineering Task Force (IETF), its areas, and its ments of the Internet Engineering Task Force (IETF), its areas, and its
working groups. Note that other groups may also distribute working working groups. Note that other groups may also distribute working
documents as Internet-Drafts. documents as Internet-Drafts.
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
skipping to change at page 3, line 6 skipping to change at page 3, line 6
AttributeValue ::= OCTET STRING AttributeValue ::= OCTET STRING
MatchingRuleID ::= LDAPString MatchingRuleID ::= LDAPString
AssertionValue ::= OCTET STRING AssertionValue ::= OCTET STRING
LDAPString ::= OCTET STRING LDAPString ::= OCTET STRING
where the LDAPString above is limited to the UTF-8 encoding of the ISO where the LDAPString above is limited to the UTF-8 encoding of the ISO
10646 [4] character set. The AttributeDescription is a string represen- 10646 character set [4]. The AttributeDescription is a string represen-
tation of the attribute description name and is defined in [1]. The tation of the attribute description and is defined in [1]. The Attribu-
AttributeValue and AssertionValue OCTET STRING have the form defined in teValue and AssertionValue OCTET STRING have the form defined in [2].
[2]. The Filter is encoded for transmission over a network using the The Filter is encoded for transmission over a network using the Basic
Basic Encoding Rules defined in [3], with simplifications described in Encoding Rules defined in [3], with simplifications described in [1].
[1].
4. String Search Filter Definition 4. String Search Filter Definition
The string representation of an LDAP search filter is defined by the The string representation of an LDAP search filter is defined by the
following grammar, following the ABNF notation defined in [5]. The following grammar, following the ABNF notation defined in [5]. The
filter format uses a prefix notation. filter format uses a prefix notation.
filter = "(" filtercomp ")" filter = "(" filtercomp ")"
filtercomp = and / or / not / item filtercomp = and / or / not / item
and = "&" filterlist and = "&" filterlist
skipping to change at page 4, line 15 skipping to change at page 4, line 15
If a value should contain any of the following characters If a value should contain any of the following characters
Character ASCII value Character ASCII value
--------------------------- ---------------------------
* 0x2a * 0x2a
( 0x28 ( 0x28
) 0x29 ) 0x29
\ 0x5c \ 0x5c
NUL 0x00 NUL 0x00
the character must be encoded as the backslash '\' character followed by the character must be encoded as the backslash '\' character (ASCII
the two hexadecimal digits representing the ASCII value of the encoded 0x5c) followed by the two hexadecimal digits representing the ASCII
character. value of the encoded character. The case of the two hexadecimal digits
is not significant.
This simple escaping mechanism eliminates filter-parsing ambiguities and This simple escaping mechanism eliminates filter-parsing ambiguities and
allows any filter that can be represented in LDAP to be represented as a allows any filter that can be represented in LDAP to be represented as a
NUL-terminated string. The case of the two hexadecimal digits is not NUL-terminated string. Other characters besides the ones listed above
significant. Other characters besides the ones listed above may be may be escaped using this mechanism, for example, non-printing charac-
escaped using this mechanism, for example, non-printing characters. ters.
For example, the filter checking whether the "cn" attribute contained a For example, the filter checking whether the "cn" attribute contained a
value with the character "*" anywhere in it would be represented as value with the character "*" anywhere in it would be represented as
"(cn=*\2a*)". "(cn=*\2a*)".
Note that although both the substring and present productions in the Note that although both the substring and present productions in the
grammar above can produce the "attr=*" construct, this construct is used grammar above can produce the "attr=*" construct, this construct is used
only to denote a presence filter. only to denote a presence filter.
5. Examples 5. Examples
skipping to change at page 4, line 48 skipping to change at page 4, line 49
(cn=Babs Jensen) (cn=Babs Jensen)
(!(cn=Tim Howes)) (!(cn=Tim Howes))
(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*))) (&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))
(o=univ*of*mich*) (o=univ*of*mich*)
The following examples illustrate the use of extensible matching. The following examples illustrate the use of extensible matching.
(cn:1.2.3.4.5:=Fred Flintstone) (cn:1.2.3.4.5:=Fred Flintstone)
(sn:dn:2.4.6.8.10:=Barney Rubble) (sn:dn:2.4.6.8.10:=Barney Rubble)
(o:dn:=Ace Industry) (o:dn:=Ace Industry)
(:dn:2.4.6.8.10:=Dino)
The second example illustrates the use of the ":dn" notation to indicate The second example illustrates the use of the ":dn" notation to indicate
that matching rule "2.4.6.8.10" should be used when making comparisons, that matching rule "2.4.6.8.10" should be used when making comparisons,
and that the attributes of an entry's distinguished name should be con- and that the attributes of an entry's distinguished name should be con-
sidered part of the entry when evaluating the match. sidered part of the entry when evaluating the match.
The third example denotes an equality match, except that DN components The third example denotes an equality match, except that DN components
should be considered part of the entry when doing the match. should be considered part of the entry when doing the match.
The fourth example is a filter that should be applied to any attribute
supporting the matching rule given (since the attr has been left off).
Attributes supporting the matching rule contained in the DN should also
be considered.
The following examples illustrate the use of the escaping mechanism. The following examples illustrate the use of the escaping mechanism.
(o=Parens R Us \28for all your parenthetical needs\29) (o=Parens R Us \28for all your parenthetical needs\29)
(cn=*\2A*) (cn=*\2A*)
(filename=C:\5cMyFile) (filename=C:\5cMyFile)
(bin=\00\00\00\04) (bin=\00\00\00\04)
(sn=Lu\c4\8di\c4\c7) (sn=Lu\c4\8di\c4\c7)
The first example shows the use of the escaping mechanism to represent The first example shows the use of the escaping mechanism to represent
parenthesis characters. The second shows how to represent a "*" in a parenthesis characters. The second shows how to represent a "*" in a
skipping to change at page 5, line 49 skipping to change at page 6, line 8
Kille, Internet Draft draft-ietf-asid-ldapv3-protocol-04.txt, Kille, Internet Draft draft-ietf-asid-ldapv3-protocol-04.txt,
March, 1997. March, 1997.
[2] Lightweight Directory Access Protocol (v3): Attribute Syntax Defin- [2] Lightweight Directory Access Protocol (v3): Attribute Syntax Defin-
itions, M. Wahl, A. Coulbeck, T. Howes, S. Kille, Internet Draft itions, M. Wahl, A. Coulbeck, T. Howes, S. Kille, Internet Draft
draft-ietf-asid-ldapv3-attributes-04.txt, March, 1997. draft-ietf-asid-ldapv3-attributes-04.txt, March, 1997.
[3] Specification of ASN.1 encoding rules: Basic, Canonical, and Dis- [3] Specification of ASN.1 encoding rules: Basic, Canonical, and Dis-
tinguished Encoding Rules, ITU-T Recommendation X.690, 1994. tinguished Encoding Rules, ITU-T Recommendation X.690, 1994.
[4] Universal Multiple-Octet Coded Character Set (UCS) - Architecture [4] UTF-8, a transformation format of Unicode and ISO 10646, F. Yer-
and Basic Multilingual Plane, ISO/ IEC 10646-1, 1993. geau, draft-yergeau-utf8-rev-00.txt, April, 1997.
[5] Standard for the Format of ARPA Internet Text Messages, D. Crocker, [5] Standard for the Format of ARPA Internet Text Messages, D. Crocker,
RFC 822, August, 1982. RFC 822, August, 1982.
8. Author's Address 8. Author's Address
Tim Howes Tim Howes
Netscape Communications Corp. Netscape Communications Corp.
501 E. Middlefield Road 501 E. Middlefield Road
Mountain View, CA 94043 Mountain View, CA 94043
 End of changes. 9 change blocks. 
17 lines changed or deleted 22 lines changed or added

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