| |
A main feature of
web500gw
is the flexible search configuration.
Simple search
A simple search form is usually included in nearly every page produced by
web500gw.
URL format:
/DN??scope=filter
| DN | search base (to search below)
| | scope | S = search subtree, O = onelevel search
| | filter | search specification, typically typed in by a user.
|
The resulting search filter is build by
web500gw with the ldapfilter file
(may be different for ACCESS rules). Using the regular expression and filter
construction rules you can achieve a surprisingly good search strategy,
see the ldapfilter.conf(5)
Manpage.
Of course, additional attributes and flags could be specified in the URL:
/DN?attr,...$flags,...?scope=filter
It means, show attribute(s) attr in results and use
display style according to flags.
Enhanced search
To give more control on the search behavior
web500gw
now has an interface to an
enhanced search possibility.
With an URL like /DN?$searchform you could request web500gw's "built-in"
enhanced search form, which is defined in the according messagefile
(EXT_SEARCH_FORM).
Of course, the search interface could be used from a "static" Web page too.
| URL format:
| POST /DN?$search
POST data: parameter1=value1¶meter2=value2&...
| | or
| GET /DN?$search?parameter1=value1¶meter2=value2&...
|
| Parameter | Description | Example
|
|---|
ldapserver | LDAP server to use, defaults to the defined in web500gw.conf
| ldap.bigfoot.com
| ldapport | LDAP server port,
defaults to the defined in web500gw.conf (usually 389)
|
| base | search base (to search below)
| o=My Org, c=My country
| searchattr | search for value(s) in attribute
| cn
| query | search word(s)
| usually typed in by the user
| match | matching template
%a = searchattr, %v = query
| %a=%v
| objectclass | objectclass(es) to search for
| person
| filtertemplate | template to build the search filter
%v1 = objectclass, %v2 = match
| (&(objectclass=%v1)(%v2))
| attr | attribute(s) to show in results
| mail,vcard
| flags | display flags for result
| table,valsonly
|
Multiple occurances of parameters attr and flags are possible,
so they could be used in SELECT multiple form tags.
- Finally you could pack any of the above described parameters into one parameter,
called
args:
args=parameter1=value1¶meter2=value2&...&endargs
- The parameters are separated by &, values must be URL encoded (%xx = hex),
and the last string should be
endargs.
This can be used to define fixed options for a special ldapserver, e.g.
ldapserver=ldap.four11.com&base=&attr=cn,mail,vcard&flags=nodn&endargs
See an example of a search form which uses multiple LDAP servers.
|