Commit Graph
8 Commits
Author SHA1 Message Date
Lucas RayanandClaude Opus 5.5 b9137e0948 feat(auth): cap login guessing with a per-account budget
Failures from unknown addresses are capped at 100 per rolling 24 hours per
username, refused before Argon2 and before the hashing queue. Addresses with
a completed login in the last 30 days skip the budget, stored hashed on the
user. IPv6 counts per /48 for the pair throttle and the budget. Unknown names
take the same path, with their budget in the stand-in table. Crossing the cap
audits login.budget_exhausted once per account per 24 hours. Eviction drops
faded entries, then the least counted, not the oldest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:27:38 -03:00
Lucas RayanandClaude Opus 5.5 348e61ca95 fix(auth): close unauthenticated lockout and tighten the daemon's edges
Key login failures by username and client address with decay, plus a loose
per-username limit that delays every address by a bounded time. Refused
attempts write nothing. Unknown usernames share the code path. MFA and session
password checks keep a persistent user-bound count that needs a password or a
session to reach.

Also: local mode refuses a non-loopback bind outside a container; security
headers on every response; the Argon2 permit lives as long as the blocking
task; a required password change rechecks role, MFA and epoch; auth reset
works for any user; mfa_enabled in /api/auth/state; disabling MFA that is off
is refused with no side effects; StateCorrupt keeps only line and column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 21:03:27 -03:00
Lucas RayanandClaude Opus 5.5 a90ff81650 fix(auth): per-session reauth and admin token lifecycle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:40:08 -03:00
Lucas RayanandClaude Opus 5.5 c2d352ae30 feat(auth): sessions and scoped API tokens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:34:37 -03:00
Lucas RayanandClaude Opus 5.5 411a21ca6e fix(auth): force a password change after reset_admin
reset_admin now sets a persisted must_change_password flag. While it is set,
login and confirm_mfa return PasswordChangeRequired, a ticket that only allows
change_required_password, instead of a session. confirm_mfa therefore returns
LoginStep. change_password clears the flag and refuses the current password
as the new one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:29:52 -03:00
Lucas RayanandClaude Opus 5.5 2b71ae41c0 feat(auth): accounts, first-run setup and MFA login flow
Adds AuthService with single-use setup code, password login, TOTP and
recovery codes, enrollment, account management and local admin reset.
Attempts are reserved before Argon2 so parallel guesses cannot outrun the
per-account delay or the IP limit, and unknown usernames follow the same
schedule as real accounts. Passwords are NFC-normalized; repeated-character
and all-digit passwords are refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:24:46 -03:00
Lucas RayanandClaude Opus 5.5 c757db209d fix(auth): require state version, atomic key creation, torn audit lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:01:11 -03:00
Lucas RayanandClaude Opus 5.5 ef25bf7eb1 feat(auth): encrypted secrets, atomic state and audit log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:57:45 -03:00