Why
LoginBegin/RegisterBeginreveal whether an account exists.- Auth/invite/ceremony endpoints have no rate limits;
ceremonyStore.puthas no size cap. checkCSRFcan callr.ParseForm()before a body limit onLogoutand on passkey JSON endpoints.- Invite tokens live in
/invite/{token}paths and are logged by middleware/server-error logging and proxy access logs. - Session lookup accepts arbitrarily long cookie values and stores an unbounded
User-Agent. - HSTS is only set when passkeys are enabled, not whenever TLS is active.
Scope
- Add per-IP and per-account rate limits for login/register/invite/ceremony.
- Cap the ceremony map and expire aggressively.
- Return generic failures for unknown accounts vs accounts without passkeys.
- Wrap
r.BodywithMaxBytesReaderbeforecheckCSRF; requireX-Vole-CSRFon JSON endpoints; makeLogoutusebeginPost. - Add
Cache-Control: no-store,Pragma: no-cache, andReferrer-Policy: no-referrerto invite/auth/account pages. - Redact invite tokens from logs.
- Cap session tokens at the expected length; truncate stored
User-Agent. - Set HSTS whenever serving HTTPS.
- Decide and document passkey clone-warning policy.
Acceptance
- Auth endpoints are rate-limited and body-bounded.
- Invite tokens are absent from logs.
dev_logincannot be triggered through a proxy.