Rate limiting for sign-in, password reset, and public endpoints #38

Closed
opened 2026-10-15 01:19:02 -04:00 by vmanne-poc · 0 comments
Owner

Today: nothing limits repeated requests, except the per-account reset-email throttle. Sign-in can be brute-forced, and the public form submit and tracking endpoints can be flooded.

Plan

  • Add @nestjs/throttler with a pinned version.
    • Strict per-IP limits on POST /auth/login, /auth/register, /auth/forgot-password, /auth/reset-password, and /public/forms/*/submit.
    • Looser limits on tracking.
  • Respect X-Forwarded-For only from a configured trusted proxy (the nginx container).
  • Return 429 with Retry-After. The web app shows a friendly message.
  • Optionally, temporarily lock an account after N failed sign-ins (with a notice to the administrator).

Done when

  • e2e tests show 429 after the limit and that limits reset over time.
**Today:** nothing limits repeated requests, except the per-account reset-email throttle. Sign-in can be brute-forced, and the public form submit and tracking endpoints can be flooded. **Plan** - Add `@nestjs/throttler` with a pinned version. - Strict per-IP limits on `POST /auth/login`, `/auth/register`, `/auth/forgot-password`, `/auth/reset-password`, and `/public/forms/*/submit`. - Looser limits on tracking. - Respect `X-Forwarded-For` only from a configured trusted proxy (the nginx container). - Return 429 with `Retry-After`. The web app shows a friendly message. - Optionally, temporarily lock an account after N failed sign-ins (with a notice to the administrator). **Done when** - e2e tests show 429 after the limit and that limits reset over time.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vmanne-poc/Postak#38
No description provided.