Files
mtusi2026lab5/evidence/auth/passwords-and-tokens.md
T
ricoromaandClaude Opus 5.5 1373e7ddec docs: record exclusion evidence and move one-off probes into the driver
Adds worker-memory, freeze-sessions and freeze-lb driver commands, retakes
the evidence they produce, and fills the report header. src/ and bench/
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:53:53 +03:00

20 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Хранение паролей и токенов
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 auth-storage`
- Дата: 2026-11-01, 10:33:45–10:33:46 UTC; код выхода 0
- Commit: `9639aa1` (ветка `feat/track1-queue-overload`), код `src/` и `bench/` тот же, что на `5ee3257`; на рабочем дереве изменён только `.claude/skills/run-mtusi-messenger/driver.py`, команда `auth-storage` не менялась
- Стенд: проект compose `mtusi-lab5`, две реплики за HAProxy, собран `make run_docker` из `HEAD`; пользователи синтетические, пароль и токен только в памяти драйвера, в вывод не попадают
- Спеки: `users`, «Хэш в БД», `sessions`, «Токена нет в хранилище» (исключения сверки покрытия: схема и дамп по HTTP не видны)
Итог: в `users` — строки Argon2id с разной солью у одного пароля, в `sessions` — только SHA-256 токена (32 байта); ни токена (текстом и в hex), ни пароля в `pg_dump --data-only` нет.
```text
users auth_… and auth_…: same password P (36 characters with ':' and Cyrillic)
password_hash $argon2id$v=19$m=65536,t=3,p=4$… (97 chars)
password_hash $argon2id$v=19$m=65536,t=3,p=4$… (97 chars)
hashes differ: t
session of the first user: token T (43 characters); rows of sessions with token_hash = SHA-256(T): 1, octet_length 32
pg_dump --data-only: 12 COPY blocks; T as text: no, T in hex: no, P as text: no
PASS: only Argon2id strings and SHA-256 of the token are stored
```