summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorAlex W <embezzle.dev@proton.me>2024-04-15 18:23:05 +0100
committerAlex W <embezzle.dev@proton.me>2024-04-15 19:22:05 +0100
commitaafe22d08bb38a579dd5075fd27a1b88beeca791 (patch)
tree13c3b82e730e181b89e947a6b7e449b5674578ab /smoketest/scripts
parentf3d45223da40ea615d8b4ea73ec902462e3cebb4 (diff)
downloadvyos-1x-aafe22d08bb38a579dd5075fd27a1b88beeca791.tar.gz
vyos-1x-aafe22d08bb38a579dd5075fd27a1b88beeca791.zip
T6242: load-balancing reverse-proxy: Ability for ssl backends to not verify server certificates
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_load-balancing_reverse-proxy.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
index 97304da8b..d21fc762b 100755
--- a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
+++ b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
@@ -280,6 +280,24 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'ca-certificate', 'smoketest'])
self.cli_commit()
+ def test_04_lb_reverse_proxy_backend_ssl_no_verify(self):
+ # Setup base
+ self.configure_pki()
+ self.base_config()
+
+ # Set no-verify option
+ self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'no-verify'])
+ self.cli_commit()
+
+ # Test no-verify option
+ config = read_file(HAPROXY_CONF)
+ self.assertIn('server bk-01 192.0.2.11:9090 send-proxy ssl verify none', config)
+
+ # Test setting ca-certificate alongside no-verify option fails, to test config validation
+ self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'ca-certificate', 'smoketest'])
+ with self.assertRaises(ConfigSessionError) as e:
+ self.cli_commit()
+
if __name__ == '__main__':
unittest.main(verbosity=2)