haproxy_check.py does not validate SSL config correctly
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 6 T. 19 Std.
- Gemergte PRs (30 T.)
- 32
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Lies systemvm/debian/root/health_checks/haproxy_check.py um Zeile 53 herum und vergleiche dessen Parsing mit der gezeigten SSL-Bind-Zeile. Führe /usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg gegen die Konfiguration aus; abgeschlossen ist die Aufgabe, wenn gültige SSL-Optionen die erweiterte Prüfung bestehen und die HAProxy-Validierung weiterhin erfolgreich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100