Explains how Lightweight Directory Access Protocols (LDAPs) function as client-server protocols for directory information management and their use in secure authentication and authorization.
A Lightweight Directory Access Protocol (LDAP) is a client-server protocol that
-
allows clients to access and manage directory information stored on servers
-
supports user authentication and authorization using operations such as bind and search, and
-
operates over TCP/IP on port 389, optionally using Transport Layer Security (TLS) for secure communications.
Transport Layer Security (TLS)
Transport Layer Security (TLS) is an application-level protocol that enables secure data transactions by providing privacy, authentication, and data integrity. TLS relies on certificates, public keys, and private keys to prove the identity of clients.
Certificate Authorities (CAs) issue the certificates.
Each certificate includes these:
-
The name of the authority that issued it.
-
The name of the entity to which the certificate was issued.
-
The public key of the entity.
-
The timestamps indicating the expiration date of the certificate.
TLS support for LDAP is described in RFC 2830, which is an extension to the LDAP protocol.
LDAP Operations
BindThe bind operation authenticates a user to the server and starts a connection with the LDAP server. LDAP is a connection-oriented protocol. The client specifies the protocol version and authentication information.
LDAP supports these binds:
-
Authenticated bind: An authenticated bind is performed when a root Distinguished Name (DN) and password are available.
-
Anonymous bind: An anonymous bind is performed when no root DN and password are provided.
In LDAP deployments, the search operation is commonly performed before the bind operation. If a password attribute is returned as part of the search operation, the LDAP client can verify the password locally, eliminating the need for an extra bind operation. If the password attribute is not returned, the bind operation can occur later. Another advantage of performing the search operation first is that the LDAP client can use the DN received in the search result as the user DN, instead of constructing it by prefixing the username (cn attribute) with the base DN. All entries stored in an LDAP server have a unique DN.
The DN consists of two parts:
-
Relative Distinguished Name (RDN)
-
Location in the LDAP server where the record resides.
Most of the entries that you store in an LDAP server will have a name, and the name is frequently stored in the Common Name (cn) attribute. Because every object has a name, most objects stored in an LDAP server use their cn value as the basis for their RDN.
SearchA search operation is used to search the LDAP server. The client specifies the starting point (base DN) of the search, the search scope (either the object, its children, or the subtree rooted at the object), and a search filter.
For authorization requests, the search operation is performed without a bind operation. The LDAP server must be configured with sufficient privileges for the search operation to succeed. These privileges are established during the bind operation.
An LDAP search operation can return multiple entries for a specific user. When this occurs, the LDAP client returns an error code to AAA. To prevent these errors, configure search filters to match only a single entry.
CompareThe compare operation replaces a bind request for authentication and helps maintain the initial bind parameters for the connection.
LDAP Dynamic Attribute Mapping
The Lightweight Directory Access Protocol (LDAP) is a powerful and flexible protocol for communication with AAA servers. LDAP attribute maps provide a method to cross-reference attributes retrieved from a server with Cisco attributes supported by security appliances.
When a user authenticates to a security appliance, the appliance authenticates the server and uses LDAP to retrieve the user's record. The record consists of LDAP attributes associated with fields displayed on the server's user interface. Each attribute retrieved includes a value entered by the administrator responsible for updating user records.