Mount Kubernetes API token only into client containers in pods with sidecars

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

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

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

評価

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

調査の方向性

Start with the workload manifest generation for ate-api-server, atelet, and atenet-router, then read cmd/ate-setup/internal/steps/serviceaccounttoken_test.go. Check how the PodSpecs and projected service account volumes are defined, and extend the manifest tests to verify token access per container. Done means the three API client containers retain access while the objectstore-plugin and envoy sidecars do not.

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

説明

area/identity area/security kind/feature

PR #3466 will disable automountServiceAccountToken across all Substrate pods and ServiceAccounts that do not interact with the Kubernetes API (ateworker, atenet-egress, postgres, ate-idp-server, rustfs).

However, for the workloads that do require Kubernetes API access (ate-api-server, atelet, and atenet-router), Kubernetes automounts the ServiceAccount token into every container in the pod by default. This exposes the API credential to containers that do not need it:

  • objectstore-plugin sidecar in ate-api-server and atelet (transfers snapshots and accesses cloud storage via Workload Identity / STS, not Kubernetes tokens)
  • envoy in atenet-router (parses untrusted ingress traffic; only the atenet-router controller container queries EndpointSlices)

If one of these sidecars is compromised, the attacker inherits the pod's Kubernetes API permissions.

Proposal:

  1. Set automountServiceAccountToken: false on the PodSpec for ate-api-server, atelet, and atenet-router.
  2. Hand-mount a projected kube-api-access volume (containing token, ca.crt, and namespace) at /var/run/secrets/kubernetes.io/serviceaccount exclusively into the API client container (ate-api-server, atelet, and atenet-router).
  3. Extend the manifest tests in cmd/ate-setup/internal/steps/serviceaccounttoken_test.go to assert token isolation per-container, ensuring sidecars never mount the token and API clients always mount it.
主要言語
Go
スター
6.1k
フォーク
676
平均マージ
2日 2時間
マージ済み PR(30日)
538

環境構築

はじめの一歩

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

agent-substrate/substrate のほかの issue

agent-substrate/substrate の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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