| Update | Add, Delete, Modify, Rename (modify DN) |
| Interrogation | Search, Compare |
| Authentication and Control | Bind, Unbind, Abandon |
The entry will only be added if:
ModifyDN has four parameters:
+--------------+
dn: uid=fred,dc=wibble,dc=org -----> | uid: fred |
+--------------+
After ModifyDN with delete-old-RDN = false:
+--------------+
dn: uid=jim,dc=wibble,dc=org -----> | uid: jim |
| uid: fred |
+--------------+
But with delete-old-RDN = true:
+--------------+
dn: uid=jim,dc=wibble,dc=org -----> | uid: jim |
+--------------+
*,modifytimestamp All user attributes, plus the timestamp when
the entry was last modified (an operational attribute)
| (sn=smith) | equality |
| (sn=*smi*th*) | substring |
| (sn~=jones) | approximate match (soundalike) |
| (sn<=smith) | less than or equal/greater than or equal |
| (!(age<=21)) | There are only LE/GE operators, so (age>21) is not a valid filter |
| (telephonenumber=*) | presence |
| (!(sn=smith)) | negation |
| (&(sn=smith)(l=London)) | AND combination |
| (|(sn=smith)(sn=jones)) | OR combination |
| (sn:1.2.3.4.5:=smith) (sn:dn:1.2.3.4.5:=smith) | server-specific extensions |
Note: certain characters in search filters may need to be quoted; the quoting mechanism is different to quoting of DNs!
| * | \2A |
| ( | \28 |
| ) | \29 |
| \ | \5C |
| NUL | \00 |
The LDAP search filter syntax is defined in RFC 2254
ldap:// [server [:port]] / basedn [? attributes [? scope [? filter [? extensions ]]]]
See RFC 2255 for the full definition of the LDAP search URL, with examples.
Of course, you could obtain the same results using a search to retrieve the given attribute, and check the value yourself. Using compare uses less bandwidth, and also allows you to give a client "compare" access instead of "read" access (which for example would allow the client to check whether a user has the correct password, without being able to read the password)
There is one other difference. If you try to compare an attribute, but the attribute is not present in the entry at all, the server returns a special result code. Hence you can distinguish between "this attribute has a value, but it's a different one", and "this entry does not have any instance of this attribute at all"
Credentials are typically stored within a "userPassword" entry. So, in a "simple bind" where the client provides a DN and a cleartext password, the LDAP server looks up the entry corresponding to the DN, finds the userPassword entry, and compares the two. userPassword can hold either a cleartext password, or a hash of the password in one of several forms.
userPassword: agent
or
userPassword: {md5}szrtjzE0mWcD3Dn5p8lXgw==
Note that the results of the search and the abandon request may cross over 'in flight', so the client still has to be prepared to receive (and discard) the results it asked for. This sort of thing is taken care of by the LDAP API and library which you would normally use when writing an LDAP application.
Every request is tagged with a message ID, which allows multiple requests to be outstanding at the same time - there is no need for the client to open multiple TCP connections to the server to run multiple requests. The abandon operation includes the message ID of the particular request to cancel.