Перевести пароли на Argon2id и читать секреты через AppRole.

Лимит входа общий для реплик, размер тела ограничен, исходящие клиенты проверяют TLS, если задан CA.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-26 19:40:28 +03:00
co-authored by Cursor
parent 54b4b9e509
commit fb566d874c
19 changed files with 445 additions and 20 deletions
+12
View File
@@ -91,6 +91,18 @@ async def get_user(user_id: str) -> Optional[dict]:
return user_dict(row) if row else None
async def update_password_hash(user_id, password_hash: str) -> None:
try:
async with db.require().acquire() as conn:
await conn.execute(
"UPDATE users SET password_hash = $2 WHERE id = $1",
user_id,
password_hash,
)
except Exception:
raise AppError(503, "service unavailable") from None
async def get_user_by_username(username: str):
return await _run(
_fetchrow(