feat(supervisor): netlink/syscall network setup so the privileged supervisor needs no workload-image tools
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- linux, rust
- Ambito
- networking, security
Direzione di ricerca
Inizia leggendo crates/openshell-supervisor-process/src/netns/mod.rs, in particolare i punti di chiamata a external ip, nsenter, nft e dmesg, e analizza le issue correlate #2750, #2382 e #1335. Approfondisci l’approccio proposto con rtnetlink, setns/unshare, nf_tables e NFLOG, quindi verifica i criteri di accettazione su Docker, rootless Podman e Kubernetes. Il lavoro è completato quando la modalità proxy si avvia su un’immagine Alpine non modificata e priva di strumenti di rete nell’immagine workload, mentre le immagini che dispongono già di tali strumenti mantengono il loro comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
As an OpenShell operator, I want a sandbox to start with the default generic Alpine image in proxy mode without the sandbox image having to ship iproute2/nftables, so that the #3116 Alpine default works on unmodified base images.
Problem Statement
In proxy mode the privileged supervisor sets up the sandbox network namespace by shelling out to tools resolved from the workload image: ip (netns/veth/addr/route — 32 call sites in crates/openshell-supervisor-process/src/netns/mod.rs), nsenter (9), nft (6), and dmesg (bypass monitoring). A bare Alpine image only ships busybox ip (no netns subcommand) and no nftables/iptables, so the supervisor fails at startup with Network namespace creation failed ... iproute2 is installed and the sandbox container exits.
The community base image previously provided these tools; #3116 removes that dependency by defaulting to bare Alpine, which surfaces the gap. Only setns (8 call sites) is already a direct syscall today — namespace/veth/route creation and firewall rules still spawn external binaries.
This is the networking subset of #2750 (make the privileged supervisor independent of workload-image code), scoped down so it can land as a focused change that unblocks #3116.
Impact / Why This Matters
Without this, the #3116 default (bare Alpine) cannot run in proxy mode — the enforced-egress path that Secure Agent Workspace and any default-deny deployment rely on. The current workarounds are to keep shipping iproute2/nftables inside every sandbox image (re-introducing the exact image dependency #3116 removes) or to disable proxy mode (losing egress isolation). Neither is acceptable for a generic default.
Proposed Design
Replace the privileged network setup's external-helper calls with in-process kernel interfaces, so the supervisor is self-contained:
- Namespace + veth + addresses + routes: route netlink (
rtnetlink) plussetns/unsharewith FD-owned namespaces (removes the/run/netnsrequirement). - Enter namespaces:
setnsdirectly (already used for the enter path). - Firewall / bypass rules: nf_tables netlink instead of the
nftbinary. - Bypass monitoring: NFLOG instead of
dmesg(also drops theCAP_SYSLOGrequirement; see #2382).
The supervisor binary stays musl-static so it carries no dynamic loader or NSS dependency on the workload image. Behavior on base images that already ship iproute2/nftables must be unchanged.
Acceptance Criteria
- A sandbox created from an unmodified
docker.io/library/alpine:*image starts in proxy mode with noip/nsenter/nft/dmesgexecuted from the workload image. - Network namespace, veth, addressing, and routing are created without spawning
ip/nsenter. - Bypass-detection firewall rules are programmed without the
nftbinary. - Bypass monitoring works without
dmesg/CAP_SYSLOG. - Verified on the Docker, rootless Podman, and Kubernetes runtimes.
- No behavior change for base images that already ship the tools.
Alternatives Considered
- Mount the tools from a trusted OpenShell image into the sandbox (Phase 1 of #2750): works, but drags dynamic libraries across libc boundaries (glibc tools on musl Alpine) and remains a mount/compatibility burden; the netlink approach removes the dependency entirely.
- Require the default image to bundle
iproute2/nftables: re-introduces the image dependency #3116 removes and bloats the generic default.
Scope
In: the networking subset above.
Out (remains in #2750): the Phase 3 execution boundary (deny execve after startup, unprivileged workload/SSH execution), the Podman health-check and Kubernetes PVC-seeding shells, the hostile-image test suite, and the VM guest path.
Related
- Sub-task of #2750
- Unblocks #3116 (proxy-mode networking on a bare Alpine default)
- Related: #2382 (NFLOG bypass detection), #1335 (nftables migration)
- Lingua principale
- Rust
- Stelle
- 8.7k
- Fork
- 1.3k
- Merge medio
- 2g 6h
- PR unite (30g)
- 297
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
area:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:cli state:validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:build spike state:review-ready state:stale
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
state:needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
zed-industries/zed#64680 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
RustPython/RustPython#8802 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2390 ·