fix: tests intégration matrix — procps-ng, varnish h2, hitch ALPN, pgrep→ps
- Ajout de procps-ng dans les 4 Dockerfiles runtime (ps/pgrep disponibles) - Remplacement de pgrep par ps -C dans tous les run-tests.sh - Correction entrypoint nginx-varnish : pgrep nginx → cat nginx.pid (exit 127) - Activation HTTP/2 dans Varnish : ajout de -p feature=+http2 dans les entrypoints nginx-varnish et hitch-varnish - Restauration ALPN h2,http/1.1 dans hitch.conf (varnish supporte maintenant h2) - Correction healthcheck hitch-varnish : curl sans --http1.1 (h2 fonctionnel) - Correction requêtes phase_verify : http_logs_raw → http_logs, colonnes correctes - Correction writer clickhouse.go : noms JSON alignés avec la MV (ip_meta_*, tls_sni…) - Fix toStartOfSecond(DateTime) → toStartOfSecond(toDateTime64(col, 3)) - Retrait du SKIP el8/nginx-varnish (varnish s'installe bien sur AlmaLinux 8) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -23,21 +23,21 @@ stack_verify_extra() {
|
||||
# Vérifie que hitch est bien en cours d'exécution
|
||||
local hitch_pid
|
||||
hitch_pid=$(docker compose -f "$COMPOSE_FILE" exec -T platform \
|
||||
pgrep -x hitch 2>/dev/null | head -1 || echo "")
|
||||
ps -C hitch -o pid= 2>/dev/null | head -1 || echo "")
|
||||
[ -n "$hitch_pid" ] && pass "Processus hitch actif (PID $hitch_pid)" \
|
||||
|| fail "Processus hitch introuvable"
|
||||
|
||||
# Vérifie Varnish
|
||||
local varnish_pid
|
||||
varnish_pid=$(docker compose -f "$COMPOSE_FILE" exec -T platform \
|
||||
pgrep -x varnishd 2>/dev/null | head -1 || echo "")
|
||||
ps -C varnishd -o pid= 2>/dev/null | head -1 || echo "")
|
||||
[ -n "$varnish_pid" ] && pass "Processus varnishd actif (PID $varnish_pid)" \
|
||||
|| fail "Processus varnishd introuvable"
|
||||
|
||||
# Vérifie que ja4ebpf tourne
|
||||
local ja4_pid
|
||||
ja4_pid=$(docker compose -f "$COMPOSE_FILE" exec -T platform \
|
||||
pgrep -x ja4ebpf 2>/dev/null | head -1 || echo "")
|
||||
ps -C ja4ebpf -o pid= 2>/dev/null | head -1 || echo "")
|
||||
[ -n "$ja4_pid" ] && pass "ja4ebpf actif (PID $ja4_pid)" \
|
||||
|| fail "ja4ebpf introuvable"
|
||||
|
||||
@ -61,21 +61,20 @@ stack_verify_extra() {
|
||||
warn "X-Client-IP absent — PROXY protocol peut-être désactivé dans Varnish"
|
||||
fi
|
||||
|
||||
# Vérifie ALPN h2 côté hitch (hitch supporte HTTP/2 via ALPN)
|
||||
# Vérifie ALPN h2 côté hitch (varnish supporte h2 via -p feature=+http2)
|
||||
local http_ver
|
||||
http_ver=$(docker compose -f "$COMPOSE_FILE" exec -T platform \
|
||||
curl -sk --http2 -w "%{http_version}" -o /dev/null https://localhost/ 2>/dev/null || echo "")
|
||||
if [ "$http_ver" = "2" ]; then
|
||||
pass "HTTP/2 ALPN négocié par hitch (h2)"
|
||||
pass "HTTP/2 ALPN négocié par hitch→Varnish (h2)"
|
||||
else
|
||||
warn "HTTP/2 non négocié (version: '$http_ver') — ALPN hitch peut nécessiter Varnish ≥ 6.0"
|
||||
warn "HTTP/2 non négocié (version: '$http_ver') — vérifier -p feature=+http2"
|
||||
fi
|
||||
|
||||
# Vérification clé : dans la stack hitch+varnish, les uprobes sont sur hitch.
|
||||
# ja4ebpf doit avoir capturé des requêtes depuis le processus hitch.
|
||||
# On vérifie que des lignes avec method != '' existent (uprobe SSL_read actif).
|
||||
local l7_from_hitch
|
||||
l7_from_hitch=$(ch_query "SELECT count() FROM ja4_logs.http_logs_raw WHERE method != ''")
|
||||
l7_from_hitch=$(ch_query "SELECT count() FROM ja4_logs.http_logs WHERE method != ''" || echo "0")
|
||||
if [ "${l7_from_hitch:-0}" -gt 0 ] 2>/dev/null; then
|
||||
pass "L7 capturé via uprobe hitch : $l7_from_hitch requêtes HTTP"
|
||||
else
|
||||
@ -85,12 +84,9 @@ stack_verify_extra() {
|
||||
fi
|
||||
|
||||
# Vérifie que le fingerprint JA4 est cohérent avec la config TLS de hitch
|
||||
# (TLSv1.2 + TLSv1.3, suites ECDHE, ALPN h2+http/1.1)
|
||||
local ja4_sample
|
||||
ja4_sample=$(ch_query "SELECT ja4 FROM ja4_logs.http_logs_raw WHERE ja4 != '' LIMIT 1" 2>/dev/null || echo "")
|
||||
ja4_sample=$(ch_query "SELECT ja4 FROM ja4_logs.http_logs WHERE ja4 != '' LIMIT 1" || echo "")
|
||||
if [ -n "$ja4_sample" ]; then
|
||||
# JA4 format : t{ver}{sni}{cc}{ec}_{hash}_{hash}
|
||||
# Avec TLS 1.3 négocié via hitch → doit commencer par tt13
|
||||
if echo "$ja4_sample" | grep -qE "^tt1[23]"; then
|
||||
pass "JA4 cohérent avec config hitch TLS 1.2/1.3 : $ja4_sample"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user