You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b2ea818
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/debug-openshell-cluster/SKILL.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,7 @@ Common findings:
186
186
callbacks. On an older release, set `bind_address = "127.0.0.1:17670"` or
187
187
upgrade.
188
188
- Supervisor image exits before printing `openshell-sandbox --version`: the image should be the scratch supervisor image from `deploy/docker/Dockerfile.supervisor` and must contain a static executable at `/openshell-sandbox`.
189
+
- A sandbox with explicit `protocol: tcp` endpoints fails before workload readiness: confirm the Docker or Podman driver supplied the `policy-dns-transparent-tcp` runtime capability and inspect supervisor logs for missing `nft`, synthetic-route overlap, or namespace-local DNS/TCP listener bind failures. Kubernetes, VM, sidecar, and out-of-tree drivers must reject this policy until they provide the complete substrate; use omitted protocol with an explicit proxy on those runtimes.
189
190
-`mise run e2e:docker:gpu` fails with `docker info --format json did not report any discovered NVIDIA CDI GPU devices`: Docker may report `CDISpecDirs` while still having no generated NVIDIA CDI specs. Verify `.DiscoveredDevices` contains entries such as `nvidia.com/gpu=all`, verify `/etc/cdi` or `/var/run/cdi` contains a generated NVIDIA spec, and check that `nvidia-cdi-refresh.service` and `nvidia-cdi-refresh.path` from NVIDIA Container Toolkit are enabled and healthy. The service is a one-shot unit, so `inactive (dead)` can be normal after a successful run; use `systemctl status` and `journalctl` to distinguish success from a skipped or failed refresh. NVIDIA recommends enabling the path and service units, and restarting `nvidia-cdi-refresh.service` to regenerate missing or stale CDI specs. If specs are generated but Docker still reports no discovered devices, restart Docker or reload the daemon and re-check `docker info`.
190
191
191
192
For source checkout development, restart the local gateway with:
@@ -219,6 +220,10 @@ Common findings:
219
220
- Sandbox image missing or pull denied: verify image reference and registry credentials.
220
221
- Sandbox fails before readiness with an identity-resolution error: inspect the image's OCI `USER` and matching `/etc/passwd` and `/etc/group` entries, or explicitly set both process identity fields in policy. Numeric workload identities `1` through `4294967294` are accepted; root, the invalid identity sentinel, and missing identities are rejected.
Copy file name to clipboardExpand all lines: .agents/skills/generate-sandbox-policy/SKILL.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,11 @@ For this tier, default to:
42
42
-`access: read-only` when the user says "read", "browse", "view", "query", "fetch"
43
43
-`access: read-write` when the user says "read-write", "create", "update" (but not "delete")
44
44
-`access: full` when the user says "full access", "everything", "unrestricted"
45
-
- L4-only (omit `protocol`, or use explicit `protocol: tcp`) when the user says
46
-
"just allow it", "pass through", "no inspection". Prefer omission unless the
47
-
user wants the transport intent stated explicitly. Explicit TCP requires a
48
-
valid DNS hostname; omit `protocol` for a legacy hostless `allowed_ips`
49
-
proxy endpoint.
45
+
- L4-only when the user says "just allow it", "pass through", or "no
46
+
inspection". Omit `protocol` for explicit-proxy clients. Use
47
+
`protocol: tcp` only when the workload must use native DNS and direct socket
48
+
calls, the endpoint has a valid DNS hostname, and the selected runtime
49
+
support (currently Docker and Podman).
50
50
51
51
### Moderate Tier (host + partial path knowledge)
52
52
@@ -192,7 +192,8 @@ Follow this decision tree based on the detail tier and user intent:
192
192
```
193
193
Is L7 inspection needed?
194
194
├─ No (user wants pass-through / "just allow it")
195
-
│ └─ Generate L4-only policy (no protocol, or protocol: tcp with a DNS hostname; no tls/rules/access)
195
+
│ ├─ Explicit-proxy client → omit protocol
196
+
│ └─ Native DNS/socket client with a DNS hostname on a supported runtime → protocol: tcp
196
197
│
197
198
└─ Yes (user wants method/path control)
198
199
│
@@ -213,7 +214,7 @@ Is L7 inspection needed?
213
214
| API host port | TLS setting |
214
215
|--------------|-------------|
215
216
| Port 443 (HTTPS) and L7 rules/preset needed |`tls: terminate` (required for inspection) |
216
-
| Port 443 (HTTPS) and L4-only | Omit `tls` (passthrough, no L7) |
217
+
| Port 443 (HTTPS) and L4-only | Omit `tls` (passthrough, no L7); choose omitted protocol or explicit TCP based on client/runtime as above|
217
218
| Non-443 (HTTP) | Omit `tls`|
218
219
219
220
**Critical**: `protocol: rest` on port 443 without `tls: terminate` will not work — the proxy cannot inspect encrypted traffic. Always set `tls: terminate` when combining port 443 with L7 rules.
@@ -415,7 +416,7 @@ Evaluate the generated policy for overly broad access and **include warnings in
415
416
416
417
| Condition | Warning to show |
417
418
|-----------|----------------|
418
-
| **L4-only** (no `protocol`, or `protocol: tcp`) | "This policy allows all HTTP methods and paths without inspection. The proxy will only check host:port and binary identity. Consider adding `protocol: rest` with a preset if you want method-level control." |
419
+
| **L4-only** (no `protocol`, or `protocol: tcp`) | "This policy allows all application methods and paths without inspection. An omitted protocol uses explicit-proxy behavior; `protocol: tcp` enables policy DNS and transparent TCP only on a runtime that advertises the complete substrate (currently Docker and Podman). Consider `protocol: rest` with a preset if you want HTTP method-level control." |
419
420
| **`access: full`** | "This policy allows all HTTP methods (including DELETE) on all paths. If you don't need DELETE, `read-write` is safer. If you only need to read, `read-only` is the most restrictive option." |
420
421
| **`access: full` + `enforcement: audit`** | "Full access in audit mode provides no actual restriction — all traffic flows through. This is effectively a monitoring-only policy." |
421
422
| **`access: read-write`** when user hasn't confirmed write need | "This policy allows POST, PUT, and PATCH on all paths. If you only need to read data, `read-only` is more restrictive." |
Copy file name to clipboardExpand all lines: .agents/skills/openshell-cli/SKILL.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,11 @@ This is the most important multi-step workflow. It enables a tight feedback cycl
346
346
347
347
**Key concept**: Policies have static fields (immutable after creation: `filesystem_policy`, `landlock`, `process`) and two dynamic fields: `network_policies` and `network_middlewares`. Both dynamic fields can be updated without recreating the sandbox.
348
348
349
+
An endpoint with omitted `protocol` retains explicit-proxy behavior. Explicit
350
+
`protocol: tcp` requests policy DNS and transparent TCP and currently requires
351
+
the Docker or Podman runtime; unsupported runtimes reject the policy before starting the
352
+
workload rather than activating only part of the network contract.
Copy file name to clipboardExpand all lines: architecture/compute-runtimes.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,8 +164,8 @@ delete, reconciliation removes the row; otherwise it can remain `Deleting`.
164
164
165
165
| Runtime | Best fit | Sandbox boundary | Notes |
166
166
|---|---|---|---|
167
-
| Docker | Local development with Docker available. | Container plus nested sandbox namespace. | Uses host networking so loopback gateway endpoints work from the supervisor. |
168
-
| Podman | Rootless or single-machine deployments. | Container plus nested sandbox namespace. | Uses the Podman REST API and CDI GPU devices when available. Delivers the supervisor via OCI image volume by default; falls back to extracting the binary to a host-side cache and bind-mounting it when `userns` is configured (overlay does not support idmapped mounts). |
167
+
| Docker | Local development with Docker available. | Container plus nested sandbox namespace. | Uses host networking so loopback gateway endpoints work from the supervisor. Advertises the combined-supervisor policy-DNS and transparent-TCP substrate. |
168
+
| Podman | Rootless or single-machine deployments. | Container plus nested sandbox namespace. | Uses the Podman REST API and CDI GPU devices when available. Delivers the supervisor via OCI image volume by default; falls back to extracting the binary to a host-side cache and bind-mounting it when `userns` is configured (overlay does not support idmapped mounts). Advertises the combined-supervisor policy-DNS and transparent-TCP substrate. |
169
169
| Kubernetes | Cluster deployment through Helm. | Pod plus nested sandbox namespace. | Uses Kubernetes API objects, service accounts, secrets, PVC-backed workspace storage, and GPU resources. |
170
170
| VM | Experimental microVM isolation. | Per-sandbox libkrun VM. | Managed endpoint-backed driver. The gateway spawns `openshell-driver-vm`, waits for its Unix socket, and then consumes it through the same remote `compute_driver.proto` path used by unmanaged endpoint drivers. The VM driver boots a cached bootstrap `rootfs.ext4`, prepares requested OCI images inside a bootstrap VM with `umoci`, attaches the prepared image disk read-only, and gives each sandbox a writable `overlay.ext4` for merged-root changes and runtime material. The driver persists each accepted launch request beside the overlay and restarts those VMs on driver startup without recreating the overlay. |
171
171
| Extension | Out-of-tree drivers operated alongside the gateway. | Whatever boundary the driver implements. | Selected by a custom `compute_drivers = ["<name>"]` entry with `[openshell.drivers.<name>].socket_path`, or at launch time by pairing `--drivers <name>` with `--compute-driver-socket=<path>`. A launch-time endpoint may use a canonical built-in name to preserve its driver-config key while replacing in-process construction. The gateway connects to an operator-provisioned UDS, snapshots `GetCapabilities`, and dispatches all sandbox lifecycle calls through `compute_driver.proto`. The driver process and socket lifecycle are operator-owned; the gateway does not spawn, supervise, or remove unmanaged extension drivers. The trust boundary is the socket's filesystem permissions: the operator must ensure only the gateway uid can read/write it. |
@@ -185,6 +185,16 @@ operator override because they place gateway-host filesystem state inside the
185
185
sandbox and can negate OpenShell workspace isolation and filesystem-policy
186
186
controls. Driver-owned supervisor, token, and TLS bind mounts stay reserved.
187
187
188
+
Network features follow the existing driver/substrate split. Compute drivers
189
+
advertise only the runtime mechanics they can guarantee: namespace and
190
+
capability ownership, DNS/TCP capture installation, and coupled
191
+
restart ordering. The shared supervisor remains the sole owner of DNS
192
+
eligibility, synthetic mappings, process authorization, destination filtering,
193
+
pinned dialing, relay behavior, and OCSF decisions. Docker and Podman advertise
194
+
`policy-dns-transparent-tcp`; other runtimes reject explicit TCP policy until
195
+
they implement and validate the same complete contract. The capability marker
196
+
is driver-owned supervisor input and is removed from workload environments.
197
+
188
198
Kubernetes deployments may set an AppArmor profile on sandbox agent containers
189
199
through the driver configuration. The Helm chart defaults sandbox agents to
190
200
`Unconfined` so runtime/default AppArmor profiles do not block supervisor
Copy file name to clipboardExpand all lines: crates/openshell-driver-docker/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,7 @@ contract:
91
91
|`restart_policy = unless-stopped`| Keeps managed sandboxes resumable across daemon or gateway restarts. |
92
92
|`PidsLimit`| Enforces the sandbox PID budget at the Docker cgroup layer. Set `[openshell.drivers.docker].sandbox_pids_limit = 0` to inherit the Docker/runtime default. |
93
93
| CDI GPU request | Uses opaque `driver_config.cdi_devices` values when set; otherwise selects the requested count of NVIDIA CDI GPUs in round-robin order when daemon CDI support is detected. Docker daemon `/info` can permit `nvidia.com/gpu=all` as a WSL2 all-only compatibility fallback, where it counts as one selectable device. Exact CDI device lists must not contain duplicates and must match the effective GPU count. |
94
+
|`policy-dns-transparent-tcp` capability | Declares that the combined Docker supervisor can own namespace-local DNS/TCP capture and coupled workload restart. The shared supervisor still owns DNS eligibility, mappings, authorization, pinned dialing, relaying, and OCSF decisions. The marker is stripped from the workload environment. |
94
95
95
96
The agent child process does not retain these supervisor privileges.
0 commit comments