Lightweight Directory Access Protocol (LDAP) is integrated into Cisco IOS software as a AAA protocol alongside the existing AAA protocols such as RADIUS, TACACS+, Kerberos, and Diameter. AAA framework provides tools and mechanisms such as method lists, server groups, and generic attribute lists that enable an abstract and uniform interface to AAA clients irrespective of actual protocol used for communication with the AAA server. LDAP supports authentication and authorization functions for AAA.
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Configuring LDAP
If you are using a secure Transport Layer Security (TLS) secure connection, you must configure X.509 certificates.
Restrictions for Configuring LDAP
Bind, search, and compare operations are supported.
LDAP referrals are not supported.
Unsolicited messages or notifications from LDAP server are not handled.
TLS is an application-level protocol that enables secure transactions of data through privacy, authentication, and data integrity. It relies upon certificates, public keys, and private keys for clients to prove the identity. Certificates are issued by Certificate Authorities (CAs). Each certificate includes the name of the authority that issued it, the name of the entity to which the certificate was issued, the entityâs public key, and time stamps that indicate the certificateâs expiration date. TLS support for LDAP is mentioned in RFC 2830 as an extension to the LDAP protocol.
The bind operation is used to authenticate a user to the server. It is used to start a connection with the LDAP server. LDAP is a connection-oriented protocol. The client specifies the protocol version and the client authentication information. LDAP supports the following binds:
Authenticated bind
Anonymous bind
An authenticated bind is performed when a root distinguished name (DN) and password are available. In the absence of a root DN and password, an anonymous bind is performed. In LDAP deployments, the search operation is performed first and the bind operation later. This is because, if a password attribute is returned as part of the search operation, then the password verification can be done locally on an LDAP client. Thus, there is no need to perform an extra bind operation. If a password attribute is not returned, bind operation can be performed later. Another advantage of performing a search operation first and bind operation later is that the distinguished name (DN) received in the search result can be used as the user DN instead of forming a DN by prefixing the username (cn attribute) with base DN. All entries stored in an LDAP server have a unique distinguished name (DN). The DN consists of two parts: Relative Distinguished Name (RDN) and location within 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 cn (Common Name) attribute. Because every object has a name, most objects you store in an LDAP will use their cn value as the basis for their RDN.
Search
A 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 directly performed without a bind operation. The LDAP server can be configured with certain privileges for the search operation to succeed. This privilege level is established with the bind operation.
An LDAP search operation can return multiple user entries for a specific user. In such cases, the LDAP client returns an appropriate error code to AAA. To avoid these errors, appropriate search filters that help to match a single entry must be configured.
Compare
The compare operation is used to replace a bind request with a compare request for an authentication. The compare operation helps to maintain the initial bind parameters for the connection.
LDAP Dynamic Attribute Mapping
LDAP is a powerful and flexible protocol for communication with AAA servers. LDAP attribute maps provide a method to cross-reference the attributes retrieved from a server to Cisco attributes supported by the security appliances.
When a user authenticates a security appliance, the security appliance, in turn, authenticates to the server and uses the LDAP protocol to retrieve the record for that user. The record consists of LDAP attributes associated with fields displayed on the user interface of the server. Each attribute retrieved includes a value that was entered by the administrator who updates the user records.
Perform this task to configure router-toLDAP server communication.
The LDAP host is normally a multiuser system running LDAP server software such as Active Directory (Microsoft) and OpenLDAP. Configuring router-to-LDAP server communication can have several components:
Hostname or IP address
Port number
Timeout period
Base DN
SUMMARY STEPS
1.enable
2.configureterminal
3.ldapservername
4.ipv4ipv4-address
5.transportportport-number
6.timeoutretransmitseconds
7.exit
DETAILED STEPS
Command or Action
Purpose
Step 1
enable
Example:
Router> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Step 2
configureterminal
Example:
Router# configure terminal
Enters global configuration mode.
Step 3
ldapservername
Example:
Router(config)# ldap server server1
Configures a device to use the LDAP protocol and enters LDAP server configuration mode.
Step 4
ipv4ipv4-address
Example:
Router(config-ldap-server)# ipv4 10.0.0.1
Specifies the LDAP server IP address using IPv4.
Step 5
transportportport-number
Example:
Router(config-ldap-server)# transport port 200
Configures the transport protocol for connecting to the LDAP peer.
Step 6
timeoutretransmitseconds
Example:
Router(config-ldap-server)# timeout retransmit 20
Specifies the number of seconds a router waits for a reply to an LDAP request before retransmitting the request.
Step 7
exit
Example:
Router(config-ldap-server)# exit
Exits the LDAP server configuration mode.
Configuring LDAP Protocol Parameters
Perform this task to configure the LDAP protocol parameters.
Specifies the shared secret text string used between the router and an LDAP server. Use the 0 line option to configure an unencrypted shared secret. Use the 7 line option to configure an encrypted shared secret.
Step 5
search-filteruser-object-typestring
Example:
Router(config-ldap-server)# search-filter user-object-type name
Specifies the search filter to be used in the search requests.
Specifies the ciphersuite in case of secure connection.
Step 9
exit
Example:
Router(config-ldap-server)# exit
Exits the LDAP server configuration mode.
Configuring a AAA Server Group
Perform this task to configure a AAA server group.
Configuring the router to use AAA server groups enables you to group existing servers. You need to select a subset of the configured server hosts and use them for a particular service. A server group is used in conjunction with a global server-host list. The server group lists the IP addresses of the selected server hosts. Server groups also can include multiple host entries for the same server, as long as each entry has a unique identifier.
If two different host entries on the same LDAP server are configured for the same service (for example, accounting) the second host entry configured acts as failover backup to the first one. Using this example, if the first host entry fails to provide accounting services, the network access server will try the second host entry configured on the same device for accounting services. (The LDAP host entries will be tried in the order in which they are configured.) To define a server host with a server group name, enter the following commands. The listed server must exist in global configuration mode.
SUMMARY STEPS
1.enable
2.configureterminal
3.aaanew-model
4.aaagroupserverldapgroup-name
5.servername
6.exit
DETAILED STEPS
Command or Action
Purpose
Step 1
enable
Example:
Router> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Step 2
configureterminal
Example:
Router# configure terminal
Enters global configuration mode.
Step 3
aaanew-model
Example:
Router(config)# aaa new-model
Enables AAA.
Step 4
aaagroupserverldapgroup-name
Example:
Router(config)# aaa group server ldap name1
Defines the AAA server group with a group name and enters the LDAP server group configuration mode. All members of a group must be the of same type; that is, RADIUS, LDAP, or TACACS+.
Step 5
servername
Example:
Router(config-ldap-sg)# server server1
Associates a particular LDAP server with the defined server group. Each security server is identified by its IP address and UDP port number.
Step 6
exit
Example:
Router(config-ldap-server)# exit
Exits LDAP server group configuration mode.
Configuring Search and Bind Operations for an Authentication Request
Perform this task to configure search and bind operations for an authentication request:
SUMMARY STEPS
1.enable
2.configureterminal
3.ldapservername
4.authenticationbind-first
5.authenticationcompare
6.exit
DETAILED STEPS
Command or Action
Purpose
Step 1
enable
Example:
Router> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Step 2
configureterminal
Example:
Router# configure terminal
Enters global configuration mode.
Step 3
ldapservername
Example:
Router(config)# ldap server server1
Configures a device as an LDAP protocol and enters LDAP server configuration mode.
Replaces the bind request with the compare request for authentication.
Step 6
exit
Example:
Router(config-ldap-server)# exit
Exits the LDAP server configuration mode.
Configuring a Dynamic Attribute Map on an LDAP Server
Perform this task to configure a dynamic attribute map on an LDAP server.
You must create LDAP attribute maps that map your existing user-defined attribute names and values to Cisco attribute names and values that are compatible with the security appliance. You can then bind these attribute maps to LDAP servers or remove them as required. See the chapter User-Based Firewall support in Cisco IOS Security Configuration Guide:
Securing the Data Plane
for more information about user-based firewalls.
Note
To use the attribute mapping features correctly, you need to understand the Cisco LDAP attribute names and values as well as the user-defined attribute names and values.
Attaches the attribute map to a particular LDAP server.
Step 11
exit
Example:
Router(config-ldap-server)# exit
Exits server group configuration mode.
Monitoring and Maintaining LDAP
To monitor and maintain LDAP scalability enhancements, use the following commands in privileged EXEC mode. The following commands can be entered in any order.
Command
Purpose
Router#clearldapserver
Clears the TCP connection with the LDAP server.
Router#debugldap
Displays information associated with LDAP.
Router# showldapserver
Displays the LDAP server state information and various other counters for the server.
Router# showldapattributes
Displays information about default LDAP attribute mapping.
Lightweight Directory Access Protocol (LDAP): Schema for User Applications
Technical Assistance
Description
Link
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.
To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1 Feature Information for Configuring LDAP
Feature Name
Releases
Feature Information
LDAP integration with Active Directory
15.1(1)T
LDAP is a standard-based protocol used to access directories. It is based on client server model similar to RADIUS. LDAP is deployed on Cisco devices to send authentication requests to a central LDAP server that contains all user authentication and network service access information.
This feature provides authentication and authorization support for AAA.
The following commands were introduced or modified:
aaagroupserverldap,authenticationbind-first,
authenticationcompare,bindauthenticate,base-dn,
clearldapserver,
debugldap,ipv4,modesecure,
ldapserver,
search-filter,securecipher,
showldapserver,
transportport,
timeout,retransmit.
LDAP Active Directory Support for Authproxy
15.1(1)T
This feature enables the authentication proxy to authenticate and authorize the users with Active Directory servers using LDAP.
The following commands were introduced or modified:
maptype,
attributemap.
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at
www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.