deploy: require redis auth (--requirepass) across all consumers

Redis without a password was the root cause of the security incident
(cron miner via unauthenticated replication RCE, see
.forcc/deploy/SESSION2-FINDINGS.md). Loopback binding alone doesn't
protect against a compromised container inside the same compose
network, so wire REDIS_PASSWORD as a required secret everywhere redis
is used: backend/worker/worker-transcriber(-gpu), redis-exporter,
livekit and egress (via rendered templates). docker compose now
refuses to start without it instead of silently running unauthenticated.
This commit is contained in:
2026-07-25 22:59:34 +03:00
parent d593add0f3
commit 5e42f6d11b
9 changed files with 77 additions and 15 deletions

View File

@@ -0,0 +1,37 @@
# Конфиг LiveKit Egress — запись per-track аудио для последующей
# транскрибации (см. ADR-002).
# Проверено по официальной документации livekit/egress
# (github.com/livekit/egress: README.md, _autodocs/api-reference-config.md,
# _autodocs/deployment-and-operations.md) — 2026-07-17.
#
# api_key/api_secret/ws_url НЕ хранятся в этом файле: egress поддерживает
# их как обязательные переменные окружения LIVEKIT_API_KEY/
# LIVEKIT_API_SECRET/LIVEKIT_WS_URL (см. сервис egress в docker-compose.yml)
# — тот же подход, что и в deploy/livekit/livekit.yaml (LIVEKIT_KEYS),
# секреты только через .env.
log_level: info
# Обязателен для egress (координация запущенных записей, см. комментарий
# в deploy/livekit/livekit.yaml). password подставляется рендером
# (deploy/render-templates.sh) из REDIS_PASSWORD в .env — redis в
# docker-compose.yml запускается с --requirepass.
redis:
address: redis:6379
password: ${REDIS_PASSWORD}
# HTTP-эндпоинт /healthz для healthcheck контейнера.
health_port: 8081
# Метрики Prometheus (Ф7).
prometheus_port: 8888
# ws_url внутри docker-сети (ws://livekit:7880) — не TLS, поэтому строгая
# проверка сертификата не нужна; insecure=true допустим только для
# внутреннего dev/self-hosted контура, не для публичного wss://.
insecure: true
# Предохранитель от зависшей записи (обрыв room_finished/egress_ended):
# файловый egress принудительно завершается через 6 часов.
session_limits:
file_output_max_duration: 6h