Files
mtusi2026lab2/evidence/level3.log
2026-10-16 05:27:13 +03:00

44 lines
2.8 KiB
Plaintext
Raw Permalink 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.
# 2026-10-16 05:20:30 +0300, commit 65003b6 (+ незакоммиченные изменения)
## Таблицы PostgreSQL и применённые миграции
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+-----------
public | chat_members | table | messenger
public | chats | table | messenger
public | messages | table | messenger
public | schema_migrations | table | messenger
public | sessions | table | messenger
public | users | table | messenger
(6 rows)
schema_migrations: 1,2
## Регистрация и password KDF
OK POST /users: HTTP 201 (ожидалось 201)
OK POST /users: HTTP 201 (ожидалось 201)
OK POST /users: HTTP 201 (ожидалось 201)
OK POST /users: HTTP 201 (ожидалось 201)
OK POST /users: HTTP 201 (ожидалось 201)
время POST /users (5 запросов): медиана 158 ms, min 142, max 162
в ответе нет password/password_hash: True
параметры hash в БД: argon2id$v=19$m=65536,t=2,p=1 (соль и hash не выводятся)
## Basic только на POST /auth/sessions, Bearer на остальных
OK Basic → POST /auth/sessions: HTTP 201 (ожидалось 201)
тело: {"expires_at": "2026-10-16T03:20:32Z", "token": "<64 hex-символов, скрыт>", "token_type": "Bearer", "user": {"created_at": "2026-10-16T02:20:31Z", "display_name": "Evidence", "id": "4e0662a9-cc8d-45d6-821f-040a1179ec68", "username": "ev_8a65abedae"}}
OK неверный пароль → POST /auth/sessions: HTTP 401 (ожидалось 401) WWW-Authenticate: Basic realm="messenger", charset="UTF-8"
OK Basic → GET /users/me: HTTP 401 (ожидалось 401) WWW-Authenticate: Bearer realm="messenger"
OK X-User-Id без Bearer → GET /users/me: HTTP 401 (ожидалось 401) WWW-Authenticate: Bearer realm="messenger"
OK Bearer → GET /users/me: HTTP 200 (ожидалось 200)
тело: {"created_at": "2026-10-16T02:20:31Z", "display_name": "Evidence", "id": "4e0662a9-cc8d-45d6-821f-040a1179ec68", "username": "ev_8a65abedae"}
## Атомарное создание чата
OK POST /chats с несуществующим участником: HTTP 400 (ожидалось 400)
тело: {"error": {"code": "invalid_request", "message": "invalid members", "request_id": "17"}}
чатов с title=atomic-b8723771: 0, строк chat_members с этим участником: 0
## Logout
OK DELETE /auth/sessions/current: HTTP 204 (ожидалось 204)
OK тот же токен → GET /users/me: HTTP 401 (ожидалось 401) WWW-Authenticate: Bearer realm="messenger"
OK повторный logout: HTTP 401 (ожидалось 401) WWW-Authenticate: Bearer realm="messenger"