apache / apache/cloudstack

haproxy_check.py does not validate SSL config correctly

未关闭
#12,591 5 条评论 0 个 reaction 已指派 0 人 已被 @weizhouapache 认领 在 GitHub 查看
type:regression
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

When using LB in SSL mode, CloudStack adds the following to the HAProxy config:

`bind x.x.x.x:443 ssl crt /etc/cloudstack/ssl/x_x_x_x-443.pem alpn h2,http/1.1 ssl-min-ver TLSv1.2 no-tls-tickets ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 ciphersuites TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256`

Which is a valid HAProxy configuration, but the health check for the VR is failing at haproxy_check.py advanced check, because of this:

https://github.com/apache/cloudstack/blob/a5b6bc3be620f2b2f14321fd69643cf1bdd7d16c/systemvm/debian/root/health_checks/haproxy_check.py#L53

Maybe it is better to ignore all options after IP:PORT and rely on the haproxy config validation output?
`/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg`

### versions

4.22

### The steps to reproduce the bug

1.
2.
3.
...

### What to do about it?

_No response_

贡献指南

打开贡献指南

调研方向

阅读 systemvm/debian/root/health_checks/haproxy_check.py 第 53 行附近的代码,并将其解析方式与所示的 SSL bind 行进行比较。针对该配置运行 /usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg;当有效的 SSL 选项通过高级检查且 HAProxy 验证继续成功时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
networking
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。