이 문서에서는 인증서 검증과 이중 인증을 사용하는 ASA(Adaptive Security Appliance) Cisco AnyConnect Secure Mobility Client 액세스의 컨피그레이션 예를 설명합니다.AnyConnect 사용자는 VPN 액세스를 얻기 위해 기본 및 보조 인증을 위한 올바른 인증서 및 자격 증명을 제공해야 합니다.또한 이 문서에서는 미리 채우기 기능을 사용하여 인증서 매핑의 예를 제공합니다.
다음 주제에 대한 지식을 보유하고 있으면 유용합니다.
이 문서의 정보는 다음 소프트웨어 버전을 기반으로 합니다.
다음을 생성하기 위해 외부 CA(Certificate Authority)를 사용한 것으로 가정합니다.
예제 인증서를 설치하려면 anyconnect.pfx 파일을 두 번 클릭하고 해당 인증서를 개인 인증서로 설치하십시오.
인증서 관리자(certmgr.msc)를 사용하여 설치를 확인합니다.
기본적으로 AnyConnect는 Microsoft 사용자 저장소에서 인증서를 찾으려고 시도합니다.AnyConnect 프로파일은 변경할 필요가 없습니다.
다음 예에서는 ASA가 base64 PKCS #12 인증서를 가져오는 방법을 보여 줍니다.
BSNS-ASA5580-40-1(config)# crypto ca import CA pkcs12 123456
Enter the base 64 encoded pkcs12.
End with the word "quit" on a line by itself:
MIIJAQIBAzCCCMcGCSqGSIb3DQEHAaCCCLgEggi0MIIIsDCCBa8GCSqGSIb3DQEH
...
<output ommitted>
...
83EwMTAhMAkGBSsOAwIaBQAEFCS/WBSkrOIeT1HARHbLF1FFQvSvBAhu0j9bTtZo
3AICCAA=
quit
INFO: Import PKCS12 operation completed successfully
가져오기를 확인하려면 show crypto ca certificates 명령을 사용합니다.
BSNS-ASA5580-40-1(config)# show crypto ca certificates
CA Certificate
Status: Available
Certificate Serial Number: 00cf946de20d0ce6d9
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=TAC
ou=RAC
o=TAC
l=Warsaw
st=Maz
c=PL
Validity Date:
start date: 08:11:26 UTC Nov 16 2012
end date: 08:11:26 UTC Nov 16 2013
Associated Trustpoints: CA
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
ASA는 AAA(Authentication, Authorization, and Accounting) 인증 및 인증서 인증을 모두 사용합니다.인증서 검증은 필수입니다.AAA 인증에서는 로컬 데이터베이스를 사용합니다.
이 예에서는 인증서 검증을 사용하는 단일 인증을 보여줍니다.
ip local pool POOL 10.1.1.10-10.1.1.20
username cisco password cisco
webvpn
enable outside
anyconnect image disk0:/anyconnect-win-3.1.01065-k9.pkg 1
anyconnect enable
tunnel-group-list enable
group-policy Group1 internal
group-policy Group1 attributes
vpn-tunnel-protocol ssl-client ssl-clientless
address-pools value POOL
tunnel-group RA type remote-access
tunnel-group RA general-attributes
authentication-server-group LOCAL
default-group-policy Group1
authorization-required
tunnel-group RA webvpn-attributes
authentication aaa certificate
group-alias RA enable
이 컨피그레이션 외에도 CN(certificate name)과 같은 특정 인증서 필드의 사용자 이름으로 LDAP(Lightweight Directory Access Protocol) 권한 부여를 수행할 수 있습니다. 그런 다음 추가 특성을 검색하여 VPN 세션에 적용할 수 있습니다.인증 및 인증서 권한 부여에 대한 자세한 내용은 "ASA Anyconnect VPN and OpenLDAP Authorization with Custom Schema and Certificates Configuration Example"을 참조하십시오.
이 컨피그레이션을 테스트하려면 로컬 자격 증명(사용자 이름 cisco 및 비밀번호 cisco)을 제공하십시오. 인증서가 있어야 합니다.
ASA에서 show vpn-sessiondb detail anyconnect 명령을 입력합니다.
BSNS-ASA5580-40-1(config-tunnel-general)# show vpn-sessiondb detail anyconnect
Session Type: AnyConnect Detailed
Username : cisco Index : 10
Assigned IP : 10.1.1.10 Public IP : 10.147.24.60
Protocol : AnyConnect-Parent SSL-Tunnel DTLS-Tunnel
License : AnyConnect Premium
Encryption : RC4 AES128 Hashing : none SHA1
Bytes Tx : 20150 Bytes Rx : 25199
Pkts Tx : 16 Pkts Rx : 192
Pkts Tx Drop : 0 Pkts Rx Drop : 0
Group Policy : Group1 Tunnel Group : RA
Login Time : 10:16:35 UTC Sat Apr 13 2013
Duration : 0h:01m:30s
Inactivity : 0h:00m:00s
NAC Result : Unknown
VLAN Mapping : N/A VLAN : none
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 :
이 예에서는 인증서가 데이터베이스에 캐시되지 않았고 해당 CA가 발견되었으며 올바른 키 사용이 사용되었으며(ClientAuthentication) 인증서가 성공적으로 검증되었습니다.
debug aaa authentication
debug aaa authorization
debug webvpn 255
debug webvpn anyconnect 255
debug crypto ca 255
debug webvpn 255 명령과 같은 자세한 디버그 명령은 프로덕션 환경에서 많은 로그를 생성하고 ASA에 많은 로드를 배치할 수 있습니다.명확성을 위해 일부 WebVPN 디버그가 제거되었습니다.
CERT_API: Authenticate session 0x0934d687, non-blocking cb=0x00000000012cfc50
CERT API thread wakes up!
CERT_API: process msg cmd=0, session=0x0934d687
CERT_API: Async locked for session 0x0934d687
CRYPTO_PKI: Checking to see if an identical cert is
already in the database...
CRYPTO_PKI: looking for cert in handle=0x00007ffd8b80ee90, digest=
ad 3d a2 da 83 19 e0 ee d9 b5 2a 83 5c dd e0 70 | .=........*.\..p
CRYPTO_PKI: Cert record not found, returning E_NOT_FOUND
CRYPTO_PKI: Cert not found in database.
CRYPTO_PKI: Looking for suitable trustpoints...
CRYPTO_PKI: Storage context locked by thread CERT API
CRYPTO_PKI: Found a suitable authenticated trustpoint CA.
CRYPTO_PKI(make trustedCerts list)CRYPTO_PKI:check_key_usage: ExtendedKeyUsage
OID = 1.3.6.1.5.5.7.3.1
CRYPTO_PKI:check_key_usage:Key Usage check OK
CRYPTO_PKI: Certificate validation: Successful, status: 0. Attempting to
retrieve revocation status if necessary
CRYPTO_PKI:Certificate validated. serial number: 00FE9C3D61E131CDB1, subject name:
cn=test1,ou=Security,o=Cisco,l=Krakow,st=PL,c=PL.
CRYPTO_PKI: Storage context released by thread CERT API
CRYPTO_PKI: Certificate validated without revocation check
일치하는 터널 그룹을 찾으려고 합니다.특정 인증서 매핑 규칙이 없으며 사용자가 제공하는 터널 그룹이 사용됩니다.
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)
다음은 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.
이는 기본 인증 서버가 LOCAL이고 보조 인증 서버가 LDAP인 이중 인증의 예입니다.인증서 유효성 검사가 계속 활성화되어 있습니다.
다음 예에서는 LDAP 컨피그레이션을 보여줍니다.
aaa-server LDAP protocol ldap
aaa-server LDAP (outside) host 10.147.24.60
ldap-base-dn DC=test-cisco,DC=com
ldap-scope subtree
ldap-naming-attribute uid
ldap-login-password *****
ldap-login-dn CN=Manager,DC=test-cisco,DC=com
server-type openldap
다음은 보조 인증 서버를 추가하는 것입니다.
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
기본 설정이므로 컨피그레이션에 'authentication-server-group LOCAL'이 표시되지 않습니다.
다른 모든 AAA 서버는 'authentication-server-group'에 사용할 수 있습니다. 'secondary-authentication-server-group'에서는 SDI(Security Dynamics International) 서버를 제외한 모든 AAA 서버를 사용할 수 있습니다.이 경우 SDI는 여전히 기본 인증 서버일 수 있습니다.
이 컨피그레이션을 테스트하려면 로컬 자격 증명(사용자 이름 cisco, 비밀번호 cisco) 및 LDAP 자격 증명(사용자 이름 cisco, LDAP의 비밀번호)을 제공하십시오. 인증서가 있어야 합니다.
ASA에서 show vpn-sessiondb detail anyconnect 명령을 입력합니다.
결과는 단일 인증에 대한 결과와 유사합니다."단일 인증 및 인증서 검증, 테스트용 ASA 컨피그레이션"을 참조하십시오.
WebVPN 세션 및 인증을 위한 디버그는 유사합니다."단일 인증 및 인증서 검증, 디버그에 대한 ASA 구성"을 참조하십시오. 다음 추가 인증 프로세스가 나타납니다.
%ASA-6-113012: AAA user authentication Successful : local database : user = cisco
%ASA-6-302013: Built outbound TCP connection 1936 for outside:10.147.24.60/389
(10.147.24.60/389) to identity:10.48.67.153/54437 (10.48.67.153/54437)
%ASA-6-113004: AAA user authentication Successful : server = 10.147.24.60 :
user = cisco
%ASA-6-113009: AAA retrieved default group policy (Group1) for user = cisco
%ASA-6-113008: AAA transaction status ACCEPT : user = cisco
LDAP용 디버그에는 LDAP 컨피그레이션에 따라 달라질 수 있는 세부 정보가 표시됩니다.
[34] Session Start
[34] New request Session, context 0x00007ffd8d7dd828, reqType = Authentication
[34] Fiber started
[34] Creating LDAP context with uri=ldap://10.147.24.60:389
[34] Connect to LDAP server: ldap://10.147.24.60:389, status = Successful
[34] supportedLDAPVersion: value = 3
[34] Binding as Manager
[34] Performing Simple authentication for Manager to 10.147.24.60
[34] LDAP Search:
Base DN = [DC=test-cisco,DC=com]
Filter = [uid=cisco]
Scope = [SUBTREE]
[34] User DN = [uid=cisco,ou=People,dc=test-cisco,dc=com]
[34] Server type for 10.147.24.60 unknown - no password policy
[34] Binding as cisco
[34] Performing Simple authentication for cisco to 10.147.24.60
[34] Processing LDAP response for user cisco
[34] Authentication successful for cisco to 10.147.24.60
[34] Retrieved User Attributes:
[34] cn: value = John Smith
[34] givenName: value = John
[34] sn: value = cisco
[34] uid: value = cisco
[34] uidNumber: value = 10000
[34] gidNumber: value = 10000
[34] homeDirectory: value = /home/cisco
[34] mail: value = jsmith@dev.local
[34] objectClass: value = top
[34] objectClass: value = posixAccount
[34] objectClass: value = shadowAccount
[34] objectClass: value = inetOrgPerson
[34] objectClass: value = organizationalPerson
[34] objectClass: value = person
[34] objectClass: value = CiscoPerson
[34] loginShell: value = /bin/bash
[34] userPassword: value = {SSHA}pndf5sfjscTPuyrhL+/QUqhK+i1UCUTy
[34] Fiber exit Tx=315 bytes Rx=911 bytes, status=1
[34] Session End
기본 및 보조 인증에 사용되는 사용자 이름에 특정 인증서 필드를 매핑할 수 있습니다.
username test1 password cisco
tunnel-group RA general-attributes
authentication-server-group LOCAL
secondary-authentication-server-group LDAP
default-group-policy Group1
authorization-required
username-from-certificate CN
secondary-username-from-certificate OU
tunnel-group RA webvpn-attributes
authentication aaa certificate
pre-fill-username ssl-client
secondary-pre-fill-username ssl-client
group-alias RA enable
이 예에서는 클라이언트가 인증서를 사용하고 있습니다.cn=test1,ou=보안,o=Cisco,l=Krakow,st=PL,c=PL.
기본 인증의 경우 CN에서 사용자 이름을 가져옵니다. 따라서 로컬 사용자 'test1'이 생성된 것입니다.
보조 인증의 경우 사용자 이름은 OU(조직 구성 단위)에서 가져온 것이며, 따라서 LDAP 서버에 '보안' 사용자가 생성된 것입니다.
기본 및 보조 사용자 이름을 미리 채우기 위해 AnyConnect에서 pre-fill 명령을 사용하도록 할 수도 있습니다.
실제 시나리오에서 기본 인증 서버는 일반적으로 AD 또는 LDAP 서버이며, 보조 인증 서버는 토큰 비밀번호를 사용하는 Rivest, Shamir 및 Adelman(RSA) 서버입니다.이 시나리오에서 사용자는 AD/LDAP 자격 증명(사용자가 알고 있는), RSA 토큰 비밀번호(사용자가 가지고 있는) 및 사용 중인 시스템에서 인증서를 제공해야 합니다.
기본 또는 보조 사용자 이름은 인증서 CN 및 OU 필드에서 미리 채워져 있으므로 변경할 수 없습니다.
다음 예에서는 AnyConnect로 전송된 사전 채우기 요청을 보여줍니다.
%ASA-7-113028: Extraction of username from VPN client certificate has been
requested. [Request 5]
%ASA-7-113028: Extraction of username from VPN client certificate has started.
[Request 5]
%ASA-7-113028: Extraction of username from VPN client certificate has finished
successfully. [Request 5]
%ASA-7-113028: Extraction of username from VPN client certificate has completed.
[Request 5]
%ASA-7-113028: Extraction of username from VPN client certificate has been
requested. [Request 6]
%ASA-7-113028: Extraction of username from VPN client certificate has started.
[Request 6]
%ASA-7-113028: Extraction of username from VPN client certificate has finished
successfully. [Request 6]
%ASA-7-113028: Extraction of username from VPN client certificate has completed.
[Request 6]
인증 이 올바른 사용자 이름을 사용 하고 있음을 확인 합니다.
%ASA-6-113012: AAA user authentication Successful : local database : user = test1
%ASA-6-302013: Built outbound TCP connection 2137 for outside:10.147.24.60/389
(10.147.24.60/389) to identity:10.48.67.153/46606 (10.48.67.153/46606)
%ASA-6-113004: AAA user authentication Successful : server = 10.147.24.60 :
user = Security
다음 예와 같이 특정 클라이언트 인증서를 특정 터널 그룹에 매핑할 수도 있습니다.
crypto ca certificate map CERT-MAP 10
issuer-name co tac
webvpn
certificate-group-map CERT-MAP 10 RA
이렇게 하면 Cisco TAC(Technical Assistance Center) CA에서 서명한 모든 사용자 인증서가 'RA'라는 터널 그룹에 매핑됩니다.
인증서 매핑이 활성화되면 더 이상 터널 그룹을 선택할 필요가 없습니다.
이 예에서는 인증서 매핑 규칙을 사용하여 터널 그룹을 찾을 수 있습니다.
%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.
이 섹션에서는 컨피그레이션 문제를 해결하는 데 사용할 수 있는 정보를 제공합니다.
Windows7에서 유효한 인증서를 제거한 후에는 AnyConnect에서 유효한 인증서를 찾을 수 없습니다.
ASA에서 세션이 클라이언트에 의해 종료된 것 같습니다(Reset-I).
%ASA-6-302013: Built inbound TCP connection 2489 for outside:10.147.24.60/52838
(10.147.24.60/52838) to identity:10.48.67.153/443 (10.48.67.153/443)
%ASA-6-725001: Starting SSL handshake with client outside:10.147.24.60/52838 for
TLSv1 session.
%ASA-7-725010: Device supports the following 4 cipher(s).
%ASA-7-725011: Cipher[1] : RC4-SHA
%ASA-7-725011: Cipher[2] : AES128-SHA
%ASA-7-725011: Cipher[3] : AES256-SHA
%ASA-7-725011: Cipher[4] : DES-CBC3-SHA
%ASA-7-725008: SSL client outside:10.147.24.60/52838 proposes the following 8
cipher(s).
%ASA-7-725011: Cipher[1] : AES128-SHA
%ASA-7-725011: Cipher[2] : AES256-SHA
%ASA-7-725011: Cipher[3] : RC4-SHA
%ASA-7-725011: Cipher[4] : DES-CBC3-SHA
%ASA-7-725011: Cipher[5] : DHE-DSS-AES128-SHA
%ASA-7-725011: Cipher[6] : DHE-DSS-AES256-SHA
%ASA-7-725011: Cipher[7] : EDH-DSS-DES-CBC3-SHA
%ASA-7-725011: Cipher[8] : RC4-MD5
%ASA-7-725012: Device chooses cipher : RC4-SHA for the SSL session with client
outside:10.147.24.60/52838
%ASA-6-302014: Teardown TCP connection 2489 for outside:10.147.24.60/52838 to
identity:10.48.67.153/443 duration 0:00:00 bytes 1448 TCP Reset-I
개정 | 게시 날짜 | 의견 |
---|---|---|
1.0 |
13-Jun-2013 |
최초 릴리스 |