apache / apache/cloudstack

haproxy_check.py does not validate SSL config correctly

Aperta
#12,591 5 commenti 0 reazioni 0 assegnatari Rivendicata da @weizhouapache Vedi su GitHub
type:regression
Lingua principale
Java
Stelle
3.1k
Fork
1.4k
Merge medio
6g 19h
PR unite (30g)
32

Descrizione

### 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_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Leggi systemvm/debian/root/health_checks/haproxy_check.py intorno alla riga 53 e confronta il relativo parsing con la riga di bind SSL mostrata. Esegui /usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg sulla configurazione; il lavoro è completato quando le opzioni SSL valide superano il controllo avanzato e la convalida di HAProxy continua ad avere esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
networking
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.