Restrict worker pod egress to the egress gateway and DNS

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

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

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

評価

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

調査の方向性

Start in ate-controller, where the per-WorkerPool NetworkPolicy is built, and read its existing ingress rules and tests. Add egress rules for the egress gateway’s named https port and port 53, and narrow atenet-router ingress to atunnel’s https and connect ports. Update or add policy tests to cover those rules and the stated DNS and OTLP trade-offs.

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

説明

area/network area/security kind/feature

Worker pods run untrusted actor sandboxes. The sandbox's own traffic goes through atunnel to the egress gateway, but the worker pod's network namespace has no egress restriction. Code that escapes the sandbox into the worker pod can reach any pod or Service in the cluster, and the node's cloud metadata server.

The per-WorkerPool NetworkPolicy from ate-controller covers only ingress today. The worker pod only needs:

  • TCP to the egress gateway (app: atenet-egress, named port https: 443 on Envoy, 8443 on agentgateway)
  • port 53, for the DNS relay and Service lookups

Proposal: add Egress to the per-WorkerPool policy with those two rules, and narrow ingress from atenet-router to atunnel's https and connect ports. Port 53 is open to any destination because the relay forwards to whatever the pod's resolv.conf names: kube-dns pods, a node-local cache, or a custom resolver. Selectors or a fixed IP would break some of those.

Trade-off: workers that export OTLP directly, on nodes without an atelet relay, can no longer reach the collector. The relay is the default path.

主要言語
Go
スター
5.9k
フォーク
637
平均マージ
2日 1時間
マージ済み PR(30日)
523

環境構築

はじめの一歩

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

agent-substrate/substrate のほかの issue

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

似ている issue

Go の issue をもっと見る

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

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