Restrict worker pod egress to the egress gateway and DNS

Aperta
#3,467 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
6.1k
Fork
676
Merge medio
2g 2h
PR unite (30g)
522

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di agent-substrate/substrate

Tutte le issue di agent-substrate/substrate

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.