The LDAP (Lightweight Directory Access Protocol) can be used to search for and read LDAP entries. An LDAP entry is a record in the LDAP Directory, which comprises of a unique identifier called Distinguished Name (DN), a Relative Distinguished Name (RDN), and some attributes defined in a schema.
LDAP can be used to retrieve complete as well as partial copies of entries that match a certain set of search criteria. An LDAP search criteria is used to find an LDAP user account by authenticating it against the LDAP Directory. An LDAP search request has the following parameters:
baseObject is often referred to as “base”. It indicates that the exact entry specified as the search base should be considered, but its subordinates should not be considered.
singleLevel is often referred to as “one”. It indicates that the children of the entry specified as the search base should be considered when searching. Neither the base entry nor the descendants of the immediate children of the base entry are to be considered.
wholeSubtree is often referred to as “sub”. It indicates that all the subordinates to any depth of the entry specified in the search base should be considered. In the special case, when the search base DN is the null DN, the root DSE should not be considered in the wholeSubtree search.
subordinateSubtree is often referred to as “subordinates”. It indicates that all of the subordinates to any depth of the entry specified in the search base should be considered. However, the entry specified by the search base should not be considered.
This indicates that aliases should not be dereferenced when processing the search operation.
This indicates that the server should dereference the aliases encountered in the scope of the search, but should not dereference the search base entry as it is itself an alias.
This indicates that the aliases encountered within the scope of the search should not be dereferenced, but if the entry specified in the search base is an alias, then the server should dereference it.
This indicates that all aliases, encountered in the entry specified as the search base, as well as the aliases encountered within the scope of the search, should be dereferenced.
The search size limit specifies the number of entries that should be returned from the search operation. Zero value means no limit. When the server also imposes a size limit for the search operation, then the smaller of the client-requested and server-imposed size limit is enforced.
If the value of the typesOnly flag is true, then the entries that match the search criteria should only return the attribute descriptions but not the actual values for the attributes of the entry. If the value is false, then it indicates that the attribute values too should be returned.
To determine if an entry contains an attribute. If an entry contains at least one value for the attribute, then the entry marches the presence filter.
To determine if an entry contains a specified attribute value. If an entry contains the specified value, then the entry matches the equality filter regardless of the presence or absence of other values.
To determine if an entry contains at least one value that is greater than or equal to a specified value.
To determine if an entry contains at least one value that is lesser than or equal to a specified value.
To determine if an entry contains at least one value for a specified attribute that matches a given substring.
To determine if an entry contains at least one value for an attribute, that is approximately equal to a given value.
To override the default matching rule, to determine whether a particular value exists in an attribute of the entry, and to determine if a particular value exists in the attributes used to comprise the DN for an entry.
To evaluate to true if all of the filters that it encapsulates are true.
To set to true if at least one of the filters it encapsulates is true.
To negate the result obtained out of the encapsulated filter. The encapsulated filter can either be an AND or OR filter.
A set of attributes requests for the inclusion of entries that match the search. A listed, specific set of attribute descriptions are included in the matching entries.
If the search operation is successful, the server returns the “success” result code.
If the specified entry is non-existent, then the server returns the noSuchObject result code.
If the search base DN is malformed, then the server returns the invalidDNSyntax results code.
If the search criteria match more entries than allowed in the client-requested or server-imposed limit, then the server returns the sizeLimitExceeded result.
If the time required to process the search operation exceeds the server-imposed or client-requested limit, then the server returns the timeLimitExceeded result code.
If the search filter includes an attribute type that is not defined in the server schema, then the server returns the undefinedAttributeType result code.
If the requester does not have permission to perform the search operation, then the server returns the insufficentAccessRights result code. This is different from the case when the user is allowed to perform the search operation but does not have the right to access the matching entries.
Use your G Suite or Office 365 account, or sign up with your email address.
(Have an account already? Click here to log in.)
By signing up, you agree to our terms of use and privacy policy.