Asa Anyconnect Double Authentication With Certificate Validation, Mapping, and Pre Fill Configuration Guide
Asa Anyconnect Double Authentication With Certificate Validation, Mapping, and Pre Fill Configuration Guide
Asa Anyconnect Double Authentication With Certificate Validation, Mapping, and Pre Fill Configuration Guide
Contents
Introduction
Prerequisites
Requirements
Components Used
Configure
Certificate for AnyConnect
Certificate Installation on ASA
ASA Configuration for Single Authentication and Certificate Validation
Test
Debug
ASA Configuration for Double Authentication and Certificate Validation
Test
Debug
ASA Configuration for Double Authentication and Pre−Fill
Test
Debug
ASA Configuration for Double Authentication and Certificate Mapping
Test
Debug
Troubleshoot
Valid Certificate Not Present
Related Information
Introduction
This document describes a configuration example for Adaptive Security Appliance (ASA) Cisco AnyConnect
Secure Mobility Client access that uses double authentication with certificate validation. As an AnyConnect
user, you must provide the correct certificate and credentials for the primary and secondary authentication in
order to get VPN access. This document also provides an example of certificate mapping with the pre−fill
feature.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
• Basic knowledge of ASA command−line interface (CLI) configuration and Secure Socket Layer
(SSL) VPN configuration
• Basic knowledge of X509 certificates
Components Used
The information in this document is based on these software versions:
• Cisco Adaptive Security Appliance (ASA) software, version 8.4 and later
• Windows 7 with Cisco AnyConnect Secure Mobility Client 3.1
It is assumed that you used an external Certificate Authority (CA) in order to generate:
• A public−key cryptography standard #12 (PKCS #12) base64−encoded certificate for ASA
(anyconnect.pfx)
• A PKCS #12 certificate for AnyConnect
Configure
Note: Use the Command Lookup Tool (registered customers only) in order to obtain more information on the
commands used in this section.
By default, AnyConnect tries to find a certificate in the Microsoft user store; there is no need to make any
changes in the AnyConnect profile.
Use the show crypto ca certificates command in order to verify the import:
Certificate
Status: Available
Certificate Serial Number: 00fe9c3d61e131cda9
Certificate Usage: General Purpose
Public Key Type: RSA (1024 bits)
Signature Algorithm: SHA1 with RSA Encryption
Issuer Name:
cn=TAC
ou=RAC
o=TAC
l=Warsaw
st=Maz
c=PL
Subject Name:
cn=IOS
ou=UNIT
o=TAC
l=Wa
st=Maz
c=PL
Validity Date:
start date: 12:48:31 UTC Nov 29 2012
end date: 12:48:31 UTC Nov 29 2013
Associated Trustpoints: CA
Note: The Output Interpreter Tool (registered customers only) supports certain show commands. Use the
Output Interpreter Tool in order to view an analysis of show command output.
webvpn
enable outside
anyconnect image disk0:/anyconnect−win−3.1.01065−k9.pkg 1
anyconnect enable
tunnel−group−list enable
In addition to this configuration, it is possible to perform Lightweight Directory Access Protocol (LDAP)
authorization with the username from a specific certificate field, such as the certificate name (CN). Additional
attributes can then be retrieved and applied to the VPN session. For more information on authentication and
certificate authorization, refer to "ASA Anyconnect VPN and OpenLDAP Authorization with Custom Schema
and Certificates Configuration Example."
Test
Note: The Output Interpreter Tool (registered customers only) supports certain show commands. Use the
Output Interpreter Tool in order to view an analysis of show command output.
In order to test this configuration, provide the local credentials (username cisco with password cisco). The
certificate must be present:
Enter the show vpn−sessiondb detail anyconnect command on the ASA:
AnyConnect−Parent Tunnels: 1
SSL−Tunnel Tunnels: 1
DTLS−Tunnel Tunnels: 1
AnyConnect−Parent:
Tunnel ID : 10.1
Public IP : 10.147.24.60
Encryption : none TCP Src Port : 62531
TCP Dst Port : 443 Auth Mode : Certificate
and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 28 Minutes
Client Type : AnyConnect
Client Ver : 3.1.01065
Bytes Tx : 10075 Bytes Rx : 1696
Pkts Tx : 8 Pkts Rx : 4
Pkts Tx Drop : 0 Pkts Rx Drop : 0
SSL−Tunnel:
Tunnel ID : 10.2
Assigned IP : 10.1.1.10 Public IP : 10.147.24.60
Encryption : RC4 Hashing : SHA1
Encapsulation: TLSv1.0 TCP Src Port : 62535
TCP Dst Port : 443 Auth Mode : Certificate
and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 28 Minutes
Client Type : SSL VPN Client
Client Ver : Cisco AnyConnect VPN Agent for Windows 3.1.01065
Bytes Tx : 5037 Bytes Rx : 2235
Pkts Tx : 4 Pkts Rx : 11
Pkts Tx Drop : 0 Pkts Rx Drop : 0
DTLS−Tunnel:
Tunnel ID : 10.3
Assigned IP : 10.1.1.10 Public IP : 10.147.24.60
Encryption : AES128 Hashing : SHA1
Encapsulation: DTLSv1.0 UDP Src Port : 52818
UDP Dst Port : 443 Auth Mode : Certificate
and userPassword
Idle Time Out: 30 Minutes Idle TO Left : 29 Minutes
Client Type : DTLS VPN Client
Client Ver : 3.1.01065
Bytes Tx : 0 Bytes Rx : 21268
Pkts Tx : 0 Pkts Rx : 177
Pkts Tx Drop : 0 Pkts Rx Drop : 0
NAC:
Reval Int (T): 0 Seconds Reval Left(T): 0 Seconds
SQ Int (T) : 0 Seconds EoU Age(T) : 92 Seconds
Hold Left (T): 0 Seconds Posture Token:
Redirect URL :
Debug
Note: Refer to Important Information on Debug Commands before you use debug commands.
In this example, the certificate was not cached in the database, a corresponding CA has been found, the
correct Key usage was used (ClientAuthentication), and the certificate has been validated successfully:
Detailed debug commands, such as the debug webvpn 255 command, can generate many logs in a production
environment and place a heavy load on an ASA. Some WebVPN debugs have been removed for clarity:
This is the attempt to find a matching tunnel−group. There are no specific certificate mapping rules, and the
tunnel−group that you provide is used:
CRYPTO_PKI: Attempting to find tunnel group for cert with serial number:
00FE9C3D61E131CDB1, subject name: cn=test1,ou=Security,o=Cisco,l=Krakow,st=PL,
c=PL, issuer_name: cn=TAC,ou=RAC,o=TAC,l=Warsaw,st=Maz,c=PL.
CRYPTO_PKI: No Tunnel Group Match for peer certificate.
CERT_API: Unable to find tunnel group for cert using rules (SSL)
%ASA−7−725012: Device chooses cipher : RC4−SHA for the SSL session with client
outside:10.147.24.60/64435
%ASA−7−717025: Validating certificate chain containing 1 certificate(s).
%ASA−7−717029: Identified client certificate within certificate chain. serial
number: 00FE9C3D61E131CDB1, subject name: cn=test1,ou=Security,o=Cisco,l=Krakow,
st=PL,c=PL.
%ASA−7−717030: Found a suitable trustpoint CA to validate certificate.
%ASA−6−717022: Certificate was successfully validated. serial number:
00FE9C3D61E131CDB1, subject name: cn=test1,ou=Security,o=Cisco,l=Krakow,st=PL,
c=PL.
%ASA−6−717028: Certificate chain was successfully validated with warning,
revocation status was not checked.
%ASA−6−725002: Device completed SSL handshake with client outside:
10.147.24.60/64435
%ASA−7−717036: Looking for a tunnel group match based on certificate maps for
peer certificate with serial number: 00FE9C3D61E131CDB1, subject name: cn=test1,
ou=Security,o=Cisco,l=Krakow,st=PL,c=PL, issuer_name: cn=TAC,ou=RAC,o=TAC,
l=Warsaw,st=Maz,c=PL.
%ASA−4−717037: Tunnel group search using certificate maps failed for peer
certificate: serial number: 00FE9C3D61E131CDB1, subject name: cn=test1,
ou=Security,o=Cisco,l=Krakow,st=PL,c=PL, issuer_name: cn=TAC,ou=RAC,o=TAC,
l=Warsaw,st=Maz,c=PL.
%ASA−6−113012: AAA user authentication Successful : local database : user = cisco
%ASA−6−113009: AAA retrieved default group policy (Group1) for user = cisco
%ASA−6−113008: AAA transaction status ACCEPT : user = cisco
%ASA−7−734003: DAP: User cisco, Addr 10.147.24.60:
Session Attribute aaa.cisco.grouppolicy = Group1
%ASA−7−734003: DAP: User cisco, Addr 10.147.24.60:
Session Attribute aaa.cisco.username = cisco
%ASA−7−734003: DAP: User cisco, Addr 10.147.24.60:
Session Attribute aaa.cisco.username1 = cisco
%ASA−7−734003: DAP: User cisco, Addr 10.147.24.60:
Session Attribute aaa.cisco.username2 =
%ASA−7−734003: DAP: User cisco, Addr 10.147.24.60:
Session Attribute aaa.cisco.tunnelgroup = RA
%ASA−6−734001: DAP: User cisco, Addr 10.147.24.60, Connection AnyConnect: The
following DAP records were selected for this connection: DfltAccessPolicy
%ASA−6−113039: Group <Group1> User <cisco> IP <10.147.24.60> AnyConnect parent
session started.
tunnel−group RA general−attributes
authentication−server−group LOCAL
secondary−authentication−server−group LDAP
default−group−policy Group1
authorization−required
tunnel−group RA webvpn−attributes
authentication aaa certificate
You do not see 'authentication−server−group LOCAL' in the configuration because it is a default setting.
Test
Note: The Output Interpreter Tool (registered customers only) supports certain show commands. Use the
Output Interpreter Tool in order to view an analysis of show command output.
In order to test this configuration, provide the local credentials (username cisco with password cisco) and
LDAP credentials (username cisco with password from LDAP). The certificate must be present:
Enter the show vpn−sessiondb detail anyconnect command on the ASA.
Results are similar to those for single authentication. Refer to "ASA Configuration for Single Authentication
and Certificate Validation, Test."
Debug
Debugs for WebVPN session and authentication are similar. Refer to "ASA Configuration for Single
Authentication and Certificate Validation, Debug." One additional authentication process appears:
Debugs for LDAP show details that might vary with the LDAP configuration:
For primary authentication, the username is taken from the CN, which is why local user 'test1' was created.
For secondary authentication, the username is taken from the organizational unit (OU, which is why user
'Security' was created on the LDAP server.
It is also possible to force AnyConnect to use pre−fill commands in order to pre−fill the primary and
secondary username.
In a real world scenario, the primary authentication server is usually an AD or LDAP server, while the
secondary authentication server is the Rivest, Shamir, and Adelman (RSA) server that uses token passwords.
In this scenario, the user must provide AD/LDAP credentials (which the user knows), an RSA token password
(which the user has) and a certificate (on the machine that is used).
Test
Observe that you cannot change the primary or secondary username because it is pre−filled from the
certificate CN and OU fields:
Debug
webvpn
certificate−group−map CERT−MAP 10 RA
This way, all user certificates signed by the Cisco Technical Assistance Center (TAC) CA are mapped to a
tunnel−group named 'RA.'
Note: Certificate mapping for SSL is configured differently than certificate mapping for IPsec. For IPsec, it is
configured using 'tunnel−group−map' rules in global config mode. For SSL, it is configured using
'certificate−group−map' under webvpn config mode.
Test
Observe that, once certificate mapping is enabled, you do not need to choose tunnel−group anymore:
Debug
In this example, the certificate mapping rule allows the tunnel−group to be found:
%ASA−7−717036: Looking for a tunnel group match based on certificate maps for
peer certificate with serial number: 00FE9C3D61E131CDB1, subject name: cn=test1,
ou=Security,o=Cisco,l=Krakow,st=PL,c=PL, issuer_name: cn=TAC,ou=RAC,o=TAC,
l=Warsaw,st=Maz,c=PL.
%ASA−7−717038: Tunnel group match found. Tunnel Group: RA, Peer certificate:
serial number: 00FE9C3D61E131CDB1, subject name: cn=test1,ou=Security,o=Cisco,
l=Krakow,st=PL,c=PL, issuer_name: cn=TAC,ou=RAC,o=TAC,l=Warsaw,st=Maz,c=PL.
Troubleshoot
This section provides information you can use in order to troubleshoot your configuration.
On the ASA, it looks like the session is terminated by the client (Reset−I):