RFC 2254 (rfc2254) - Page 3 of 8


The String Representation of LDAP Search Filters



Alternative Format: Original Text Document



RFC 2254             String Representation of LDAP         December 1997


3. LDAP Search Filter Definition

   An LDAPv3 search filter is defined in Section 4.5.1 of [1] as
   follows:

        Filter ::= CHOICE {
                and                [0] SET OF Filter,
                or                 [1] SET OF Filter,
                not                [2] Filter,
                equalityMatch      [3] AttributeValueAssertion,
                substrings         [4] SubstringFilter,
                greaterOrEqual     [5] AttributeValueAssertion,
                lessOrEqual        [6] AttributeValueAssertion,
                present            [7] AttributeDescription,
                approxMatch        [8] AttributeValueAssertion,
                extensibleMatch    [9] MatchingRuleAssertion
        }

        SubstringFilter ::= SEQUENCE {
                type    AttributeDescription,
                SEQUENCE OF CHOICE {
                        initial        [0] LDAPString,
                        any            [1] LDAPString,
                        final          [2] LDAPString
                }
        }

        AttributeValueAssertion ::= SEQUENCE {
                attributeDesc   AttributeDescription,
                attributeValue  AttributeValue
        }

        MatchingRuleAssertion ::= SEQUENCE {
                matchingRule    [1] MatchingRuleID OPTIONAL,
                type            [2] AttributeDescription OPTIONAL,
                matchValue      [3] AssertionValue,
                dnAttributes    [4] BOOLEAN DEFAULT FALSE
        }

        AttributeDescription ::= LDAPString

        AttributeValue ::= OCTET STRING

        MatchingRuleID ::= LDAPString

        AssertionValue ::= OCTET STRING

        LDAPString ::= OCTET STRING



Howes                       Standards Track