]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Assume that a 'portal-*cookie' will allow us to bypass gateway SAML
authorDaniel Lenski <dlenski@gmail.com>
Fri, 28 May 2021 19:42:57 +0000 (12:42 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 24 Jun 2021 18:17:53 +0000 (11:17 -0700)
commit2c8960f956fd7d37dee49b25062edab7f8c824e4
treee553ca7e68d62668e70dad9b3c9da2d0a2d51a9a
parentaa77100806a36944693a8b0c4849bdffc2e96def
Assume that a 'portal-*cookie' will allow us to bypass gateway SAML

For many GlobalProtect VPNs with SAML, the 'portal-userauthcookie' appears
to be *the* mechanism by which gateway authentication can be bypassed once
portal authentication is complete.

Unfortunately, there are exceptions which will require a more complex
resolution involved a re-entrant SAML flow
(https://gitlab.com/openconnect/openconnect/-/issues/147#note_587163143),
but this patch will at least not make them worse.

This can work in many cases…

- When the user's password is only usable one time (already working as of 008aefd7),
- When the portal requires SAML but the gateway doesn't (already working in 008aefd7),
- When the gateway requires SAML even though the portal doesn't (fixed here)

Additionally, this patch adds tests (tests/{fake-gp-server.py,gp-auth-and-config}) of
OpenConnect's ability to complete the following SAML flows:

- (SAML to portal after acquiring prelogin-cookie externally) → (complete gateway login
  using portal-userauthcookie)
- (SAML to gateway after acquiring prelogin-cookie externally)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
auth-globalprotect.c
tests/fake-gp-server.py
tests/gp-auth-and-config