Email/password login (POST /api/admin/login) currently verifies argon2id and mitigates user-enumeration timing (verify_dummy), but has no brute-force protection and only a minimal password floor (≥8 chars, enforced at create-user). Post-MVP hardening.
What to do
Rate limiting / lockout on the login endpoint — per-IP and/or per-account attempt throttling with backoff or temporary lockout. (No Redis in MVP; an in-process limiter or a small DB-backed counter fits the single-tenant model.)
Password-strength policy — beyond the 8-char floor: a configurable minimum and optionally a breached-password / common-password check at user creation and any future password-change endpoint.
Optional: a CSRF double-submit token in addition to SameSite=Strict (defense in depth for the admin surface).
References
crates/api/src/admin.rs — login handler (verify_dummy on miss)
crates/server/src/lib.rs — create_user (the ≥8 char check)
Surfaced in the auth plan's "Login hardening (post-MVP)" note.
## Context
Email/password login (`POST /api/admin/login`) currently verifies argon2id and mitigates user-enumeration timing (`verify_dummy`), but has **no brute-force protection** and only a minimal password floor (≥8 chars, enforced at `create-user`). Post-MVP hardening.
## What to do
- **Rate limiting / lockout** on the login endpoint — per-IP and/or per-account attempt throttling with backoff or temporary lockout. (No Redis in MVP; an in-process limiter or a small DB-backed counter fits the single-tenant model.)
- **Password-strength policy** — beyond the 8-char floor: a configurable minimum and optionally a breached-password / common-password check at user creation and any future password-change endpoint.
- Optional: a CSRF double-submit token in addition to `SameSite=Strict` (defense in depth for the admin surface).
## References
- `crates/api/src/admin.rs` — `login` handler (`verify_dummy` on miss)
- `crates/server/src/lib.rs` — `create_user` (the ≥8 char check)
- `crates/auth/src/lib.rs` — `hash_password`/`verify_password`
- Surfaced in the auth plan's "Login hardening (post-MVP)" note.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
Email/password login (
POST /api/admin/login) currently verifies argon2id and mitigates user-enumeration timing (verify_dummy), but has no brute-force protection and only a minimal password floor (≥8 chars, enforced atcreate-user). Post-MVP hardening.What to do
SameSite=Strict(defense in depth for the admin surface).References
crates/api/src/admin.rs—loginhandler (verify_dummyon miss)crates/server/src/lib.rs—create_user(the ≥8 char check)crates/auth/src/lib.rs—hash_password/verify_password