X-Git-Url: https://code.communitydata.science/nu-vpn-proxy.git/blobdiff_plain/37bfe261834431fb27f24bdfdcf6933e8c0f8933..d8929a47d1b2c6ed683bc48849b258b79762a5e4:/README.md diff --git a/README.md b/README.md index aa94778..1bc0d20 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://api.travis-ci.org/dlenski/gp-saml-gui.png)](https://travis-ci.org/dlenski/gp-saml-gui) + gp-saml-gui =========== @@ -32,16 +34,19 @@ $ pip install requests How to use ========== -Specify the GlobalProtect server URL (portal or gateway) and optional arguments. +Specify the GlobalProtect server URL (portal or gateway) and optional +arguments, such as `--clientos=Windows` (because many GlobalProtect +servers don't require SAML login, but apparently omit it in their configuration +for OSes other than Windows). 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 +`HOST`, `USER`, `COOKIE`, and `OS` variables in a form that can be used by [OpenConnect](http://www.infradead.org/openconnect/juniper.html) (similar to the output of `openconnect --authenticate`): ```sh -$ eval $( gp-saml-gui.py -v vpn.company.com ) +$ eval $( gp-saml-gui.py --clientos=Windows vpn.company.com ) Got SAML POST content, opening browser... Finished loading about:blank... Finished loading https://company.okta.com/app/panw_globalprotect/deadbeefFOOBARba1234/sso/saml... @@ -52,14 +57,15 @@ Got SAML relevant headers, done: {'prelogin-cookie': 'blahblahblah', 'saml-usern 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 + openconnect --protocol=gp --user='foo12345@corp.company.com' --os=win --usergroup=prelogin-cookie:gateway --passwd-on-stdin vpn.company.com -$ echo $HOST; echo $USER; echo $COOKIE +$ echo $HOST; echo $USER; echo $COOKIE; echo $OS https://vpn.company.com/gateway:prelogin-cookie foo12345@corp.company.com -blahblahblah' +blahblahblah +win -$ echo "$COOKIE" | openconnect --protocol=gp -u "$USER" --passwd-on-stdin "$HOST" +$ echo "$COOKIE" | openconnect --protocol=gp -u "$USER" --os="$OS" --passwd-on-stdin "$HOST" ``` TODO