Posted by: piman007 | 24-04-2007

LDAP Filter Syntax

Below is the syntax for a filter given in RFC-2254 http://www.ietf.org/rfc/rfc2254.txt

 filter       = "(" filtercomp ")"
 filtercomp   = and / or / not / item
 and          = "&" filterlist
 or           = "|" filterlist
 not          = "!" filter
 filterlist   = 1*filter
 item         = simple / present / substring / extensible
 simple       = attr filtertype value
 filtertype   = equal / approx / greater / less
 equal        = "="
 approx       = "~="
 greater      = ">="
 less         = "<="
 extensible   = attr [":dn"] [":" matchingrule] ":=" value
                / [":dn"] ":" matchingrule ":=" value
 present      = attr "=*"
 substring    = attr "=" [initial] any [final]
 initial      = value
 any          = "*" *(value "*")
 final        = value
 attr         = AttributeDescription from Section 4.1.5 of RFC-2251
 matchingrule = MatchingRuleId from Section 4.1.9 of RFC-2251
 value        = AttributeValue from Section 4.1.6 of RFC-2251


 Special Character encodings
 ---------------------------
    *               2a, *
    (               28, (
    )               29, )
                   5c, \
    NUL             0

Responses

  1. (&(uid>=0)(uid<=100))

  2. (&(modifyTimestamp>=20070427103915Z)(!(modifyTimestamp=20070427103915Z))(cn=su*))


ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s

หมวดหมู่

%d bloggers like this: