Configuring LDAP
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.
Finding Feature Information
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 for Configuring LDAP" section.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•Prerequisites for Configuring LDAP
•Restrictions for Configuring LDAP
•Configuration Examples for LDAP
•Feature Information for Configuring LDAP
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
LDAP client implementation has the following restrictions:
•Bind, search, and compare operations are supported.
•LDAP referrals are not supported.
•Unsolicited messages or notifications from LDAP server are not handled.
Information About LDAP
To configure LDAP, you should understand the following concepts:
•LDAP Dynamic Attribute Mapping
Transport Layer Security
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.
LDAP Operations
The following operations are supported in LDAP:
•Bind
•Search
•Compare
Bind
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.
How to Configure LDAP
This section contains the following procedures:
•Configuring Router-to-LDAP Server Communication (required)
•Configuring LDAP Protocol Parameters (optional)
•Configuring a AAA Server Group (optional)
•Configuring Search and Bind Operations for an Authentication Request (optional)
•Configuring a Dynamic Attribute Map on an LDAP Server (optional)
Configuring Router-to-LDAP Server Communication
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. configure terminal
3. ldap server name
4. ipv4 ipv4-address
5. transport port port-number
6. timeout retransmit seconds
7. exit
DETAILED STEPS
Configuring LDAP Protocol Parameters
Perform this task to configure the LDAP protocol parameters.
SUMMARY STEPS
1. enable
2. configure terminal
3. ldap server name
4. bind authenticate root-dn password [0 string | 7 string] string
5. search-filter user-object-type string
6. base-dn string
7. mode secure [no-negotiation]
8. secure cipher secure cipher 3des-ede-cbc-sha
9. exit
DETAILED STEPS
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. configure terminal
3. aaa new-model
4. aaa group server ldap group-name
5. server name
6. exit
DETAILED STEPS
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. configure terminal
3. ldap server name
4. authentication bind-first
5. authentication compare
6. exit
DETAILED STEPS
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.
SUMMARY STEPS
1. enable
2. configure terminal
3. ldap attribute map map-name
4. map type ldap-attr-type aaa-attr-type
5. exit
6. ldap server name
7. ipv4 ipv4-address
8. bind authenticate root-dn password [0 string | 7 string] string
9. base-dn string
10. attribute map map-name
11. exit
DETAILED STEPS
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.
Configuration Examples for LDAP
This section provides the following configuration examples:
•LDAP Server Communication: Example
•LDAP Protocol Parameters: Example
•Search and Bind Operations for an Authentication Request: Example
•Dynamic LDAP Attribute Map and LDAP Server: Example
LDAP Server Communication: Example
The following example shows how to create server group server1 and specify the IP address, transport port, and retransmit values:
ldap server server1
server1 10.0.0.1 transport port 200 retransmit 600 failover retransmit 600
LDAP Protocol Parameters: Example
The following example shows how to configure the LDAP parameters:
ldap server server1
bind authenticate root-dn "cn=administrator,cn=users,dc=nac-blr2,dc=cisco,dc=com password 123"
search-filter user-object-type objectclass
base-dn "dc=sns,dc=example,dc=com"
mode secure no-negotiation
secure cipher 3des-ede-cbc-sha
AAA Server Group: Example
The following example shows how to configure the AAA server group:
aaa new-model
aaa group server ldap server1
Search and Bind Operations for an Authentication Request: Example
The following example shows how to configure the sequence of search and bind for an authentication request:
ldap server server1
authentication bind-first
authentication compare
Dynamic LDAP Attribute Map and LDAP Server: Example
The following example shows how to attach the attribute map to a particular LDAP server:
ldap attribute-map att_map_1
map type department element-req-qos
exit
ldap server ldap_dir_1
ipv4 10.0.0.1
bind authenticate root-dn cn=administrator,cn=users,dc=nac-blr2,dc=example,dc=com password example123
base-dn "dc=sns,dc=example,dc=com"
attribute map att_map_1
Additional References
The following sections provide references related to configuring the LDAP feature.
Related Documents
|
|
---|---|
AAA |
"Configuring Authentication" module |
Standards
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
MIBs
RFCs
Technical Assistance
Feature Information for Configuring LDAP
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
|
|
|
---|---|---|
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 sections provide information about this feature: •Configuring Router-to-LDAP Server Communication •Configuring LDAP Protocol Parameters •Configuring a AAA Server Group •Configuring Search and Bind Operations for an Authentication Request The following commands were introduced or modified: aaa group server ldap, authentication bind-first, authentication compare, bind authenticate, base-dn, clear ldap server, debug ldap, ipv4, mode secure, ldap server, search-filter, secure cipher, show ldap server, transport port, 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 sections provide information about this feature: •LDAP Dynamic Attribute Mapping •Configuring a Dynamic Attribute Map on an LDAP Server The following commands were introduced or modified: map type, attribute map. |