mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
docs(auth): the two wording nits of #838's review
An empty Authorization header is treated like a missing one, and the docs say so. The comment on why hook-secret failures keep their own bucket no longer claims a shared one would 429 a request without credentials. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
fc41bb5b13
commit
dfd661f9d1
4 files changed
+8
-6
No files matched your search
@@ -161,7 +161,7 @@ by presence in a server‑side map, so they cannot be forged offline.
|
||||
### Rate limiting / lockout recovery
|
||||
|
||||
Failed logins are tracked **per IP**: 10 failures (`AUTH_FAILURE_MAX`) → `429`, with a 15‑minute decay. Multi-user mode replaces that with three buckets, all with the same decay: a wider per-IP **pre-gate** of 50 failures (`AUTH_IP_FAILURE_MAX`), checked before the scrypt verify, which bounds scrypt cost from one source and tolerates many users behind one egress IP; a **per-(username, IP)** gate of 10 failures (`AUTH_FAILURE_MAX`), also checked before the verify, which is what caps verified guesses against one account from one source; and a **per-username** bucket, checked after the verify, that answers `429` to failed guesses from the 10th on, from any IP (the count is incremented before the check). The last two exist in multi-user mode only. So the wider per-IP cap does not widen guessing against any one account from one IP, and other IPs cannot lock an account out.
|
||||
A request with no `Authorization` header is never counted (step 4), so an open
|
||||
A request with no `Authorization` header, or an empty one, is never counted (step 4), so an open
|
||||
tab after a restart cannot fill any bucket. The QR path has its own separate limiter.
|
||||
|
||||
The lockout check sits **after** the cookie/credential checks (step 5, not first).
|
||||
|
||||
Reference in new issue
Block a user