[FEATURE] RemoteMCPServer: trust a custom CA for the upstream MCP server

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes
領域
security

調査の方向性

Start from spec.tls on RemoteMCPServer and the commented-out caCertSecretRef in TLSConfig, then check how controller tool discovery builds its trusted roots. The issue leaves open which part belongs in kagent and which in the Substrate gateway, so settle that split with maintainers (see #3258) before writing code. Done means a CA referenced from a ConfigMap or Secret is trusted during discovery and tool calls, with verification still on.

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

説明

📋 Prerequisites
📝 Feature Summary

Let a RemoteMCPServer name a CA bundle (Secret or ConfigMap) that the components connecting to it trust, so MCP servers with a private or cluster CA can be used with verification on.

❓ Problem Statement / Motivation

Some MCP servers sit behind a certificate from a private CA. One case: Kubescape's storage serves a read-only MCP endpoint through the Kubernetes API (https://kubernetes.default.svc/apis/spdx.softwarecomposition.kubescape.io/v1beta1/namespaces/<ns>/mcpservers/default/mcp), so kube-apiserver does authentication and RBAC for the agent. Its certificate is signed by the cluster CA (the kube-root-ca.crt ConfigMap in every namespace).

As #3258 describes, Kagent v1.0.1 has no way to reach such a server: tool discovery ignores spec.tls, and Substrate's gateway verifies the upstream certificate against its own trust store, so even disableVerify does not help. The commented-out caCertSecretRef in TLSConfig is deferred for the same reason.

💡 Proposed Solution

An optional CA reference on the RemoteMCPServer, used by every component that connects to the upstream:

spec:
  tls:
    caCertRef:
      kind: ConfigMap   # or Secret
      name: kube-root-ca.crt
      key: ca.crt
  • Controller tool discovery adds it to the trusted roots.
  • Substrate's gateway trusts it for that destination (passed with the egress policy).

Which part belongs in kagent and which in substrate is your call; happy to follow the split you prefer.

🔄 Alternatives Considered
  • disableVerify: does not reach the gateway (#3258), and turns verification off anyway.
  • A proxy with a public certificate in front of the server: an extra component only to work around trust.
  • Earlier attempts: #1110, #1215, #1424 (all closed before the v1alpha3 / Substrate design).
🎯 Affected Service(s)

Controller (MCP discovery), Substrate gateway (tool calls).

📚 Additional Context

Related: #3258. Kubescape design: https://github.com/kubescape/designs-and-proposals/blob/main/proposals/storage-mcp-endpoint.md

🙋 Are you willing to contribute?
  • I am willing to submit a PR for this feature
主要言語
Go
スター
4.5k
フォーク
937
平均マージ
1日 10時間
マージ済み PR(30日)
150

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

kagent-dev/kagent のほかの issue

kagent-dev/kagent の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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