Repository navigation
fix(openshell): non-zero GID for the sandbox image - #126
Merged
Merged
Conversation
OpenShell refuses to start a sandbox whose workload identity carries a zero UID or GID: descriptor error: workload identity must not contain UID or GID zero Containerfile.openshell declared USER 1001:0 for the OpenShift gid-0 convention, so every sandbox created from the -openshell image failed at creation. Use 1001:1001 for the user and for the workspace owner. Verified against a live OpenShell 0.1.6 gateway: the image builds, a sandbox from it reaches Ready, runs as uid=1001 gid=1001, and /workspace is writable. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
3 tasks
pavelanni
marked this pull request as ready for review
November 9, 2026 16:31
3 tasks
pavelanni
added a commit
that referenced
this pull request
Nov 9, 2026
* docs(zero-trust): add the v0.21 release test plan Test plan for the zero-trust v2 line from db32804, tiered by what the automated suite cannot reach: real provider wire format, the OpenShell sandbox boundary, release artifacts, and regression of the features the zero-trust work touched. Records the first live runs against the Zero Trust Agents v2 stack, where scenario 1 passes with DocsClaw as the agent, and three findings: the GID-0 image defect (#126), the missing tar that broke sandbox upload (#127), and the 30-minute demo subject token that turns a document fetch into a bare 502 while the LLM path stays healthy. It also corrects the source-derived expectation that a failed exchange surfaces as token_grant_failed. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]> * docs(zero-trust): fix execution errors in the release test plan Review findings, each verified against the code before changing it: - Every command now uses "${OS[@]}". A bare $OS expands only the first element and drops --gateway-endpoint, so the plan's own commands would have hit the unreachable stored zt2 endpoint. - The docsclaw service defaults to port 8000 and health port 8100 (internal/config/config.go). Probes used 8180, which has no listener; confirmed by running serve and checking 8100/8180/8081. - T3.5 served from /config/agent-b, which cannot exist in a sandbox. - internal/egress names no 502 code: it prints a JSON "error" field when present and falls back to the status text. The expectations now say that, and record what the body actually contains. - Paths are marked as belonging to the v2 checkout or to docsclaw, since both have scripts/, deploy/ and internal/. - Scenario 4 was missing from the T3 table. Also found while verifying: ask and serve fail outside the image with "mkdir /workspace: read-only file system", so every local invocation now passes --workspace to a writable directory. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]> * docs(zero-trust): fix the second review round on the test plan - T3.1 used doc_endpoint_host, doc_endpoint_port and doc_allowed_ips_subst without loading them. Source scripts/lib.sh from the v2 checkout first, which is also where the OS array comes from. - T3.2 uploads /tmp/dc-sandbox-config into /workspace, so it lands at /workspace/dc-sandbox-config; T3.3 and T3.5 now use the paths the upload actually produces, with T3.5's upload spelled out. - T1.5's probes assert a status code and a WWW-Authenticate header, so they need curl -i; -s alone prints only the body. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]> --------- Signed-off-by: Pavel Anni <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Containerfile.openshelldeclaredUSER 1001:0, and OpenShell refuses to starta sandbox whose workload identity carries a zero UID or GID:
Every sandbox created from the
-openshellimage therefore failed at creation,which blocks the v2 zero-trust demo. The image now uses
1001:1001for theruntime user and for the
/workspaceowner.Why gid 0 was there
1001:0is the OpenShift arbitrary-UID convention: group 0 owns the files so arandom UID can still write. OpenShell treats a zero GID as a privilege signal in
the workload identity, so the convention does not apply inside a sandbox.
Verification
Against a live OpenShell 0.1.6 gateway (zt2, podman driver):
make image-openshellbuilds;podman image inspectreportsuser=1001:1001.podman run --rm … id→uid=1001(1001) gid=1001(1001).openshell sandbox create --from <image>reachesReady(previously failedwith the descriptor error),
idin the sandbox matches, andtouch /workspace/probesucceeds.docsclaw ask --config-dir /workspace/configfetched adocument through the supervisor's token exchange (end-to-end scenario 1 of the
v2 demo).
Test plan
make image-openshell && podman run --rm docsclaw:dev-openshell idshowsgid=1001ReadyFixes the image blocker found in T3 of the release test plan.
🤖 Generated with Claude Code