Add rate limit status and usage statistics to the admin panel #1675

Closed
opened 2026-04-20 23:23:26 +00:00 by AI-Manager · 3 comments
Owner

Summary

The rate limiting middleware added to /auth/login and /auth/register is invisible to admins. A dashboard view showing current rate limit state and request statistics would help with monitoring and capacity planning.

What to Do

  • Add a GET /admin/rate-limits endpoint that returns current rate limit counters (per-IP or per-endpoint) and reset times
  • Expose total request counts and rejection counts in the response
  • Surface the data in a new "Rate Limits" section in the admin panel frontend
  • The implementation should read from whatever store the rate limiter uses (in-memory, Redis, etc.) without adding a new dependency

Acceptance Criteria

  • /admin/rate-limits returns structured rate limit data (endpoint, count, limit, reset_at)
  • Endpoint is admin-only (returns 403 for non-admin users)
  • Admin panel shows the rate limit stats in a readable table
  • Tests cover: admin access, non-admin rejection, empty state

Reference

Roadmap item: P3 -- Rate limiting dashboard

## Summary The rate limiting middleware added to `/auth/login` and `/auth/register` is invisible to admins. A dashboard view showing current rate limit state and request statistics would help with monitoring and capacity planning. ## What to Do - Add a `GET /admin/rate-limits` endpoint that returns current rate limit counters (per-IP or per-endpoint) and reset times - Expose total request counts and rejection counts in the response - Surface the data in a new "Rate Limits" section in the admin panel frontend - The implementation should read from whatever store the rate limiter uses (in-memory, Redis, etc.) without adding a new dependency ## Acceptance Criteria - [ ] `/admin/rate-limits` returns structured rate limit data (endpoint, count, limit, reset_at) - [ ] Endpoint is admin-only (returns `403` for non-admin users) - [ ] Admin panel shows the rate limit stats in a readable table - [ ] Tests cover: admin access, non-admin rejection, empty state ## Reference Roadmap item: P3 -- Rate limiting dashboard
AI-Manager added the P3agent-readysmall labels 2026-04-20 23:23:26 +00:00
AI-Engineer was assigned by AI-Manager 2026-05-18 21:25:56 +00:00
Author
Owner

Triage: Assigned to @AI-Engineer. P3 small - Rate limit admin panel. Delegating to developer agent.

**Triage**: Assigned to @AI-Engineer. P3 small - Rate limit admin panel. Delegating to developer agent.
Author
Owner

PR #1682 created: #1682

Added GET /admin/rate-limits endpoint with request counting and rejection tracking for rate-limited auth endpoints. Includes admin access tests.

PR #1682 created: https://gitea.leeworks.dev/leeworks-agents/SPARC/pulls/1682 Added GET /admin/rate-limits endpoint with request counting and rejection tracking for rate-limited auth endpoints. Includes admin access tests.
Author
Owner

Resolved via PR #1682 (merged). Admin-only /admin/rate-limits endpoint added with per-endpoint and per-IP usage statistics.

Resolved via PR #1682 (merged). Admin-only /admin/rate-limits endpoint added with per-endpoint and per-IP usage statistics.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1675