diff options
author | Alex W <embezzle.dev@proton.me> | 2024-04-15 18:23:05 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-16 15:08:11 +0000 |
commit | deb92e4661106283d7951570fc9ab243e74bccd9 (patch) | |
tree | 9e75b43672d9852c30064f5ea4f0a19784bcb201 /src/conf_mode/load-balancing_reverse-proxy.py | |
parent | d8bca084a1f050a52bef46f5e1b589cbf89ce54d (diff) | |
download | vyos-1x-deb92e4661106283d7951570fc9ab243e74bccd9.tar.gz vyos-1x-deb92e4661106283d7951570fc9ab243e74bccd9.zip |
T6242: load-balancing reverse-proxy: Ability for ssl backends to not verify server certificates
(cherry picked from commit aafe22d08bb38a579dd5075fd27a1b88beeca791)
Diffstat (limited to 'src/conf_mode/load-balancing_reverse-proxy.py')
-rwxr-xr-x | src/conf_mode/load-balancing_reverse-proxy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/load-balancing_reverse-proxy.py b/src/conf_mode/load-balancing_reverse-proxy.py index 694a4e1ea..9f895c4e2 100755 --- a/src/conf_mode/load-balancing_reverse-proxy.py +++ b/src/conf_mode/load-balancing_reverse-proxy.py @@ -84,6 +84,10 @@ def verify(lb): if {'send_proxy', 'send_proxy_v2'} <= set(bk_server_conf): raise ConfigError(f'Cannot use both "send-proxy" and "send-proxy-v2" for server "{bk_server}"') + if 'ssl' in back_config: + if {'no_verify', 'ca_certificate'} <= set(back_config['ssl']): + raise ConfigError(f'backend {back} cannot have both ssl options no-verify and ca-certificate set!') + for front, front_config in lb['service'].items(): for cert in dict_search('ssl.certificate', front_config) or []: verify_pki_certificate(lb, cert) |