feat(auth): make the registration rate limit configurable (BUNYIP-150) #222
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/bunyip-150-configurable-register-limit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Make the
/v1/auth/registerrate limit configurable so the E2E suite can register disposable accounts without tripping the production anti-abuse cap. BUNYIP-150 follow-up.Why
RateLimitConfig::REGISTRATIONis hardcoded at 3/IP/hour. The mail-sink E2E flows register a disposable account per run; at 3/hour/IP that allows only ~3 E2E runs/hour from the CI runner before a 429 (already observed on staging).Change
crates/bunyip-domain/src/config.rs: newConfig.registration_rate_limit_max, read fromREGISTRATION_RATE_LIMIT_MAX(default 3, positive-only), so production is unchanged when the var is unset.bunyip-api/src/handlers/auth.rs: the register handler builds the limit fromconfig.registration_rate_limit_maxinstead of the const (window stays 1h).Staging will set
REGISTRATION_RATE_LIMIT_MAXhigh (separate docker PR). Production leaves it unset -> stays at 3.Verification
just check-containergreen (fmt + clippy + workspace lib tests).Sequence
Merge this -> staging rebuilds
:latest-> deploy with the docker PR that setsREGISTRATION_RATE_LIMIT_MAXon c-01 bunyip-api. Then the e2e mail-sink fix PR (#221) can run without the register 429.🤖 Generated with Claude Code
Pull request closed