- re-capture coverage-exclusion evidence on the lab 4 stand: cache,
auth storage, replay after API recreate, test-persistence,
attachment-failover (stop, kill), attachment-storage
- green evidence/tests: student_test via LB, test_isolated,
failure_checks; smoke, slow transfer, test-failover per replica
- bench_rollout label attachments: e1161f7 -> schema with attachments
under load, no errors, messages = keys
- REPORT.md: attachments architecture, write order, defense answers,
level 3/4 evidence rows, limitations; PLAN.md stage 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.8 KiB
Markdown
31 lines
1.8 KiB
Markdown
# Пароли и токены в хранилище на стенде лабы 4
|
||
|
||
- Дата: 2026-10-20, 22:30:54 UTC.
|
||
- Commit: `d56b892` (код приложения — `116d8d3`, change `attachments`).
|
||
- Стенд: рабочий `mtusi-lab4` — HAProxy на `127.0.0.1:8080`, две
|
||
реплики API, PostgreSQL, Valkey, S3.
|
||
- Исключения сверки покрытия: `sessions` «Токена нет в хранилище»,
|
||
`users` «Хэш в БД» (`student-tests/spec_coverage.py`).
|
||
|
||
Пароль P и токен T синтетические и живут только в памяти драйвера;
|
||
печатаются факты, длины и префикс строки Argon2id до соли. Дамп базы
|
||
читается в память и никуда не пишется (9 блоков `COPY` — с таблицами
|
||
вложений лабы 4).
|
||
|
||
```
|
||
$ python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 auth-storage
|
||
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: 9 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
|
||
exit=0
|
||
```
|
||
|
||
- «Хэш в БД»: в `users` — строки Argon2id (`m=65536,t=3,p=4`), у двух
|
||
пользователей с одним паролем хэши разные (своя соль).
|
||
- «Токена нет в хранилище»: в `sessions` — SHA-256 токена (32 байта),
|
||
ни токена (текстом и в hex), ни пароля в `pg_dump` нет.
|