PAN-OS 10.1의 GlobalProtect 쿠키 인증

PAN-OS 10.1의 GlobalProtect 쿠키 인증

4822
Created On 04/27/22 04:15 AM - Last Modified 03/11/25 20:22 PM


Environment


  • 팔로 알토 방화벽
  • PAN-OS 10.1 이상
  • GlobalProtect (GP) 앱
  • 포털/게이트웨이의 쿠키 인증


Resolution


To better improve the user experience while using the GlobalProtect App, you can enable cookie authentication on either the Portal and/or Gateway to reduce the amount of times a user must authenticate. You can complete this by performing the following steps:
  1. GP 포털에서 쿠키 인증 활성화
    1. 네트워크 > GlobalProtect > 포털 > [포털 선택] > 에이전트 > [적절한 구성 선택] > 인증 > 인증 재정의 로 이동합니다.
    2. 생성 및 수락 옵션 모두에 대한 확인란을 선택하세요
    3. 암호화/ 복호화(decryption) 위한 적절한 인증 와 함께 쿠키 수명을 분, 시간 또는 일 단위로 지정하고 OK 두 번 선택합니다.
Snapshot displaying the authentication override dialog box within the Palo Alto Networks Portal GUI
  1. GP Gateway에서 쿠키 인증 활성화
    1. 네트워크 > GlobalProtect > 게이트웨이 > [게이트웨이 선택] > 에이전트 > 클라이언트 설정 > [적절한 구성 선택] > 인증 재정의 로 이동합니다.
    2. 수락 옵션 옆에 있는 확인란을 선택하세요(이미 포털에서 생성되므로 여기서는 필요하지 않습니다)
    3. 1c단계의 동일한 인증 와 함께 쿠키 수명을 분, 시간 또는 일 단위로 지정하고 OK 두 번 선택합니다.
Snapshot displaying the authentication override dialog box within the Palo Alto Networks Gateway GUI
  1. 변경 사항을 커밋하세요
Note: In this example, we set the lifetime to 5 minutes to present the snippet of sslvpn or gpsvc process logs.

Afterwards, we can verify the cookie is successfully generated and used for authentication on the firewall by using the following methods:
  1. 방화벽 GUI에서 모니터 로그를 확인하세요
    1. 모니터 > 로그 > GlobalProtect 로 이동합니다.
    2. 아래 이미지 에 표시된 것과 유사한 필터 매개변수(예: 포털/게이트웨이 이름 및 사용자명)를 사용하여 로그를 쉽게 분리할 수 있습니다.
Snapshot displaying the GlobalProtect logs within the Palo Alto Networks firewall GUI.
  1. GP Portal/Gateway에서 기술 지원 파일 생성
참고: 전체 쿠키 생성 프로세스를 보려면 인증하기 전에 추가 디버그를 활성화해야 합니다(rasmgr, sslvpn[10.1], gpsvc[10.2 이상])
  1. 장치 > 지원 > 기술 지원 파일에서 기술 지원 파일을 다운로드한 후 폴더를 확장하고 var/log/pan 디렉토리로 이동합니다.
  2. 포털에 대한 인증이 성공적으로 완료되면 쿠키가 생성되어 아래에 표시된 것과 유사한 게이트웨이 인증에 사용되는 것을 볼 수 있습니다.
  • appweb3-sslvpn.log ( less mp-log appweb3-sslvpn.log )
