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

オープン
#2,869 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, helm, kubernetes, redis

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Go
スター
309
フォーク
29
平均マージ
15時間 56分
マージ済み PR(30日)
225

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stacklok/mecatl のほかの issue

stacklok/mecatl の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。