dlenski / gp-saml-gui

Interactively authenticate to GlobalProtect VPNs that require SAML
GNU General Public License v3.0
293 stars 66 forks source link

Need to pass --csd-wrapper=(wrapper) command-line argument #95

Closed aaronw2 closed 5 months ago

aaronw2 commented 5 months ago

I need to be able to pass --csd-wrapper=(wrapper script) to openconnect in order to connect to my employer's VPN. Can the command line pass this through? It's unclear how to do this. I modified my copy of gp_saml_gui.py to do this and it is working well for me.

It might also be nice to put all the needed parameters in a file (i.e. YAML) and just read the parameters from there instead of requiring a bunch of command-line options.

dlenski commented 5 months ago

Can the command line pass this through? It's unclear how to do this.

Yes, it passes any/all extra arguments to OpenConnect. Just put -- by itself before the extra arguments for OpenConnect so that they're detected as separate.

gp-saml-gui REGULAR ARGUMENTS -- --csd-wrapper=whatever

As the usage shows:

usage: gp-saml-gui [-h] [--no-verify] [-C COOKIES | -K] [-g | -p] [-c CERT]
                      [--key KEY] [-v | -q] [-x | -P | -S] [-u]
                      [--clientos {Mac,Windows,Linux}] [-f EXTRA]
                      [--allow-insecure-crypto] [--user-agent USER_AGENT]
                      server [openconnect_extra [openconnect_extra ...]]