Skip to content

Introduce registration gatekeeper - #1257

Merged
peterthomassen merged 2 commits into
mainfrom
20260903_blocklist
Sep 4, 2026
Merged

peterthomassen merged 2 commits into
mainfrom
20260903_blocklist

Conversation

@peterthomassen

Copy link
Copy Markdown
Member

No description provided.

@peterthomassen peterthomassen changed the title Introduce blocklist Introduce registration gatekeeper Sep 4, 2026
Comment thread api/desecapi/exceptions.py
Comment thread api/desecapi/gatekeeper.py Outdated
Comment thread api/desecapi/gatekeeper.py
Comment thread api/desecapi/views/users.py
The api hands the facts of a registration attempt (email address, client IP
address, user agent, requested domain, captcha state) to the gatekeeper service
and acts on its verdict: allow, drop (discard the request, but give the client
the regular response), or reject (400 Bad Request). The arbiter runs in its own
container, reachable from api only and without access to the rest of the stack;
its reasoning is logged, but never disclosed to the client, and failure to
obtain a verdict allows the request. The arbiter shipped here allows everything;
gatekeeper/README.md documents the interface.
The arbiter matches the address of a registration attempt against the patterns
in email-blocklist.txt and answers with a drop verdict naming the matching line,
so that no account is created and no activation email is sent while the client
receives the usual response. Patterns are shell-style globs matched
case-insensitively; a line starting with ! is an exception, and the first
matching line decides. The file is read on every request, and the directory
holding it is mounted read-only into the gatekeeper container as configured by
DESECSTACK_GATEKEEPER_CONF; if it cannot be read, no address is blocked.
@peterthomassen
peterthomassen merged commit e78524e into main Sep 4, 2026
7 checks passed
@peterthomassen
peterthomassen deleted the 20260903_blocklist branch September 4, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants