From: Daniel Lenski Date: Mon, 7 Mar 2022 18:31:13 +0000 (-0800) Subject: Fix GP fake server parameters so that gateway-interface 2FA is actually tested X-Git-Tag: v9.00~79 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1eb9338569615a6a2224ed60dbc4c52990f46f9b;p=users%2Fdwmw2%2Fopenconnect.git Fix GP fake server parameters so that gateway-interface 2FA is actually tested To match the actually-parsed parameters in tests/fake-gp-server.py, change 'gateway_2fa' → 'gw_2fa'. Signed-off-by: Daniel Lenski --- diff --git a/tests/fake-gp-server.py b/tests/fake-gp-server.py index 1e6b6ead..5d26a341 100755 --- a/tests/fake-gp-server.py +++ b/tests/fake-gp-server.py @@ -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 diff --git a/tests/gp-auth-and-config b/tests/gp-auth-and-config index 2537321f..babc5ae3 100755 --- a/tests/gp-auth-and-config +++ b/tests/gp-auth-and-config @@ -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