forked from mtusi2026/mtusi2026lab7
fix: address auth-hardening verify findings
Drop the body-limit rule from HAProxy (user decision 2026-11-18): the
replica middleware answers 400 with X-Instance-Id, tests require the
header again. Widen the failure_checks selection in the trust matrix,
name 13fdd18 in the evidence header, document Valkey LRU eviction of
login counters and the allowlist as trusted X-Forwarded-For senders,
check waited_ms of KDF budget rejections in the queue scenario.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,11 +77,12 @@ LOGIN_LOCAL_KEYS_MAX = 100_000
|
||||
|
||||
# предел размера тела запроса вне загрузки вложения (change auth-hardening,
|
||||
# design, решение 8): больше наибольшего валидного тела контракта (~48,4
|
||||
# KB — сообщение из 4000 экранированных пар и 10 вложений). То же число — в
|
||||
# infra/haproxy/haproxy.cfg (frontend entry)
|
||||
# KB — сообщение из 4000 экранированных пар и 10 вложений). Отклоняет только
|
||||
# реплика (middlewares/body_limit.py): в LB предела нет — решение пользователя
|
||||
# 2026-11-18
|
||||
REQUEST_BODY_MAX_BYTES = 65536
|
||||
# путь загрузки вложения: на нём свой предел (10 MiB, сервис); то же
|
||||
# выражение — у set-timeout и предела тела в haproxy.cfg
|
||||
# выражение — у set-timeout в haproxy.cfg
|
||||
UPLOAD_PATH_PATTERN = r"^/api/v1/chats/[^/]+/attachments$"
|
||||
|
||||
# сессия
|
||||
|
||||
Reference in New Issue
Block a user