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 摘要。