diff --git a/README.md b/README.md index aa94778..ff8f3f1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Specify the GlobalProtect server URL (portal or gateway) and optional arguments. This script will pop up a [GTK WebKit2 WebView](https://webkitgtk.org/) window. After you succesfully complete the SAML login via web forms, the script will output -`HOST`, `USER`, and `COOKIE` variables in a form that can be used by +`GP_HOST`, `GP_USER`, and `GP_COOKIE` variables in a form that can be used by [OpenConnect](http://www.infradead.org/openconnect/juniper.html) (similar to the output of `openconnect --authenticate`): @@ -54,12 +54,12 @@ SAML response converted to OpenConnect command line invocation: echo 'blahblahblah' | openconnect --protocol=gp --user='foo12345@corp.company.com' --usergroup=prelogin-cookie:gateway --passwd-on-stdin vpn.company.com -$ echo $HOST; echo $USER; echo $COOKIE +$ echo $GP_HOST; echo $GP_USER; echo $GP_COOKIE https://vpn.company.com/gateway:prelogin-cookie foo12345@corp.company.com blahblahblah' -$ echo "$COOKIE" | openconnect --protocol=gp -u "$USER" --passwd-on-stdin "$HOST" +$ echo "$GP_COOKIE" | openconnect --protocol=gp -u "$GP_USER" --passwd-on-stdin "$GP_HOST" ``` TODO diff --git a/gp-saml-gui.py b/gp-saml-gui.py index 8bcf6f5..12edc4b 100755 --- a/gp-saml-gui.py +++ b/gp-saml-gui.py @@ -245,7 +245,7 @@ def parse_args(args = None): quote(un), quote(server), quote(fullpath), quote(cn), quote(cv)), file=stderr) varvals = { - 'HOST': quote('https://%s/%s:%s' % (server, shortpath, cn)), - 'USER': quote(un), 'COOKIE': quote(cv), + 'GP_HOST': quote('https://%s/%s:%s' % (server, shortpath, cn)), + 'GP_USER': quote(un), 'GP_COOKIE': quote(cv), } print('\n'.join('%s=%s' % pair for pair in varvals.items()))