Skip to content

Commit efa1011

Browse files
committed
feat(sandbox): split capability-free supervisor runtime
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 8e95cd7 commit efa1011

89 files changed

Lines changed: 21599 additions & 16513 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/branch-checks.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@ jobs:
179179
tasks/scripts/verify-telemetry-compiled-out.sh present target/debug/openshell-gateway
180180
cargo build -p openshell-gateway --bin openshell-gateway --no-default-features --features defaults-without-telemetry
181181
tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-gateway
182-
cargo build -p openshell-sandbox --bin openshell-sandbox --no-default-features --features defaults-without-telemetry
183-
tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-sandbox
182+
cargo build -p openshell-supervisor --bin openshell-supervisor --no-default-features --features defaults-without-telemetry
183+
tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-supervisor
184184
185185
- name: Verify the defaults-without-telemetry feature alias tracks the default feature set
186186
run: tasks/scripts/verify-defaults-without-telemetry.sh
187187

188188
- name: Verify system CA roots build mode compiles and excludes bundled Mozilla roots
189189
run: |
190-
cargo check -p openshell-sandbox --all-targets --no-default-features --features system-ca-roots
191-
if cargo tree -p openshell-sandbox -i webpki-roots --no-default-features --features system-ca-roots 2>/dev/null | grep -q webpki-roots; then
190+
cargo check -p openshell-supervisor --all-targets --no-default-features --features system-ca-roots
191+
if cargo tree -p openshell-supervisor -i webpki-roots --no-default-features --features system-ca-roots 2>/dev/null | grep -q webpki-roots; then
192192
echo "ERROR: webpki-roots found in system CA roots build" >&2
193193
exit 1
194194
fi
195-
if cargo tree -p openshell-sandbox -i webpki-root-certs --no-default-features --features system-ca-roots 2>/dev/null | grep -q webpki-root-certs; then
195+
if cargo tree -p openshell-supervisor -i webpki-root-certs --no-default-features --features system-ca-roots 2>/dev/null | grep -q webpki-root-certs; then
196196
echo "ERROR: webpki-root-certs found in system CA roots build" >&2
197197
exit 1
198198
fi

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ These pipelines connect skills into end-to-end workflows. Individual skill files
6868
| `crates/openshell-supervisor-middleware/` | Middleware runtime | Generic middleware registry, remote service integration, and chain execution |
6969
| `crates/openshell-supervisor-middleware-builtins/` | Built-in middleware | First-party in-process middleware implementations |
7070
| `crates/openshell-supervisor-network/` | Network supervisor | Proxying, L7 enforcement, policy evaluation, and inference routing |
71-
| `crates/openshell-supervisor-process/` | Process supervisor | Process lifecycle, namespace, and bypass monitoring |
71+
| `crates/openshell-supervisor-process/` | Supervisor process runtime | Gateway sessions, SSH access, and remote sandbox process control |
7272
| `crates/openshell-vfio/` | VFIO support | PCI and GPU passthrough preparation and lifecycle |
7373
| `python/openshell/` | Python SDK | Python bindings and CLI packaging |
7474
| `sdk/typescript/` | TypeScript SDK | Native Connect client, curated sandbox API, and generated protobuf types |

‎Cargo.lock‎

Lines changed: 66 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ http-body-util = "0.1"
3838
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12", "ring"] }
3939
rustls = { version = "0.23", default-features = false, features = ["std", "logging", "tls12", "ring"] }
4040
rustls-pemfile = "2"
41-
rcgen = { version = "0.13", features = ["crypto", "pem"] }
41+
rcgen = { version = "0.13", features = ["crypto", "pem", "x509-parser"] }
4242
webpki-roots = "1"
4343
rustls-native-certs = "0.8"
4444

‎architecture/build.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ Cargo cannot subtract a single default feature, so each of the three binary
4747
crates also defines a `defaults-without-telemetry` alias listing every default
4848
except `telemetry`. Telemetry-free builds use
4949
`--no-default-features --features defaults-without-telemetry` and stay correct
50-
as the default set grows, instead of dropping unrelated defaults the way a bare
51-
`--no-default-features` does on `openshell-sandbox`. The alias is a keep-list,
50+
as the default set grows. The alias is a keep-list,
5251
not a switch: enabling it on top of the defaults would otherwise yield a
5352
telemetry-on binary that reads as telemetry-free, so each crate root carries a
5453
`compile_error!` for the `telemetry` + `defaults-without-telemetry` combination.
@@ -63,7 +62,7 @@ roots through `webpki-roots` plus locally-installed CAs from the system bundle.
6362
Building without `bundled-ca-roots` switches to the platform trust store via
6463
`rustls-native-certs` and excludes bundled Mozilla root crates such as
6564
`webpki-roots` and `webpki-root-certs` from the dependency graph. The
66-
`system-ca-roots` feature alias on `openshell-sandbox` includes all other
65+
`system-ca-roots` feature alias on `openshell-supervisor` includes all other
6766
defaults (currently `telemetry`) except `bundled-ca-roots`, so Linux
6867
distribution builds (e.g. RPM) can use
6968
`--no-default-features --features system-ca-roots` without manually re-adding
@@ -196,13 +195,12 @@ Runtime layout:
196195
cache action runs. An explicitly configured VM runtime bundle is required to
197196
contain every non-empty embedding input; the driver build fails before
198197
packaging when an input is absent or empty.
199-
- **Supervisor**: Alpine base with `nftables`, static binary at
200-
`/openshell-sandbox` (musl by default; see `SUPERVISOR_LIBC` above). Static
201-
linkage keeps the binary usable when the image is mounted/extracted into
202-
sandbox environments (Docker extraction, Podman image volumes, Kubernetes
203-
init-container copy-self), whose libc and glibc version are not known at build
204-
time, while `nftables` supports Kubernetes supervisor sidecar egress
205-
enforcement. The VM driver bundles its own supervisor build
198+
- **Sandbox and supervisor**: Alpine base with separate static
199+
`/openshell-sandbox` and `/openshell-supervisor` binaries (musl by default;
200+
see `SUPERVISOR_LIBC` above). Static linkage keeps the sandbox executable
201+
usable when a driver stages it into an arbitrary workload image. The image
202+
entrypoint is the external supervisor; drivers copy only the sandbox binary
203+
into the workload trust domain. The VM driver bundles both builds
206204
(`tasks/scripts/vm/build-supervisor-bundle.sh`) and does not read
207205
`SUPERVISOR_LIBC`.
208206

0 commit comments

Comments
 (0)