포털 로그인 -
debug: pan_gp_lookup_by_sock(pan_gp_cfg.c:1668): found client config!
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4318): panGlobalProtectLogin: pan_generate_portal_user_auth_cookie
debug: pan_gp_rsa_gen_app_auth_cookie(pan_gp_cfg.c:2560): un-encrypted auth cookie localuser2;;Windows;20090e21-2afb-408b-98ce-a3d39b2ac20c;1651024558;192.168.150.100, user=localuser2, remote_addr=192.168.150.100
debug: pan_generate_portal_user_auth_cookie(panPhpGlobalProtect.c:2369): generate portal user auth cookie successful
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4407): loginStatus=1; no pwd_expiry_msg
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4443): panGlobalProtectLogin: set domain=(empty_domain) from EMPTYDOMAIN
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4487): user(localuser2) gen_prelogon_cookie(yes) prelogon_exist(no) gen_cookie(yes) has_prelogon_cookie(no)
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4552): panGlobalProtectLogin: cleanup
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4554): return portal user auth cookie(p6Wu9gz8Vt******lB7ofFNw==)
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4592): login ret string sent to the client is : Success
debug: panGlobalProtectLogin(panPhpGlobalProtect.c:4610): login response sent to the client is : Success
게이트웨이 로그인 -
debug: panSslVpnLogin(panPhpSslVpn.c:2319): panSslVpnLogin: Begin... user=localuser2, empty passwd=no, empty new passwd=yes, input=, hostid=.....
<><><><><><><><><><>
debug: pan_gp_rsa_dec_app_auth_cookie(pan_gp_cfg.c:2699): decrypt auth cookie localuser2;;Windows;20090e21-2afb-408b-98ce-a3d39b2ac20c;1651024558;192.168.150.100
debug: pan_gp_rsa_dec_app_auth_cookie(pan_gp_cfg.c:2761): curtime(1651024558) cookietime(1651024558) end=0
debug: pan_gp_rsa_dec_app_auth_cookie(pan_gp_cfg.c:2771): remote_addr(192.168.150.100) ret_remote_addr(0-6496a8c0ffff0000)
debug: panSslVpnLogin(panPhpSslVpn.c:2807): gateway user auth cookie decrypt successful
debug: panSslVpnLogin(panPhpSslVpn.c:2972): clientaddr=192.168.150.100, cookie ip=192.168.150.100; source ip check enable 0, netmask v4 32 v6 128
<><><><><><><><><><>
debug: panSslVpnLogin(panPhpSslVpn.c:3693): Cookie valid : Getting the framed ip
debug: panSslVpnLogin(panPhpSslVpn.c:3878): User localuser2 authResult = 1 cookie_valid(yes)
debug: panSslVpnLogin(panPhpSslVpn.c:4082): Valid cookie, skipping user authentication
  • gpsvc.log ( mp-log gpsvc.log 적음 )
포털 로그인 -
{"level":"debug","task":"1770-5","time":"2024-07-19T12:34:25.758824212-05:00","message":"NewHttpTask: task for gp-getconfig(POST) request begin..."}
<><><><><><><><><><>
{"level":"debug","task":"1770-5","time":"2024-07-19T12:34:26.807403111-05:00","message":"HandlePortalAuthOverrideCookie: gen-cookie(yes)"}
{"level":"debug","task":"1770-5","time":"2024-07-19T12:34:26.821376872-05:00","message":"GenerateAuthCookie: cleartext localuser2;[domain-name];Windows;d64830af-791e-4f75-b28b-11a0819f46cd;1721410466;192.168.150.100, authCookieStr fCWJT1dBuLZvcsBAgOqwrho60vxT0U+Zv..."}
<><><><><><><><><><>
{"level":"debug","task":"1770-5","time":"2024-07-19T12:34:26.826875761-05:00","message":"RunHttp: task for gp-getconfig is completed"}
게이트웨이 로그인 -
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.788277584-05:00","message":"NewHttpTask: task for gw-login(POST) request begin..."}
<><><><><><><><><><>
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.803233694-05:00","message":"DecryptAuthCookie: auth cookie after decryption: localuser2;[domain-name];Windows;d64830af-791e-4f75-b28b-11a0819f46cd;1721410466;192.168.150.100"}
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.803383847-05:00","message":"AuthWithCookie: set domain=[domain-name] from auth override cookie"}
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.803416778-05:00","message":"AuthWithCookie: set user=localuser2 from auth override cookie"}
<><><><><><><><><><>
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.80681415-05:00","message":"HandleGWAuthOverrideCookie: gen-cookie(no)"}
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.807099047-05:00","message":"gwLogin: PAN_AUTH_SUCCESS"}
<><><><><><><><><><>
{"level":"debug","task":"1772-19","time":"2024-07-19T12:34:30.809681398-05:00","message":"RunHttp: task for gw-login is completed"}
  1. rasmgr.log 로 이동하면 아래에 표시된 로그와 유사하게 인증을 위해 제시된 쿠키가 표시됩니다.
rasmgr.log ( less mp-log rasmgr.log )
debug: sslvpn_set_pub_ip(src/rasmgr_sslvpn.c:1499): GP Client conn type is ipv4 (0), pub_ip 192.168.150.100, pub_ip6 0:0:0:0:0:0:0:0, rep_pub_ip 192.168.150.100, rep_pub_ip6 0:0:0:0:0:0:0:0
debug: _print_client_requests(src/rasmgr_sslvpn.c:157): (login) gw login (1651024558722, 2022-04-26 18:55:58.722, 192.168.150.100); getconfig (0, , ::); sslvpnconnrect (0, , ::)
new cookie:  ******
rasmgr_sslvpn_client_register space globalprotect-gw-N domain  user localuser2 computer 6347E0B5-3379-4 result 0


Additional Information


포털 또는 게이트웨이의 쿠키 인증



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u0000004OLHCA2&lang=ko&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language