summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-09 13:42:17 +0200
committerGitHub <noreply@github.com>2022-04-09 13:42:17 +0200
commit139ab816466053d73cb8a68fe4af3de39d98d306 (patch)
tree3c4d301633c2307e677b4266dfe1ca5094717b76 /smoketest/scripts/cli
parentf9ebccd2ef0b144617b5f4acf79d37502114d34a (diff)
parent1da9cc02d7c83898c267070618e2cc91e16eb1cf (diff)
downloadvyos-1x-139ab816466053d73cb8a68fe4af3de39d98d306.tar.gz
vyos-1x-139ab816466053d73cb8a68fe4af3de39d98d306.zip
Merge pull request #1242 from goodNETnick/ocserv_local_otp
ocserv: T4231: Added OTP support for Openconnect 2FA
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpn_openconnect.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_vpn_openconnect.py b/smoketest/scripts/cli/test_vpn_openconnect.py
index b0e859b5c..1f2c36f0d 100755
--- a/smoketest/scripts/cli/test_vpn_openconnect.py
+++ b/smoketest/scripts/cli/test_vpn_openconnect.py
@@ -37,6 +37,8 @@ class TestVpnOpenconnect(VyOSUnitTestSHIM.TestCase):
def test_vpn(self):
user = 'vyos_user'
password = 'vyos_pass'
+ otp = '37500000026900000000200000000000'
+
self.cli_delete(pki_path)
self.cli_delete(base_path)
@@ -45,7 +47,8 @@ class TestVpnOpenconnect(VyOSUnitTestSHIM.TestCase):
self.cli_set(pki_path + ['certificate', 'openconnect', 'private', 'key', key_data])
self.cli_set(base_path + ["authentication", "local-users", "username", user, "password", password])
- self.cli_set(base_path + ["authentication", "mode", "local"])
+ self.cli_set(base_path + ["authentication", "local-users", "username", user, "otp", "key", otp])
+ self.cli_set(base_path + ["authentication", "mode", "local", "password-otp"])
self.cli_set(base_path + ["network-settings", "client-ip-settings", "subnet", "192.0.2.0/24"])
self.cli_set(base_path + ["ssl", "ca-certificate", 'openconnect'])
self.cli_set(base_path + ["ssl", "certificate", 'openconnect'])