2020-04-22 03:57 PM 2020-04-29 02:51 PM 更新
NADやsupplicant,pxGrid連携機器を用意できない環境でもISE上でRADIUSのsessionを作成でき、またそれを使ったpxGridの検証が可能です。本稿ではその構築方法と確認例を紹介します。
Windows10 のVMにWSLでUbuntu18をsetupし、そこに
sudo apt install openjdk-8-jre-headless
でopenjdkをinstallしてあります(JavaのGUIは不要なためheadlessをinstall)。そのjava環境で802.1x_SupplicantとNADを含むRadiusSimulator.jarとpxGrid SDKを使用します。
直接Ubuntu18のVMを構築するのももちろん有効です。Cygwin,MACでも可能と思われます。
Win10 VMとISE VMはIP疎通できていて
[20/03/27] pki$ which java
/usr/bin/java
[20/03/29] pki$ which javac
/usr/bin/javac
のように java, javacにpathが通っていれば問題ありません。 .bash_profileに
export _JAVA_OPTIONS='-Dfile.encoding=UTF-8'
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
を適宜追加します。
本稿ではISEは2.4p11を使用しています。
使用するファイルは
(注) pxgrid-sdkは元々Cisco Platform Exchange Grid (pxGrid)で配布していましたが、主なpxGridのVersionが2にshiftしたのに伴って配布を終了しております。
まだpxGrid verion1の検証ができることも有効と考えたため本稿には添付しますが、配布元では対応が終了しているため配布元へのお問合せはご遠慮ください。
Controller
どちらかというとServerの役割であり、ISE GUIでNodeでpxGridを有効にすると動き出すのはこのControllerです。
Publisher
どちらかというとClientの役割であり、ISE上の情報をpxGridに発行(Publish)します。
PANやMnTはpxGridのPublisherになりえます。
Subscriber
どちらかというとClientの役割であり、pxGrid上の情報を購読(Subscribe)します。
PANやMnTはpxGridのSubscriberにもなりえます。
上記で簡単に触れましたが、pxGridには1と2のVersionがあります。version2はISE 2.3から実装されておりますが、今でもv1(XMPP:TCP5220ベース),v2(Websocket:TCP8910ベース)双方をControllerが待ち受け,Client側のverionsに応じて動作するようになっています。ISE側に選択の設定はありません。
なお、今回使用するSDKのVersionは2.0.0.15ですが、これはpxGridのVersionではありませんのご注意ください。このSDKで利用可能なpxGridのVersionは1です。
Administration > System > Deployment > <Node選択> で
pxGridにcheckを入れ少し待つと、
Administration > pxGrid Servicesで
Connected via XMPP XXXX と緑色表示になるので正常に起動したことが確認できます。
Administration > Network Resources > Network Devices で
Win10 VMのIP addressをNADとして登録します。 shared secretはここではciscoとします。
pxGridはdefaultでserver/client双方で証明書が必要です。
server証明書は下の絵の通り自動で生成されています。
IssuerがInternal CA(Endpoint Sub CA)であることに注意(外部作成も可能です)
Administration > pxGrid Services > Certificates で、
同じページでCertificate Chainも取得します。
CreateでISEのIntenal CAのcertificate chainとISEのpxGrid証明書が入ったzipファイルが生成されます。
pxgrid SDKのtarファイルを適当なdirectoryで解凍します。
[20/03/29] v1$ tar xvf ../../download/ise/pxgrid-sdk-2.0.0.15-dist.tar
pxgrid-sdk-2.0.0.15/README.txt
pxgrid-sdk-2.0.0.15/doc/api/
pxgrid-sdk-2.0.0.15/doc/api/com/
(snip)
pxgrid-sdk-2.0.0.15/xsd/pxgrid-eps-def/
pxgrid-sdk-2.0.0.15/xsd/pxgrid-gc-admin-def/xgridGCAdminService.xsd
pxgrid-sdk-2.0.0.15/xsd/pxgrid-gc-admin-def/
pxgrid-sdk-2.0.0.15/xsd/pxgrid-anc-def/xgridANCService.xsd
pxgrid-sdk-2.0.0.15/xsd/pxgrid-anc-def/
[20/03/29] v1$
[20/03/29] v1$ ls
RadiusSimulator.jar pxgrid-sdk-2.0.0.15
RadiusSimulator.jarも置いておきます。
JDKにはkeytoolというJavaのPKI管理ツールがあり、pxGrid clientがserver(ISE)に提示する証明書(with秘密鍵)を保管するstore(identity keystore)とserverが提示してくる証明書を検証するためのstore(trust keystore)をjksファイルとして作成できます。
keytool -importkeystore -srckeystore pkcs12file -destkeystore jksfile -srcstoretype pkcs12
でidentity keystoreを作成(pkcs12をJava keystoreに変換)
[20/03/29] v1$ pwd
/mnt/c/hiyoko/pxgrid/v1
[20/03/31] v1$ keytool -importkeystore -srckeystore ./win10man_1.150.0.185.p12 -destkeystore win10man_isegiz_pxgrid.jks -srcstoretype pkcs12
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Importing keystore ./win10man_1.150.0.185.p12 to win10man_isegiz_pxgrid.jks...
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias win10man_1.150.0.185 successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore win10man_isegiz_pxgrid.jks -destkeystore win10man_isegiz_pxgrid.jks -deststoretype pkcs12".
[20/03/31] v1$
keytool -importcert -alias name -keystore jksfile -file cerfile
でISEのinternal CAの証明書chainをtrust keystoreにimport
[20/04/05] tmp$ keytool -importcert -alias isegizroot -keystore root.jks -file CertificateServicesRootCA-isegiz_.cer
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Enter keystore password:
Re-enter new password:
Owner: CN=Certificate Services Root CA - isegiz
Issuer: CN=Certificate Services Root CA - isegiz
Serial number: 48dadedc73aa4079967c2d2f35e8776c
Valid from: Sat Mar 28 23:36:22 GMT 2020 until: Fri Mar 29 23:36:22 GMT 2030
Certificate fingerprints:
MD5: FD:9E:FA:5A:0F:E0:77:F5:25:E1:B2:30:C0:3E:E5:C7
SHA1: D2:83:C6:FB:C5:4E:18:96:48:80:6D:D7:5C:75:98:AA:2A:9A:CA:28
SHA256: E9:70:FE:78:91:09:F1:26:BA:D6:29:96:10:A6:BA:30:0C:55:93:A3:A0:06:B5:69:6D:A5:47:8E:1D:C2:F3:5C
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
Extensions:
#1: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:2147483647
]
#2: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
]
#3: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: F9 9C 26 49 A6 41 9E 5A B9 03 88 45 49 00 E0 28 ..&I.A.Z...EI..(
0010: A4 77 E1 7A .w.z
]
]
Trust this certificate? [no]: yes
Certificate was added to keystore
[20/04/05] tmp$ keytool -importcert -alias isegiznode -keystore root.jks -file 2_CertificateServicesNodeCA-isegiz_.cer
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Enter keystore password:
Certificate was added to keystore
[20/04/05] tmp$ keytool -importcert -alias isegizepsub -keystore root.jks -file 3_CertificateServicesEndpointSubCA-isegiz_.cer
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Enter keystore password:
Certificate was added to keystore
[20/04/05] tmp$
keytool -list -v -keystore jksfile
でjksの中身確認が可能
[20/04/05] tmp$ keytool -list -v -keystore root.jks
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Enter keystore password:
Keystore type: jks
Keystore provider: SUN
Your keystore contains 3 entries
Alias name: isegiznode
Creation date: Apr 5, 2020
Entry type: trustedCertEntry
Owner: CN=Certificate Services Node CA - isegiz
Issuer: CN=Certificate Services Root CA - isegiz
Serial number: 11dae3f8c8744980b286d98f932a43c2
Valid from: Sat Mar 28 23:36:24 GMT 2020 until: Fri Mar 29 23:36:22 GMT 2030
Certificate fingerprints:
MD5: C0:D5:56:F3:8F:D6:EA:A7:6D:08:83:89:0A:85:6C:47
SHA1: 05:DD:2B:9D:39:80:BD:1C:6D:2B:1B:6D:1D:67:08:F4:44:E6:B5:65
SHA256: A2:62:A0:5A:23:3B:59:E9:59:54:92:74:38:32:08:B2:03:BB:E2:93:9E:2C:5E:E9:2F:13:96:D9:A7:2A:E7:27
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
Extensions:
#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: F9 9C 26 49 A6 41 9E 5A B9 03 88 45 49 00 E0 28 ..&I.A.Z...EI..(
0010: A4 77 E1 7A .w.z
]
[CN=Certificate Services Root CA - isegiz]
SerialNumber: [ 48dadedc 73aa4079 967c2d2f 35e8776c]
]
#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:2147483647
]
#3: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
]
#4: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 37 F3 26 25 03 C5 4F 3D 41 B3 FA AA EE A6 C1 6C 7.&%..O=A......l
0010: 81 DF 32 37 ..27
]
]
*******************************************
*******************************************
Alias name: isegizepsub
Creation date: Apr 5, 2020
Entry type: trustedCertEntry
Owner: CN=Certificate Services Endpoint Sub CA - isegiz
Issuer: CN=Certificate Services Node CA - isegiz
Serial number: 6aa9ae9f2808462395f6da0bc95f935f
Valid from: Sat Mar 28 23:36:25 GMT 2020 until: Fri Mar 29 23:36:22 GMT 2030
Certificate fingerprints:
MD5: 7A:B4:8E:71:B1:45:BD:D0:E8:91:84:BE:5A:BE:9B:04
SHA1: A9:87:CE:FB:E1:FD:74:55:77:9E:80:C5:7D:DD:30:4B:FA:7A:1D:7F
SHA256: 92:32:E8:2C:29:57:12:B9:CE:9C:44:81:3F:F5:A1:A6:E5:F6:A7:8D:D5:6D:D2:26:9C:00:24:89:6E:8F:65:8E
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
Extensions:
#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 37 F3 26 25 03 C5 4F 3D 41 B3 FA AA EE A6 C1 6C 7.&%..O=A......l
0010: 81 DF 32 37 ..27
]
[CN=Certificate Services Root CA - isegiz]
SerialNumber: [ 11dae3f8 c8744980 b286d98f 932a43c2]
]
#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:2147483647
]
#3: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
]
#4: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 10 D0 08 DF 09 7E A5 C4 34 D2 1E B7 29 78 26 4F ........4...)x&O
0010: EE 14 D6 89 ....
]
]
*******************************************
*******************************************
Alias name: isegizroot
Creation date: Apr 5, 2020
Entry type: trustedCertEntry
Owner: CN=Certificate Services Root CA - isegiz
Issuer: CN=Certificate Services Root CA - isegiz
Serial number: 48dadedc73aa4079967c2d2f35e8776c
Valid from: Sat Mar 28 23:36:22 GMT 2020 until: Fri Mar 29 23:36:22 GMT 2030
Certificate fingerprints:
MD5: FD:9E:FA:5A:0F:E0:77:F5:25:E1:B2:30:C0:3E:E5:C7
SHA1: D2:83:C6:FB:C5:4E:18:96:48:80:6D:D7:5C:75:98:AA:2A:9A:CA:28
SHA256: E9:70:FE:78:91:09:F1:26:BA:D6:29:96:10:A6:BA:30:0C:55:93:A3:A0:06:B5:69:6D:A5:47:8E:1D:C2:F3:5C
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
Extensions:
#1: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:2147483647
]
#2: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
]
#3: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: F9 9C 26 49 A6 41 9E 5A B9 03 88 45 49 00 E0 28 ..&I.A.Z...EI..(
0010: A4 77 E1 7A .w.z
]
]
*******************************************
*******************************************
[20/04/05] tmp$
Java Key Storeの作成完了
[20/04/04] v1$ ll pxgrid-sdk-2.0.0.15/samples/bin/
total 16
drwxrwxrwx 1 hiyoko hiyoko 512 Jul 14 2018 ./
drwxrwxrwx 1 hiyoko hiyoko 512 Mar 29 20:16 ../
-rwxr--r-- 1 hiyoko hiyoko 165 Jul 14 2018 ANCAction_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 151 Jul 14 2018 capability_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 2893 Jul 14 2018 common.sh*
-rwxr--r-- 1 hiyoko hiyoko 159 Jul 14 2018 core_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 172 Jul 14 2018 create_account.sh*
-rwxr--r-- 1 hiyoko hiyoko 187 Jul 14 2018 endpointprofile_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 191 Jul 14 2018 endpointprofile_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 168 Jul 14 2018 eps_quarantine.sh*
-rwxr--r-- 1 hiyoko hiyoko 170 Jul 14 2018 eps_unquarantine.sh*
-rwxr--r-- 1 hiyoko hiyoko 668 Jul 14 2018 generic_client.sh*
-rwxr--r-- 1 hiyoko hiyoko 184 Jul 14 2018 identity_group_download.sh*
-rwxr--r-- 1 hiyoko hiyoko 181 Jul 14 2018 identity_group_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 185 Jul 14 2018 identity_group_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 677 Jul 14 2018 mdm_client_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 183 Jul 14 2018 mdm_download.sh*
-rwxr--r-- 1 hiyoko hiyoko 366 Jul 14 2018 mdm_topic_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 275 Jul 14 2018 multigroupclient.sh*
-rwxr--r-- 1 hiyoko hiyoko 174 Jul 14 2018 propose_capability.sh*
-rwxr--r-- 1 hiyoko hiyoko 180 Jul 14 2018 securitygroup_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 184 Jul 14 2018 securitygroup_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 174 Jul 14 2018 session_download.sh*
-rwxr--r-- 1 hiyoko hiyoko 169 Jul 14 2018 session_query.sh*
-rwxr--r-- 1 hiyoko hiyoko 175 Jul 14 2018 session_query_by_ip.sh*
-rwxr--r-- 1 hiyoko hiyoko 787 Jul 14 2018 session_sub_download.sh*
-rwxr--r-- 1 hiyoko hiyoko 175 Jul 14 2018 session_subscribe.sh*
-rwxr--r-- 1 hiyoko hiyoko 177 Jul 14 2018 sxp_download.sh*
-rwxr--r-- 1 hiyoko hiyoko 178 Jul 14 2018 sxp_subscribe.sh*
[20/04/04] v1$
これらのshell scriptを使用するだけのもので、名前を見るとどのような機能かわかります。
java -cp RadiusSimulator.jar -DUSERNAME= username
-DPASSWORD= password
-DCALLING_STATION_ID= mac
-DAUDIT_SESSION_ID= number
-DACCT_SESSION_ID= number
-DFRAMED_IP_ADDRESS= IP
-DFRAMED_IP_MASK= netmask
-DNAS_IP_ADDRESS= PCのIP
-DRADIUS_SECRET= sharedsecret
RadiusAuthentication(/RadiusAccoutingStart/RadiusAccountingStop) ISEのIP
sharedsecretはISEでNADを登録した際のもの(cisco)に合わせる。
[20/04/04] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAuthentication 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccessAccept code=2 id=1 length=86
authenticator=ab8693bf97f18efd91fdf3e0e85a9
Attributes={
UserName=user01
Class=CACS:1001:isegiz/374949896/5
vendorId=9 vsa=[profile-name=Unknown,]
}
RadiusAuthentication <ISEのIP>で、ISEのOperations > RADIUS > Live Sessions で見た時のSession StatusがAuthenticatedに、
[20/04/04] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAccountingStart 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccountingResponse code=5 id=1 length=20
authenticator=5d73a7c53bea58657aecd5ffca61742
Attributes={
}
RadiusAccountingStart <ISEのIP>で、Session Statusが Startedに、
[20/04/04] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAccountingStop 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccountingResponse code=5 id=1 length=20
authenticator=8ccdf748aef720aeaa9b3a513f884fa9
Attributes={
}
[20/04/04] v1$
RadiusAccountingStop <ISEのIP>で、Session Statusが Terminatedになります。
これらでSessionの一通りの状態を作りだせます。
実行コマンドは
./pxgrid-sdk-2.0.0.15/samples/bin/script
-a ISEのFQDNorIP -u clientname
-k jksfile(identity)
-P passphrase
-t jksfile(trust)
-q passphrase
今回は例としてsession_subscribe.sh を使用します。
Ubuntuのterminalを二つ開き、それぞれでpxGrid SDK, RadiusSimulator.jarを実行します。
pxGrid SDK側でsession subscriberを起動します。
ここでのsession subscriberとはpxGrid client(pxGrid SDK)がpxGrid経由でISE deploymentからISE上のsession情報をrealtimeで購読(subscribe)するという機能になります。
始めてのclientnameでISEに接続すると、
[20/04/22] v1$ ./pxgrid-sdk-2.0.0.15/samples/bin/session_subscribe.sh -a 1.150.0.196 -u pxgridwin10man1 -k win10man_isegiz_pxgrid.jks -p Cisco123 -t root.jks -q Cisco123
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
------- properties -------
version=2.0.0.15
hostnames=1.150.0.196
username=pxgridwin10man1
password=
group=Session
description=null
keystoreFilename=win10man_isegiz_pxgrid.jks
keystorePassword=Cisco123
truststoreFilename=root.jks
truststorePassword=Cisco123
--------------------------
01:41:50.022 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started
Connecting...
01:41:50.079 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connecting to host 1.150.0.196
01:41:50.645 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connected OK to host 1.150.0.196
01:41:50.645 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login to host 1.150.0.196
01:41:51.113 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login OK to host 1.150.0.196
で止まってしまいますが、これはISE側でaccount登録がPendingになっているためでISE側でApproveする必要があります(自動Approveの設定もあります)。
Pendingが見えない場合はRefreshをしてみてください。
Approveすると、
01:41:50.079 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connecting to host 1.150.0.196
01:41:50.645 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connected OK to host 1.150.0.196
01:41:50.645 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login to host 1.150.0.196
01:41:51.113 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login OK to host 1.150.0.196
Account enabled
01:45:00.902 [Thread-1] INFO c.c.p.i.s.NotificationHandlerSmack - done refreshing connection state.
Connected
01:45:00.902 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected
Filters (ex. '1.0.0.0/255.0.0.0,1234::/16,...' or <enter> for no filter):
press <enter> to disconnect...
のようにAccount enabled以下が表示され、ISE側では
Onlineとなっていることが確認できます。
ISE側にclientnameが表示されている場合は以下のように、
[20/04/21] v1$ ./pxgrid-sdk-2.0.0.15/samples/bin/session_subscribe.sh -a 1.150.0.196 -u pxgridwin10man1 -k win10man_isegiz_pxgrid.jks -p Cisco123 -t root.jks -q Cisco123
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
------- properties -------
version=2.0.0.15
hostnames=1.150.0.196
username=pxgridwin10man1
password=
group=Session
description=null
keystoreFilename=win10man_isegiz_pxgrid.jks
keystorePassword=Cisco123
truststoreFilename=root.jks
truststorePassword=Cisco123
--------------------------
12:46:14.146 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started
Connecting...
12:46:14.406 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connecting to host 1.150.0.196
12:46:16.069 [Thread-1] INFO com.cisco.pxgrid.Configuration - Connected OK to host 1.150.0.196
12:46:16.069 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login to host 1.150.0.196
12:46:16.333 [Thread-1] INFO com.cisco.pxgrid.Configuration - Client Login OK to host 1.150.0.196
12:46:19.536 [Thread-1] INFO c.c.p.i.s.NotificationHandlerSmack - done refreshing connection state.
Connected
12:46:19.537 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected
Filters (ex. '1.0.0.0/255.0.0.0,1234::/16,...' or <enter> for no filter):
press <enter> to disconnect...
session subscriberがISEに接続され、情報を待っている状態になります。
session_subscribe.shで接続し待ち受け状態のときは、
のようにCoreとSessionDirectoryがsubscribeされ、securitygroup_subscribe.shで接続し待ち受け状態の時は、
のようにCoreとTrustSecMetaDataをsubscribeしていることが分かります。
session_subscribe.shで接続している状態で、RadiusSimulator.jar側でsessionを作成します。
[20/04/21] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAuthentication 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccessAccept code=2 id=1 length=87
authenticator=c3ce447454b9c82977fe22fe6b4caf2
Attributes={
UserName=user01
Class=CACS:1001:isegiz/374949896/14
vendorId=9 vsa=[profile-name=Unknown,]
}
まだ認証されただけなので、session subscriber側には何も出力されません(ISEのLive SessionではAuthenticated状態)が、このsessionにAccounting Startを
[20/04/21] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAccountingStart 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccountingResponse code=5 id=1 length=20
authenticator=5d73a7c53bea58657aecd5ffca61742
Attributes={
}
を送信すると、SessionがISEではStarted状態となり、session subscriber側では、
12:46:19.537 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected
Filters (ex. '1.0.0.0/255.0.0.0,1234::/16,...' or <enter> for no filter):
press <enter> to disconnect...
Session={ip=[200.200.200.200], Audit Session Id=1001, UserName=user01, ADNormalisedUserName=user01, MacAddresses=[00:11:22:33:44:55], State=STARTED, EndpointProfile=Unknown, NAS IP=1.150.0.185, RADIUSAVPairs=[ Acct-Session-Id=2001], Posture Status=null, Posture Timestamp=, LastUpdateTime=Tue Apr 21 12:48:16 GMT 2020, Session attributeName=Authorization_Profiles, Session attributeValue=PermitAccess, Providers=[None], EndpointCheckResult=none, IdentitySourceFirstPort=0, IdentitySourcePortStart=0, IdentitySourcePortEnd=0}
のようにRadiusSimulator.jarで作成したsession情報が表示され、"State=STARTED" となっていることが確認できます。
RadiusSimulator.jarで
[20/04/21] v1$ java -cp RadiusSimulator.jar -DUSERNAME=user01 -DPASSWORD=cisco -DCALLING_STATION_ID=00:11:22:33:44:55 -DAUDIT_SESSION_ID=1001 -DACCT_SESSION_ID=2001 -DFRAMED_IP_ADDRESS=200.200.200.200 -DFRAMED_IP_MASK=255.255.255.0 -DNAS_IP_ADDRESS=1.150.0.185 -DRADIUS_SECRET=cisco RadiusAccountingStop 1.150.0.196
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
AccountingResponse code=5 id=1 length=20
authenticator=8ccdf748aef720aeaa9b3a513f884fa9
Attributes={
}
AccountingStopを送信すると、ISEではTerminated状態となり、session subscriber側では、
Session={ip=[200.200.200.200], Audit Session Id=1001, UserName=user01, ADNormalisedUserName=user01, MacAddresses=[00:11:22:33:44:55], State=DISCONNECTED, EndpointProfile=Unknown, NAS IP=1.150.0.185, RADIUSAVPairs=[ Acct-Session-Id=2001], Posture Status=null, Posture Timestamp=, LastUpdateTime=Tue Apr 21 12:48:46 GMT 2020, Session attributeName=Authorization_Profiles, Session attributeValue=PermitAccess, Providers=[None], EndpointCheckResult=none, IdentitySourceFirstPort=0, IdentitySourcePortStart=0, IdentitySourcePortEnd=0}
が追加で表示され、"State=DISCONNECTED" となったことがわかります。
この環境はpxGrid連携の機器との接続がどうもうまく行かないといった時の切り分けにも使えると思います。
pxGrid 2.0に関してはIntroduction to pxGrid 2.0で触れられているようにSDKという形はとらず汎用のライブラリが使用でき、開発言語がJavaやCだけでなくPython, Golangといったものに広がっています。検証環境の構築例は別途投稿予定です。
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます