forked from mtusi2026/mtusi2026lab7
feat: harden authentication (Argon2id by measurement, login limits, body limit)
Apply auth-hardening up to the bench_login label: Argon2id parameters from [auth] chosen by driver.py argon2-params (m=64 MiB, t=2, p=1), rehash on login, per-process KDF budget with 429, shared login failure limit in Valkey with a local fallback, X-Forwarded-For from HAProxy, 64 KiB body limit (400) in LB and middleware, bench login profile, tests, threat model and trust matrix rows. Hypotheses H1-H4 are committed here before the baseline label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,6 +222,19 @@ pass». Модуль `attachment_cleanup_service`: «Finished staging cleanup pa
|
||||
`attachments_count` в «Created message» и «Rejected message
|
||||
attachments». Поле `filename` у записей — место вызова в коде
|
||||
(`CallsiteParameterAdder`), а не имя файла вложения.
|
||||
- С change `auth-hardening` (design, решение 9; спек `service-logging`, «Журнал защиты
|
||||
входа»): модуль `session_service` — `warning` «Login rate limited»
|
||||
(`retry_after_seconds`), «Password hashing is busy» (`operation=login`, `waited_ms`),
|
||||
`info` «Rehashed password» (`user_id`, `updated`, `previous_memory_kib` /
|
||||
`previous_time_cost` / `previous_parallelism` и текущие `memory_kib` / `time_cost` /
|
||||
`parallelism` — не хэши), «Skipped password rehash» (`reason=busy`); `user_service` —
|
||||
«Password hashing is busy» (`operation=register`); `login_limit` — `warning` «Login limiter
|
||||
uses process counters» / `info` «… shared counters» (по одной на переход), `warning` «Login
|
||||
limiter process counters are full»; `api_dependencies` — `warning` «Client address header is
|
||||
missing» (`header_present`, без значения). «Started API» — ещё девять полей `auth_*`. Ни в
|
||||
одной записи нет username, адреса клиента и его хэша, ключей счётчиков; под потоком отказов
|
||||
записи 429 — по одной на запрос, без прореживания. Проверка — `driver.py auth-storage`
|
||||
(журнал за время команды без credentials).
|
||||
- Stack trace — только в лог, никогда в ответ.
|
||||
|
||||
## Журнал уборщика (с лабы 4)
|
||||
|
||||
Reference in New Issue
Block a user