ASA - Configure LDAP Authentication for Users
In this post I demonstrate how to configure the Cisco Adaptive Security Appliance (ASA) to use an LDAP server for authentication of WebVPN users. The LDAP server in this example is Microsoft Active Directory. In this example Lightweight Directory Access Protocol (LDAP) authentication is configured for WebVPN users, but this configuration can be used for all other types of remote access clients as well. Simply assign the AAA server group to the desired connection profile (tunnel group).
Ok if you want to use AD we must use LDAP and in some cases we will have to configure an LDAP attribute-map…I have put together a sample config you can use. It’s a sample ldap aaa-server configuration. I put a (#x) where there is something you need to modify to be specific to your environment. There is an explanation for each number below.
aaa-server cisco protocol ldap
aaa-server cisco host 192.168.10.100 (#1)
ldap-base-dn DC=6200networks,DC=com (#2)
ldap-scope subtree
ldap-naming-attribute samAccountName
ldap-login-password adminpass (#3)
ldap-login-dn CN=Administrator,CN=users,DC=6200networks,DC=com (#4)
tunnel-group mytunnelgroup general-attributes
authentication-server-group cisco (#5)
#1 - replace 192.168.10.100 with the ip address of your aaa-server
#2 - this is where the asa is going to start its search for users it needs to authenticate. In my example we start at the top of the heirarchy (6200networks.com)
#3 - you need to have an administrative user setup on you AD so that we can bind with the AD and send user authentication requests. This is the password the admin user has.
#4 - This is the complete string of the admin user. To get the complete string go to the AD box, open a command prompt and run the dsquery command on the admin username (the asterisks broaden the search) dsquery user -name *Administrator*
#5 - replace mytunnelgroup with the name of your vpn tunnel-group
Now authentication is done via group attributes in AD in most instances via the dialin attributes msallowdialin attribute and using tunneling protocols attribute but I have some customers that would like to use the memberof attribute instead so that they can prevent members of other AD groups from connecting to the ASA…this can be done using LDAP schema 65 attribute mapping…for instance…the ASA/PIX uses the Cisco LDAP attribute
cVPN3000-IETF-Radius-Class to enforce policies from a specific group-policy for Remote Access VPN sessions (IPSec, SVC, WebVPN or Clientless). The LDAP attribute (65) is equivalent to Radius Class (25) attribute.
On the ASA create an ldap-attribute-map with the minimum mapping and associate it with the ldap aaa-server.
5500-1(config-aaa-server-host)# show runn ldap
!
ldap attribute-map Map1
map-name memberOf cVPN3000-IETF-Radius-Class
map-value memberOf CN=AD-Group1,CN=Users,DC=CompanyA,DC=com ASA-Group1-Allow-Access
map-value memberOf CN=AD-Group2,CN=Users,DC=CompanyA,DC=com ASA-Group2-Deny-Access
!
5500-1(config-aaa-server-host)#
OK so what is being enforced with the above mapping?
1) user1 in AD group AD-Group1 will be placed-landed on ASA group-policy ASA-Group1-Allow-Access. In this ASA group then you can set vpn-tunnel-protocol to allow only svc and webvpn types for example.
2) user2 in AD group AD-Group2 will be placed-landed on ASA group-policy ASA-Group2-Deny-Access. In this ASA group then you can set vpn-tunnel-protocol to allow only ipsec types for example. Therefore svc/webvpn types would be disallowed.
Note: If the AD user is part of multiple AD groups, make sure the AD user’s memberof/group of interest is at the top of the list ,since as of 7.2.x , the appliance only enforces the 1st memberOf attribute that is parsed. The single AD group (memberOf) limitation has been removed in 8.0 where the ASA is able to make policy decisions based on multiple AD groups.
If you have any questions please see the following link for details:
Configuring an External Server
Joe

Comment by Dan Didier
on 3 June 2008:
Joe,
Excellent information in this post! I’m wondering if you’ve ever configured LDAP to recognize the AD group membership and assign VPN roles accordingly. I’m currently working on a project to do so and your input would be greatly appreciated.
Thanks,
Dan
http://www.netsecureia.com
Comment by Joe Harris
on 5 June 2008:
Hi Dan,
Interesting concept but I have not done that…Give me a day or so and I’ll configure it up and unicast you.
Comment by Dan Didier
on 8 June 2008:
Joe,
I’m looking forward to it. I’m working with this now and if you can assist, that would be much appreciated. I plan on making this configuration available on my website when complete.
Thanks again,
Dan
Comment by Matt Goli
on 10 June 2008:
Hi Dan,
I am also curious on seeing the solution to assigning VPN access based upon different Active Directory Group memberships.
Thank you,
Matt.
Comment by Joe Harris
on 12 June 2008:
Hi Dan, I appologize for the delay in getting back to you. I had surgery and have been laying low (wife’s orders & doctors)..anyway have you had a look @ the following link? I believe it provides what your looking for and if it doesn’t please let me know and I will lab it up for you.
http://www.cisco.com/en/US/partner/products/ps6120/products_configuration_example09186a00808d1a7c.shtml
Comment by Dan Didier
on 17 June 2008:
Joe,
Thanks! This looks like what I need. The link you posted requires a login (which I have) but it still didn’t work. I believe this is the same document and it is publicly available: http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00808d1a7c.shtml
I’m working on this currently and will let you know how it goes. I appreciate your time and input. Get well soon! -Dan
Comment by Joe Harris
on 17 June 2008:
Hi Dan,
I’m sorry about posting the login required link, I forgot all about that but yes your correct they are the same document(s). Let us know how your project goes and feel free to reach out to me (and us) if you run into any unforeseen issues.