You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] Per-org queue quotas and fair scheduling so one tenant cannot starve the others #197
All orgs share one queue worker that processes incidents serially. Rate limiting (api/rate_limit.py) is keyed by client IP and path. Nothing limits how much work a single org can queue, so one tenant (or a leaked per-org webhook secret, or a noisy alert rule) can:
fill the queue and delay every other tenant's incidents by hours,
spend the platform's LLM budget when the org has no key of its own.
Proposed fix
Add a per-org cap on pending incidents (ORG_MAX_PENDING_INCIDENTS, e.g. 50). Over the cap, return 429 with Retry-After and record devops_agent_incidents_rejected_total{org,reason="quota"}.
Add a per-org rate limit on enqueue (ORG_INCIDENTS_PER_MINUTE) in addition to the per-IP limit.
Make the worker pick fairly across orgs (round-robin over orgs with pending work) instead of global FIFO.
Add a Grafana panel for queue depth per org.
Tests: the cap gives 429; round-robin ordering; an org at its cap doesn't block other orgs.
Activity