Count sign-in attempts per address and client, guard the sign-in form with a token, ration both forms per address

A wrong password from anywhere counted against the address, so ten locked
its owner out. Attempts are now counted per address and client, with a
looser bound per address alone. The sign-in form carries a token matched
by a cookie (login CSRF). POST /login and /signup are rationed per client
address, a hash waits at most ten seconds for a turn, and server init
writes signup_open: false.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-04 10:26:29 +02:00
1 parent f1b49d0251
commit 44cd58005a
11 files changed
+312 -22

No files matched your search

+3 -1
View File
@@ -480,7 +480,9 @@ control:
auth:
enabled: true
store: "%s" # a SQLite path, or @file holding a PostgreSQL address
signup_open: true
# The signup form: accounts it makes wait for an administrator's approval,
# but anyone reaching port 8080 can make them. Off until you want it.
signup_open: false
# Applied to any key no scope gives a limit to. Without them, a project
# created without limits is metered by nothing at all.
default_rpm: 60