MCP broker: logins to protected MCP servers survive a mecak8s restart

Abierto
#2,869 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, helm, kubernetes, redis

Línea de trabajo

Start by tracing the MCP broker’s enrollment and login state, the embedded authorization server’s HMAC and signing key configuration, and the Redis and Helm settings mentioned in the issue; the payload does not name specific files or tests. Check how the identity broker configures its signing key under #2538, then map the restart and secret rotation requirements to existing entry points. Done means durable logins and refresh tokens survive restarts, previous configured secrets and keys verify tokens, and startup reports a clear error when durable logins lack required secrets.

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

Descripción

Depends on: nothing

Problem

When a protected (OAuth) MCP server is configured, mecak8s's MCP broker signs each user in to it through ToolHive's embedded authorization server (workspace enrollment). The broker keeps each session's enrollment, the tokens it obtained, and the state of logins in progress in memory. A mecak8s restart loses all of it, so every user has to log in to every protected MCP server again, and a login in progress during the restart fails.

Storing these in Redis is not enough on its own. The embedded authorization server generates a new HMAC secret (which protects its authorization codes and refresh tokens), a new signing key (which signs the access tokens the gateway accepts), and new credentials for the MCP broker's own client at every start. Anything stored before a restart is unusable after it.

The identity broker makes the embedded authorization server's signing key operator-supplied when it is on (#2538). This ticket covers the rest, with the identity broker off or on.

Requirements

  • A user's login to a protected MCP server survives a mecak8s restart: the enrollment and the tokens it holds are stored durably (Redis), and a login in progress during a restart either completes or fails cleanly with a prompt to log in again.
  • The embedded authorization server's HMAC secret is supplied by the operator: one current secret of at least 32 bytes, plus optional previous secrets accepted for verification only, for rotation.
  • Its signing key is supplied by the operator, plus optional previous keys still published for verification. With the identity broker on this is the key #2538 already requires; both use one configuration shape.
  • The MCP broker's own client at the embedded authorization server keeps the same identity across restarts.
  • mecak8s refuses to start with durable logins enabled if any of these is missing. Without durable logins they stay optional, and behaviour is unchanged.
  • Secrets are read from files mounted from Kubernetes Secrets, never logged, and exposed through the Helm chart.

Done when

  • With the operator's secrets and Redis configured, a protected MCP server a user logged in to before a mecak8s restart is still callable after it, and its refresh token still renews, with no new login.
  • A token issued under a previous secret or key is accepted while it is configured as previous, and refused once it is removed.
  • mecak8s with durable logins on and a missing secret refuses to start with a clear error.
  • With durable logins off, mecak8s starts and behaves as it does now, with no new settings required.
Lenguaje dominante
Go
Estrellas
309
Forks
29
Merge medio
15 h 56 min
PR fusionados (30 d)
225

Preparar el entorno

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 stacklok/mecatl

Todos los issues de stacklok/mecatl

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.