Site icon LDAP.com

LDAP URLs

An LDAP URL is a string that can be used to encapsulate the address and port of a directory server, the DN of an entry within that server, or the criteria for performing a search within that server. LDAP URLs have a handful of common uses in LDAP:

LDAP URLs may include the following components:

The following are examples of valid LDAP URLs:

LDAP URLs follow the basic constraints for URIs defined in RFC 3986 and therefore require that special characters be percent-encoded (i.e., each byte of the UTF-8 encoding of the character should be represented as a percent sign followed by the two hexadecimal digits that comprise identify that byte). In general, special characters include all characters except ASCII letters and digits, and the following symbols: dash, period, underscore, tilde, colon, forward slash, question mark, octothorpe, open square bracket, close square bracket, at sign, exclamation point, dollar sign, ampersand, single quote, open parenthesis, closing parenthesis, asterisk, plus sign, comma, semicolon, and equal sign.

However, there are also a couple of other special cases in LDAP URLs that require additional escaping. Those special cases include:

While LDAP URLs do provide a fairly compact way to identify an entry in a directory server or provide a set of search criteria, they do have a couple of pretty significant shortcomings. As previously discussed, the official LDAP URL specification allows only a scheme of “ldap” and therefore there is no way indicate any form of security. Some servers do use “ldaps” if communication with the server is expected to be secured with SSL/TLS), but the general expectation is that the client should have some knowledge of whether communication with a server should be secured. There is also no way for an LDAP URL to include authentication or authorization information, and again the general expectation is that if the client is expected to authenticate to the target server, then it should have some way of knowing how to do that.

The complete specification for LDAP URLs is provided in RFC 4516.

Exit mobile version