mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 15:54:36 +02:00
Implement config option cert to use a client certificate.
This fixes Issue https://github.com/arthepsy/pan-globalprotect-okta/issues/17 raised by @lvml. (Note that if you need to specify a client certificate for the `vpn_url`, then most probably you will also need to give the same certificate to the final `openconnect` call with `--certificate` via the `openconnect_args`)
This commit is contained in:
+2
-1
@@ -8,8 +8,9 @@ sms.okta = 0
|
|||||||
totp.okta = ABCDEFGHIJKLMNOP
|
totp.okta = ABCDEFGHIJKLMNOP
|
||||||
totp.google = ABCDEFGHIJKLMNOP
|
totp.google = ABCDEFGHIJKLMNOP
|
||||||
gateway = Manual ny1-gw.example.com
|
gateway = Manual ny1-gw.example.com
|
||||||
|
#cert = path-to-client-cert-as-unencrypted-pem-file.pem
|
||||||
#openconnect_cmd = sudo openconnect
|
#openconnect_cmd = sudo openconnect
|
||||||
openconnect_args = # optional arguments to openconnect
|
openconnect_args = # optional arguments to openconnect, probably you might want to repeat the cert here (if used above) with --certificate=xxx
|
||||||
execute = 0 # execute openconnect command
|
execute = 0 # execute openconnect command
|
||||||
another_dance = 0 # second round of authentication required
|
another_dance = 0 # second round of authentication required
|
||||||
bug.nl = 0 # newline work-around for openconnect
|
bug.nl = 0 # newline work-around for openconnect
|
||||||
|
|||||||
@@ -446,6 +446,9 @@ def main():
|
|||||||
conf = load_conf(sys.argv[1])
|
conf = load_conf(sys.argv[1])
|
||||||
|
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
|
if conf.get('cert'):
|
||||||
|
s.cert = conf.get('cert')
|
||||||
|
|
||||||
s.headers['User-Agent'] = 'PAN GlobalProtect'
|
s.headers['User-Agent'] = 'PAN GlobalProtect'
|
||||||
saml_xml = paloalto_prelogin(conf, s)
|
saml_xml = paloalto_prelogin(conf, s)
|
||||||
redirect_url = okta_saml(conf, s, saml_xml)
|
redirect_url = okta_saml(conf, s, saml_xml)
|
||||||
|
|||||||
Reference in New Issue
Block a user