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:
Codeman maintainer committed 2026-11-25 16:11:57 +01:00
1 parent fc41bb5b13
commit dfd661f9d1
4 files changed
+8 -6

No files matched your search

+5 -3
View File
@@ -363,9 +363,11 @@ export function registerAuthMiddleware(app: FastifyInstance, https: boolean, bas
// Separate hook-secret failure counter (COD-54). MUST NOT share authFailures:
// legacy (pre-secret) hook configs fire constantly from 127.0.0.1, and counting
// their 401s against the shared bucket would 429 every cookie-less request from
// loopback — locking out the Basic-Auth login path (and, through a tunnel, every
// client, since tunneled traffic also arrives as 127.0.0.1).
// their 401s against the shared bucket would fill it for loopback: every wrong or
// malformed login from there would get a 429 (and in multi-user mode a correct
// password too, once the pre-verify gate is full), locking out the Basic-Auth login
// path and, through a tunnel, every client, since tunneled traffic also arrives as
// 127.0.0.1. A request with no Authorization header is never counted or refused.
state.hookSecretFailures = new StaleExpirationMap<string, number>({
ttlMs: AUTH_FAILURE_WINDOW_MS,
refreshOnGet: false,