mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 15:54:36 +02:00
Set certificate automatically also in openconnect call, if one is set in gp-okta.conf for the requests-dance
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ 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
|
#cert = path-to-client-cert-as-unencrypted-pem-file.pem
|
||||||
#openconnect_cmd = sudo openconnect
|
#openconnect_cmd = sudo openconnect
|
||||||
openconnect_args = # optional arguments to openconnect, probably you might want to repeat the cert here (if used above) with --certificate=xxx
|
openconnect_args = # optional arguments to openconnect
|
||||||
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
|
||||||
|
|||||||
@@ -490,6 +490,8 @@ def main():
|
|||||||
cmd = conf.get('openconnect_cmd') or 'openconnect'
|
cmd = conf.get('openconnect_cmd') or 'openconnect'
|
||||||
cmd += ' --protocol=gp -u \'{0}\''
|
cmd += ' --protocol=gp -u \'{0}\''
|
||||||
cmd += ' --usergroup {1}'
|
cmd += ' --usergroup {1}'
|
||||||
|
if conf.get('cert'):
|
||||||
|
cmd += ' --certificate=\'{0}\''.format(conf.get('cert'))
|
||||||
cmd += ' --passwd-on-stdin ' + conf.get('openconnect_args', '') + ' \'{2}\''
|
cmd += ' --passwd-on-stdin ' + conf.get('openconnect_args', '') + ' \'{2}\''
|
||||||
cmd = cmd.format(username, cookie_type, conf.get('vpn_url'))
|
cmd = cmd.format(username, cookie_type, conf.get('vpn_url'))
|
||||||
gw = (conf.get('gateway') or '').strip()
|
gw = (conf.get('gateway') or '').strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user