4 This is a helper script to allow you to interactively login to a GlobalProtect VPN
5 that uses SAML authentication.
7 Interactive login is, unfortunately, sometimes a necessary alternative to automated
8 login via scripts such as
9 [zdave/openconnect-gp-okta](https://github.com/zdave/openconnect-gp-okta).
14 Specify the GlobalProtect server URL (portal or gateway) and optional arguments.
16 This script will pop up a [GTK WebKit2 WebView](https://webkitgtk.org/) window.
17 After you succesfully complete the SAML login via web forms, the script will output
18 `HOST`, `USER`, and `COOKIE` variables in a form that can be used by
19 [OpenConnect](http://www.infradead.org/openconnect/juniper.html)
20 (similar to the output of `openconnect --authenticate`):
23 $ eval $( gp-saml-gui.py -v vpn.company.com )
24 Got SAML POST content, opening browser...
25 Finished loading about:blank...
26 Finished loading https://company.okta.com/app/panw_globalprotect/deadbeefFOOBARba1234/sso/saml...
27 Finished loading https://company.okta.com/login/sessionCookieRedirect...
28 Finished loading https://vpn.qorvo.com/SAML20/SP/ACS...
29 Got SAML relevant headers, done: {'prelogin-cookie': 'blahblahblah', 'saml-username': 'foo12345@corp.company.com', 'saml-slo': 'no', 'saml-auth-status': '1'}
31 SAML response converted to OpenConnect command line invocation:
34 openconnect --protocol=gp --user='foo12345@corp.company.com' --usergroup=prelogin-cookie:gateway --passwd-on-stdin vpn.company.com
36 $ echo $HOST; echo $USER; echo $COOKIE
37 https://vpn.company.com/gateway:prelogin-cookie
38 foo12345@corp.company.com
41 $ echo "$COOKIE" | openconnect --protocol=gp -u "$USER" --passwd-on-stdin "$HOST"
48 * Explain dependencies