Skip to content

Comments

feat: add IP-based rate limiting for unauthenticated token endpoint#58

Merged
allisson merged 1 commit intomainfrom
auth-token-limits
Feb 20, 2026
Merged

feat: add IP-based rate limiting for unauthenticated token endpoint#58
allisson merged 1 commit intomainfrom
auth-token-limits

Conversation

@allisson
Copy link
Owner

Add TokenRateLimitMiddleware to protect POST /v1/token from credential stuffing and brute force attacks using per-IP throttling with token bucket algorithm and automatic cleanup of stale limiters.

New configuration:

  • RATE_LIMIT_TOKEN_ENABLED (default: true)
  • RATE_LIMIT_TOKEN_REQUESTS_PER_SEC (default: 5.0)
  • RATE_LIMIT_TOKEN_BURST (default: 10)

Token endpoint now returns 429 with Retry-After header when per-IP limits are exceeded, using stricter defaults than authenticated endpoints to reduce attack surface on unauthenticated paths.

Documentation updates include v0.7.0 release notes, upgrade guide, operator runbooks (quick card, incident decision tree, first 15 minutes playbook, trusted proxy reference), persona landing pages, day-0 onboarding walkthroughs, Phase 3/4 roadmaps, docs quality KPIs, postmortem feedback loop, versioned examples index, known limitations, and comprehensive updates to API docs, environment variable reference, troubleshooting, monitoring queries, and smoke tests.

CI improvements add release image tag consistency guard and expanded docs validation workflow.
Updated all pinned Docker examples from v0.6.0 to v0.7.0.

Add TokenRateLimitMiddleware to protect POST /v1/token from credential
stuffing and brute force attacks using per-IP throttling with token
bucket algorithm and automatic cleanup of stale limiters.

New configuration:
- RATE_LIMIT_TOKEN_ENABLED (default: true)
- RATE_LIMIT_TOKEN_REQUESTS_PER_SEC (default: 5.0)
- RATE_LIMIT_TOKEN_BURST (default: 10)

Token endpoint now returns 429 with Retry-After header when per-IP
limits are exceeded, using stricter defaults than authenticated
endpoints to reduce attack surface on unauthenticated paths.

Documentation updates include v0.7.0 release notes, upgrade guide,
operator runbooks (quick card, incident decision tree, first 15
minutes playbook, trusted proxy reference), persona landing pages,
day-0 onboarding walkthroughs, Phase 3/4 roadmaps, docs quality KPIs,
postmortem feedback loop, versioned examples index, known limitations,
and comprehensive updates to API docs, environment variable reference,
troubleshooting, monitoring queries, and smoke tests.

CI improvements add release image tag consistency guard and expanded
docs validation workflow.
Updated all pinned Docker examples from v0.6.0 to v0.7.0.
@allisson allisson merged commit 40e0a2e into main Feb 20, 2026
2 checks passed
@allisson allisson deleted the auth-token-limits branch February 20, 2026 13:19
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.

1 participant