diff options
author | goodNETnick <33053932+goodNETnick@users.noreply.github.com> | 2022-04-01 12:09:56 +1000 |
---|---|---|
committer | goodNETnick <pknet@ya.ru> | 2022-04-09 01:33:25 -0400 |
commit | 1da9cc02d7c83898c267070618e2cc91e16eb1cf (patch) | |
tree | bfe672212ef22b525420428d3f36ff02d6cd5aa0 /smoketest/scripts/cli/test_vpn_openconnect.py | |
parent | aa5b35b68c1170bfd0b9661bafa72bb10fe6ca95 (diff) | |
parent | 53e20097d227ebf4bdb4dc6c85427ec9c5ec3982 (diff) | |
download | vyos-1x-1da9cc02d7c83898c267070618e2cc91e16eb1cf.tar.gz vyos-1x-1da9cc02d7c83898c267070618e2cc91e16eb1cf.zip |
ocserv: T4231: Added OTP support for Openconnect 2FA
Diffstat (limited to 'smoketest/scripts/cli/test_vpn_openconnect.py')
-rwxr-xr-x | smoketest/scripts/cli/test_vpn_openconnect.py | 5 |
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']) |