feat: require mTLS with certificate login for RabbitMQ and split relay and worker rights

Broker accepts only TLS 1.3 with a client certificate checked against the
stand CRL; login is EXTERNAL by certificate DNS SAN, broker passwords are
gone. Relay may declare its queue and publish, worker may only consume.
Definitions and TLS material checks come from infra/rabbitmq/start.sh;
temporary stands, CI, bench and the fault hook use the same mTLS identities.
Adds make broker_mtls_check [REPORT=1] and drops the rollback broker compose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 21:34:47 +03:00
co-authored by Claude Opus 5.5
parent 2474e4cb28
commit 8236027e92
52 changed files with 3888 additions and 243 deletions
+6
View File
@@ -135,6 +135,12 @@ ATTACHMENT_JOB_SCHEMA_VERSION = 1
# очередь заданий — `<имя базы>.attachment.process.v1`: прогон на временной
# базе не смешивается с рабочим, как объекты S3 и ключи кэша
ATTACHMENT_QUEUE_SUFFIX = "attachment.process.v1"
# секунды на закрытие TLS соединения с брокером (close_notify): без ответа
# брокера транспорт обрывается. asyncio по умолчанию ждёт 30 с, и закрытие
# клиента при замороженном брокере не укладывалось в срок остановки worker
# (окно закрытия клиентов 0,5 с; change messaging-telemetry-mtls, «Уточнения
# apply», п. 13)
BROKER_TLS_SHUTDOWN_TIMEOUT_SECONDS = 0.25
# thumbnail контракта: вписан в квадрат, JPEG
THUMBNAIL_MAX_SIDE = 256
THUMBNAIL_JPEG_QUALITY = 85