Commit Graph
7 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 06b9980659 feat(auth): admin reset, docs and image smoke test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:34:57 -03:00
Lucas RayanandClaude Opus 5.5 42892cb37f feat(auth): login, MFA and account screens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:21:33 -03:00
Lucas RayanandClaude Opus 5.5 dc8c7fa248 feat(auth): explicit transport modes
ACAUA_TRANSPORT (local, tls, proxy) is now required; a missing or invalid
value stops the daemon. local refuses a non-loopback ACAUA_PUBLISHED, tls
serves HTTPS via axum-server/rustls, proxy needs ACAUA_TRUSTED_PROXIES.
HSTS is sent in tls and proxy modes. The image defaults to local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:03:00 -03:00
Lucas RayanandClaude Opus 5.5 5ad89d5be5 fix(auth): throttle bootstrap and require reauth for user changes
Bootstrap takes the client IP, is limited per IP, and writes no audit line
once an admin exists. Creating, changing the role of or deleting a user now
needs a session with recent reauthentication; API tokens are refused.
/api/analyze and /api/update return fixed messages and log the detail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:56:59 -03:00
Lucas RayanandClaude Opus 5.5 2b1bc63340 feat(auth): deny-by-default HTTP layer
A global middleware wraps the router and its fallback: only PUBLIC_ROUTES
answer without a credential, and unknown paths look like protected ones.
Adds cookie sessions with per-session CSRF, scoped Bearer tokens, the
/api/auth and /api/admin handlers, Transport for client IP and Secure, and
pending-token enrollment re-checked inside one store update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:51:42 -03:00