Rate-limit MCP requests per principal, not per IP

Abierto
#85 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start with the rate-limit rule for /github/mcp in vercel.firewall.json and the polling defaults in faucet/events.go, then read docs/security.md for the per-login limits already enforced in process. Trace where the MCP request is authenticated and the superblink-events token's login or service client is resolved, since the new key has to come from there, and check what key the edge firewall can actually rate-limit on. Done means per-principal limiting on /github/mcp, a looser per-IP limit for unauthenticated and login traffic, and the two documented together.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

The MCP rate limit on /github/mcp is 120 requests a minute per IP (vercel.firewall.json). A Coder deployment sends every user's MCP traffic from one egress IP: polls, renewals and the superblink-events tool calls of every chat. One busy deployment can then get 429 for all of its users, while one heavy user behind their own IP is barely limited.

At the recommended nextPollMs of 5000 (faucet/events.go), 10 poll subscriptions fill the budget. At a 30 s client floor, about 60 do, before any tool call.

Proposal

Key the MCP rate limit on the authenticated principal (the superblink-events token's login or service client) instead of the IP, and keep a looser per-IP limit only for unauthenticated requests and the login endpoints. The per-login limits that superblink-events already enforces in process (5 concurrent polls, 10 waits, docs/security.md) fit this model.

Context

Coder Agents plans to subscribe to superblink-events events for chat automations: webhook delivery on public deployments, poll as the fallback. Many users of one deployment share the egress IP in both modes.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lenguaje dominante
Go
Estrellas
1
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/faucet

Todos los issues de coder/faucet

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.