]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix GP fake server parameters so that gateway-interface 2FA is actually tested
authorDaniel Lenski <dlenski@gmail.com>
Mon, 7 Mar 2022 18:31:13 +0000 (10:31 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Tue, 8 Mar 2022 20:13:26 +0000 (12:13 -0800)
To match the actually-parsed parameters in tests/fake-gp-server.py, change
'gateway_2fa' → 'gw_2fa'.

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

index 1e6b6ead613e77e8f04a340734c3183fe45e7c62..5d26a3419de7022fb566e293ff2d1c4b072b8a0b 100755 (executable)
@@ -66,7 +66,7 @@ if_path2name = {'global-protect': 'portal', 'ssl-vpn': 'gateway'}
 # Get parameters into the initial session setup in order to configure:
 #   gateways: list of gateway names for portal to offer (all will point to same HOST:PORT as portal)
 #   portal_2fa: if set, require challenge-based 2FA to complete /global-protect/getconfig.esp request
-#   gateway_2fa: if set, require challenge-based 2FA to complete /ssl-vpn/login.esp request
+#   gw_2fa: if set, require challenge-based 2FA to complete /ssl-vpn/login.esp request
 #   portal_saml: set to 'portal-userauthcookie' or 'prelogin-cookie' to require SAML on portal (and
 #                expect the named cookie to be provided to signal SAML completion)
 #   gateway_saml: likewise, set to require SAML on gateway
index 2537321f441f2c13416cff1467c2171e1361f547..babc5ae3e318c9b1974031fc079ce9a5d517dc52 100755 (executable)
@@ -54,7 +54,7 @@ echo -n "Authenticating with username/password via gateway... "
 echo ok
 
 echo -n "Authenticating with username/password/token via portal, then using portal-userauthcookie to continue through gateway... "
-( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT --protocol=gp -q "$ADDRESS:443/global-protect/testconfig.esp?portal_2fa=1&gateway_2fa=1&portal_cookie=portal-userauthcookie" -u test --token-mode=totp --token-secret=FAKE $FINGERPRINT --cookieonly >/dev/null 2>&1) ||
+( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT --protocol=gp -q "$ADDRESS:443/global-protect/testconfig.esp?portal_2fa=1&gw_2fa=1&portal_cookie=portal-userauthcookie" -u test --token-mode=totp --token-secret=FAKE $FINGERPRINT --cookieonly >/dev/null 2>&1) ||
     fail $PID "Could not receive cookie from fake GlobalProtect server"
 
 echo ok