Aaa Ldap
Aaa Ldap
Aaa Ldap
36
Sun Microsystems JAVA System Directory Server, now part of Oracle Directory Server Enterprise
Edition, and formerly named the Sun ONE Directory Server
Novell
OpenLDAP
By default, the ASA autodetects whether it is connected to Microsoft Active Directory, Sun LDAP,
Novell, OpenLDAP, or a generic LDAPv3 directory server. However, if autodetection fails to determine
the LDAP server type, you can manually configure it.
The DN configured on the ASA to access a Sun directory server must be able to access the default
password policy on that server. We recommend using the directory administrator, or a user with
directory administrator privileges, as the DN. Alternatively, you can place an ACL on the default
password policy.
You must configure LDAP over SSL to enable password management with Microsoft Active
Directory and Sun servers.
36-1
Chapter 36
The ASA does not support password management with Novell, OpenLDAP, and other LDAPv3
directory servers.
The VPN 3000 concentrator and the ASA/PIX 7.0 software required a Cisco LDAP schema for
authorization operations. Beginning with Version 7.1.x, the ASA performs authentication and
authorization using the native LDAP schema, and the Cisco schema is no longer needed.
Digest-MD5The ASA responds to the LDAP server with an MD5 value computed from the
username and password.
KerberosThe ASA responds to the LDAP server by sending the username and realm using the
GSSAPI Kerberos mechanism.
The ASA and LDAP server supports any combination of these SASL mechanisms. If you configure
multiple mechanisms, the ASA retrieves the list of SASL mechanisms that are configured on the server,
and sets the authentication mechanism to the strongest one configured on both the ASA and the server.
For example, if both the LDAP server and the ASA support both mechanisms, the ASA selects Kerberos,
the stronger of the two.
When user LDAP authentication has succeeded, the LDAP server returns the attributes for the
authenticated user. For VPN authentication, these attributes generally include authorization data that is
applied to the VPN session. In this case, using LDAP accomplishes authentication and authorization in
a single step.
Note
For more information about the LDAP protocol, see RFCs 1777, 2251, and 2849.
36-2
Chapter 36
Figure 36-1
Marketing
cn=User2
cn=User3
HR
Groups/Departments
cn=User4 Users
330368
cn=User1
OU=Organization Units
Equipment
People
Engineering
Root/Top
LDAP Base DN defines where in the LDAP hierarchy that the server should begin searching for user
information when it receives an authorization request from the ASA.
Search Scope defines the extent of the search in the LDAP hierarchy. The search proceeds this many
levels in the hierarchy below the LDAP Base DN. You can choose to have the server search only the
level immediately below it, or it can search the entire subtree. A single level search is quicker, but
a subtree search is more extensive.
Naming Attribute(s) defines the RDN that uniquely identifies an entry in the LDAP server. Common
naming attributes can include cn (Common Name), sAMAccountName, and userPrincipalName.
Figure 36-1 shows a sample LDAP hierarchy for Example Corporation. Given this hierarchy, you could
define your search in different ways. Table 36-1 shows two sample search configurations.
In the first example configuration, when Employee1 establishes the IPsec tunnel with LDAP
authorization required, the ASA sends a search request to the LDAP server, indicating it should search
for Employee1 in the Engineering group. This search is quick.
In the second example configuration, the ASA sends a search request indicating that the server should
search for Employee1 within Example Corporation. This search takes longer.
Table 36-1
Search
Scope
Naming
Attribute
Result
dc=ExampleCorporation,dc=com
Subtree
36-3
Chapter 36
SASL Kerberos
Note
As an LDAP client, the ASA does not support the transmission of anonymous binds or requests.
License Requirement
All models
Base License.
Supports IPv6.
36-4
Chapter 36
Configuring LDAP Server Groups, page 36-7Configuring Authorization with LDAP for VPN,
page 36-10
Add an LDAP server group. See the Configuring LDAP Server Groups section on page 36-7.
Step 2
(Optional) Configure authorization from an LDAP server that is separate and distinct from the
authentication mechanism. See the Configuring Authorization with LDAP for VPN section on
page 36-10.
Step 3
Configure LDAP attribute maps. See the Configuring LDAP Attribute Maps section on page 36-5.
You must add an attribute map before adding an LDAP server to an LDAP server group.
setting policy permissions (also called authorization attributes), such as ACLs, bookmark lists, DNS
or WINS settings, and session timers.
The ASA uses LDAP attribute maps to translate native LDAP user attributes to Cisco ASA attributes.
You can bind these attribute maps to LDAP servers or remove them. You can also show or clear attribute
maps.
Guidelines
The LDAP attribute map does not support multi-valued attributes. For example, if a user is a member of
several AD groups, and the LDAP attribute map matches more than one group, the value chosen is based
on the alphabetization of the matched entries.
To use the attribute mapping features correctly, you need to understand LDAP attribute names and
values, as well as the user-defined attribute names and values.
The names of frequently mapped LDAP attributes and the type of user-defined attributes that they would
commonly be mapped to include the following:
IETF-Radius-Class (Group_Policy in ASA version 8.2 and later)Sets the group policy based on
the directory department or user group (for example, Microsoft Active Directory memberOf)
attribute value. The group policy attribute replaced the IETF-Radius-Class attribute with ASDM
version 6.2/ASA version 8.2 or later.
36-5
Chapter 36
IETF-Radius-Filter-IdApplies an access control list or ACL to VPN clients, IPsec, and SSL.
Banner1Displays a text banner when the VPN remote access user logs in.
Tunneling-ProtocolsAllows or denies the VPN remote access session based on the access type.
Note
A single LDAP attribute map may contain one or many attributes. You can only map one LDAP
attribute from a specific LDAP server.
Detailed Steps
Step 1
Command
Purpose
Example:
ciscoasa(config)# ldap attribute-map
att_map_1
Step 2
map-name user-attribute-name
Cisco-attribute-name
Example:
ciscoasa(config-ldap-attribute-map)#
map-name department IETF-Radius-Class
Step 3
map-value user-attribute-name
Cisco-attribute-name
Example:
ciscoasa(config-ldap-attribute-map)#
map-value department Engineering group1
Step 4
Example:
ciscoasa(config)# aaa-server ldap_dir_1
host 10.1.1.4
Step 5
ldap-attribute-map map-name
Example:
ciscoasa(config-aaa-server-host)#
ldap-attribute-map att_map_1
36-6
Chapter 36
Examples
The following example shows how to limit management sessions to the ASA based on an LDAP attribute
called accessType. The accessType attribute may have one of these values:
VPN
admin
helpdesk
The following example shows how each value is mapped to one of the valid IETF-Radius-Service-Type
attributes that the ASA supports: remote-access (Service-Type 5) Outbound, admin (Service-Type 6)
Administrative, and nas-prompt (Service-Type 7) NAS Prompt.
ciscoasa(config)# ldap attribute-map
ciscoasa(config-ldap-attribute-map)#
ciscoasa(config-ldap-attribute-map)#
ciscoasa(config-ldap-attribute-map)#
ciscoasa(config-ldap-attribute-map)#
MGMT
map-name accessType IETF-Radius-Service-Type
map-value accessType VPN 5
map-value accessType admin 6
map-value accessType helpdesk 7
The following example shows how to display the complete list of Cisco LDAP attribute names:
ciscoasa(config)# ldap attribute-map att_map_1
ciscoasa(config-ldap-attribute-map)# map-name att_map_1?
ldap mode commands/options:
cisco-attribute-names:
Access-Hours
Allow-Network-Extension-Mode
Auth-Service-Type
Authenticated-User-Idle-Timeout
Authorization-Required
Authorization-Type
:
:
X509-Cert-Data
ciscoasa(config-ldap-attribute-map)#
Guidelines
You can have up to 100 LDAP server groups in single mode or 4 LDAP server groups per context in
multiple mode.
Each group can have up to 16 LDAP servers in single mode or 4 LDAP servers in multiple mode.
36-7
Chapter 36
When a user logs in, the LDAP servers are accessed one at a time, starting with the first server that
you specify in the configuration, until a server responds. If all servers in the group are unavailable,
the ASA tries the local database if you configured it as a fallback method (management
authentication and authorization only). If you do not have a fallback method, the ASA continues to
try the LDAP servers.
Detailed Steps
The following steps show how to create and configure an LDAP server group, and add an LDAP server
to that group.
Step 1
Command
Purpose
Example:
ciscoasa(config)# aaa-server servergroup1
protocol ldap
ciscoasa(config-aaa-server-group)#
Step 2
max-failed-attempts number
Example:
ciscoasa(config-aaa-server-group)#
max-failed-attempts 2
36-8
Chapter 36
Step 3
Command
Purpose
Example:
ciscoasa(config-aaa-server-group)#
reactivation-mode deadtime 20
Step 4
Example:
ciscoasa(config)# aaa-server servergroup1 outside
host 10.10.1.1
Move to new procedure for adding a server to a
grouyp
Table 36-2
Command
Default Value
Description
ldap-attribute-map
ldap-base-dn
ldap-login-dn
ldap-login-password
ldap-naming-attribute
ldap-over-ssl
636
ldap-scope
sasl-mechanism
server-port
389
server-type
autodiscovery
timeout
10 seconds
If not set, the ASA uses sAMAccountName for LDAP requests. Whether
using SASL or plain text, you can secure communications between the ASA
and the LDAP server with SSL. If you do not configure SASL, we strongly
recommend that you secure LDAP communications with SSL.
If autodetection fails to determine the LDAP server type, and you know the
server is either a Microsoft, Sun or generic LDAP server, you can manually
configure the server type.
36-9
Chapter 36
Examples
The following example shows how to configure an LDAP server group named watchdogs and add an
LDAP server to the group. Because the example does not define a retry interval or the port that the LDAP
server listens to, the ASA uses the default values for these two server-specific parameters.
ciscoasa(config)# aaa-server watchdogs protocol ldap
ciscoasa(config-aaa-server-group)# aaa-server watchdogs host 192.168.3.4
ciscoasa(config-aaa-server-host)# exit
ciscoasa(config)#
Detailed Steps
Step 1
Command
Purpose
tunnel-group groupname
Example:
ciscoasa(config)# tunnel-group remotegrp
Step 2
Example:
ciscoasa(config)# tunnel-group remotegrp
general-attributes
Step 3
authorization-server-group group-tag
Example:
ciscoasa(config-general)# authorization-server-group
ldap_dir_1
Examples
While there are other authorization-related commands and options available for specific requirements,
the following example shows commands for enabling user authorization with LDAP. The example then
creates an IPsec remote access tunnel group named remote-1, and assigns that new tunnel group to the
previously created ldap_dir_1 AAA server group for authorization:
ciscoasa(config)# tunnel-group remote-1 type ipsec-ra
36-10
Chapter 36
After you complete this configuration work, you can then configure additional LDAP authorization
parameters such as a directory password, a starting point for searching a directory, and the scope of a
directory search by entering the following commands:
ciscoasa(config)# aaa-server ldap_dir_1 protocol ldap
ciscoasa(config-aaa-server-group)# aaa-server ldap_dir_1 host 10.1.1.4
ciscoasa(config-aaa-server-host)# ldap-login-dn obscurepassword
ciscoasa(config-aaa-server-host)# ldap-base-dn starthere
ciscoasa(config-aaa-server-host)# ldap-scope subtree
ciscoasa(config-aaa-server-host)#
Purpose
show aaa-server
36-11
Chapter 36
Feature Name
Platform
Releases
7.0(1)
Feature Information
LDAP Servers describe support for AAA and how to
configure LDAP servers.
We introduced the following commands:
username, aaa authorization exec authentication-server,
aaa authentication console LOCAL, aaa authorization
exec LOCAL, service-type, ldap attribute-map,
aaa-server protocol, aaa authentication {telnet | ssh |
serial} console LOCAL, aaa authentication http console
LOCAL, aaa authentication enable console LOCAL,
max-failed-attempts, reactivation-mode,
accounting-mode simultaneous, aaa-server host,
authorization-server-group, tunnel-group, tunnel-group
general-attributes, map-name, map-value,
ldap-attribute-map.
36-12