feat(api): sign-in, refresh rotation and bootstrap admin (M1)
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m15s
ci / api / api (push) Successful in 1m31s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 47s
ci / ts / ts (packages + web) (push) Successful in 39s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 26s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m15s
ci / api / api (push) Successful in 1m31s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 47s
ci / ts / ts (packages + web) (push) Successful in 39s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 26s
- users, refresh_tokens and audit_log schema (migration 00002) - argon2id passwords with rehash on login, password policy, lockout with exponential back-off and a per-IP rate limit in Redis - Ed25519 JWT access tokens with kid-based key rotation; rotating refresh tokens with reuse detection (cookie for web, body for Android) - bootstrap admin on first start; must_change_credentials and must_change_password gate every other endpoint - /auth/login, /auth/refresh, /auth/logout(-all), /me, /me/password, /me/bootstrap-credentials, /me/sessions; server-info reports bootstrap_required - role policy from docs/auth-and-roles.md with table tests - problem+json errors with field errors; ru/en translations of the codes - install.sh and update.sh generate JWT_PRIVATE_KEY Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b6def39e29
commit
ed4a492dba
37 files changed
+5826
-49
No files matched your search
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"common": {
|
||||
"internal": "Something went wrong on the server. Please try again",
|
||||
"bad_request": "Invalid request",
|
||||
"not_found": "Not found",
|
||||
"method_not_allowed": "This action is not supported"
|
||||
},
|
||||
"auth": {
|
||||
"invalid_credentials": "Wrong username or password",
|
||||
"too_many_attempts": "Too many sign-in attempts. Please wait a bit",
|
||||
"user_blocked": "This account is blocked. Contact your administrator",
|
||||
"unauthorized": "Sign in to continue",
|
||||
"token_expired": "Your session has expired, please sign in again",
|
||||
"token_invalid": "Your session is invalid, please sign in again",
|
||||
"token_revoked": "Your session has ended, please sign in again",
|
||||
"refresh_invalid": "Your session has ended, please sign in again",
|
||||
"refresh_reused": "Your session was ended for security reasons, please sign in again",
|
||||
"refresh_race": "Your session is being refreshed, please retry",
|
||||
"credentials_change_required": "Change the administrator username and password first",
|
||||
"password_change_required": "Change your temporary password first",
|
||||
"current_password_required": "Enter your current password",
|
||||
"current_password_invalid": "The current password is wrong",
|
||||
"bootstrap_not_required": "The administrator credentials have already been changed",
|
||||
"session_not_found": "Session not found"
|
||||
},
|
||||
"validation": {
|
||||
"password_too_short": "The password must be at least {{min}} characters",
|
||||
"password_too_long": "The password must be at most {{max}} characters",
|
||||
"password_same_as_username": "The password must not match the username",
|
||||
"password_too_common": "This password is too common — choose another one",
|
||||
"password_unchanged": "The new password must differ from the current one",
|
||||
"username_invalid": "Username: {{min}} to {{max}} characters — Latin letters, digits, \".\", \"_\", \"-\"",
|
||||
"username_taken": "This username is already taken",
|
||||
"locale_unsupported": "This language is not supported",
|
||||
"display_name_too_long": "The name must be at most {{max}} characters",
|
||||
"ui_prefs_invalid": "Invalid setting value",
|
||||
"client_type_invalid": "Unknown app type"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"common": {
|
||||
"internal": "Что-то пошло не так на сервере. Попробуйте ещё раз",
|
||||
"bad_request": "Некорректный запрос",
|
||||
"not_found": "Не найдено",
|
||||
"method_not_allowed": "Действие не поддерживается"
|
||||
},
|
||||
"auth": {
|
||||
"invalid_credentials": "Неверный логин или пароль",
|
||||
"too_many_attempts": "Слишком много попыток входа. Подождите немного",
|
||||
"user_blocked": "Учётная запись заблокирована. Обратитесь к администратору",
|
||||
"unauthorized": "Войдите, чтобы продолжить",
|
||||
"token_expired": "Сессия истекла, войдите снова",
|
||||
"token_invalid": "Сессия недействительна, войдите снова",
|
||||
"token_revoked": "Сессия завершена, войдите снова",
|
||||
"refresh_invalid": "Сессия завершена, войдите снова",
|
||||
"refresh_reused": "Сессия завершена из соображений безопасности, войдите снова",
|
||||
"refresh_race": "Сессия обновляется, повторите действие",
|
||||
"credentials_change_required": "Сначала смените логин и пароль администратора",
|
||||
"password_change_required": "Сначала смените временный пароль",
|
||||
"current_password_required": "Введите текущий пароль",
|
||||
"current_password_invalid": "Текущий пароль указан неверно",
|
||||
"bootstrap_not_required": "Учётные данные администратора уже изменены",
|
||||
"session_not_found": "Сессия не найдена"
|
||||
},
|
||||
"validation": {
|
||||
"password_too_short": "Пароль должен быть не короче {{min}} символов",
|
||||
"password_too_long": "Пароль должен быть не длиннее {{max}} символов",
|
||||
"password_same_as_username": "Пароль не должен совпадать с логином",
|
||||
"password_too_common": "Этот пароль слишком распространён — придумайте другой",
|
||||
"password_unchanged": "Новый пароль должен отличаться от текущего",
|
||||
"username_invalid": "Логин: от {{min}} до {{max}} символов — латинские буквы, цифры, «.», «_», «-»",
|
||||
"username_taken": "Этот логин уже занят",
|
||||
"locale_unsupported": "Этот язык не поддерживается",
|
||||
"display_name_too_long": "Имя должно быть не длиннее {{max}} символов",
|
||||
"ui_prefs_invalid": "Недопустимое значение настройки",
|
||||
"client_type_invalid": "Неизвестный тип приложения"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user