Skip to content

Add OpenShell sandbox Helm charts with per-user access control - #1

Closed
sauagarwa wants to merge 6 commits into
mainfrom
feat/openshell-charts
Closed

Add OpenShell sandbox Helm charts with per-user access control#1
sauagarwa wants to merge 6 commits into
mainfrom
feat/openshell-charts

Conversation

@sauagarwa

Copy link
Copy Markdown
Collaborator

Summary

  • Add Helm charts for deploying per-user OpenShell agent sandboxes on OpenShift Virtualization (KubeVirt)
  • Per-user access control via openresty auth proxy that validates JWT preferred_username matches sandbox owner
  • OIDC authentication with any provider (Keycloak, Okta, Entra ID, corporate SSO)
  • Configurable namespace modes: shared (default, scales to thousands) or per-user (saw-<username>)
  • Interactive owner detection from OIDC token with override prompt
  • openshell CLI integration (gateway add, login, sandbox list)
  • Admin provisioning CLI (openshell-saw) for cluster operations
  • E2E test scripts for access control (13 checks) and multi-user isolation (14 checks)

Charts

Chart Description
openshell-sandbox Per-user sandbox VM with access control proxy
openshell-gateway Master gateway VM and snapshot
openshell-gateway-image Pre-baked gateway VM disk image (containerDisk)
openshell-keycloak Optional OIDC provider for development
nemoclaw-imagestream NemoClaw sandbox image builder
nemoclaw-cli-imagestream NemoClaw CLI image builder

User Flow

oc login ...                              # Login to OpenShift
make login                                # Authenticate with OIDC provider
make sandbox-create SANDBOX_NAME=my-sb \  # Provision sandbox (owner auto-detected)
  PROVIDER=gemini MODEL=gemini-2.5-flash API_KEY=<key>
make openshell-configure-gateway SANDBOX_NAME=my-sb  # Configure openshell CLI
openshell gateway login                   # OIDC login via openshell CLI
openshell sandbox list                    # Use sandbox

Test plan

  • helm lint charts/openshell-sandbox passes with and without access control
  • scripts/test-access-control.sh — 13 checks: provisions alice/bob sandboxes, verifies cross-user 403 blocking
  • scripts/test-multiuser-isolation.sh — 14 checks: namespace-per-user isolation
  • Manual: alice can access her gateway, bob gets 403 on alice's gateway
  • Manual: unauthenticated requests get 401

🤖 Generated with Claude Code

sauagarwa and others added 6 commits July 28, 2026 13:22
Helm charts for deploying per-user OpenShell agent sandboxes on
OpenShift Virtualization (KubeVirt) with OIDC authentication and
per-user access control.

Charts:
- openshell-sandbox: per-user sandbox VM with access control proxy
- openshell-gateway: master gateway VM and snapshot
- openshell-gateway-image: pre-baked gateway VM disk image
- openshell-keycloak: optional OIDC provider for development
- nemoclaw-imagestream: NemoClaw sandbox image builder
- nemoclaw-cli-imagestream: NemoClaw CLI image builder

Key features:
- Per-user access control via openresty auth proxy that validates
  JWT preferred_username matches the sandbox owner
- Configurable namespace modes: shared (default) or per-user
- OIDC authentication with any provider (Keycloak, Okta, Entra ID)
- Interactive owner detection from OIDC token with override prompt
- openshell CLI integration (gateway add, login, sandbox management)
- E2E test scripts for access control and multi-user isolation

CLI:
- openshell-saw admin provisioning tool for cluster operations
- Users interact via upstream openshell CLI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add make login step to user flow (OIDC auth before sandbox creation)
- Fix access control docs: openresty auth proxy, not oauth2-proxy
- Update accessControl values (remove cookieSecret, correct image)
- Reorder quick starts: containerDisk first (simpler, no gateway needed)
- Add teardown section
- Rename title to Secure Agent Workspace

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep only scripts referenced by charts and Makefile:
oidc-login.sh, test-access-control.sh, test-multiuser-isolation.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The openshell CLI uses a random port for the OIDC callback. Allow
http://localhost:* and http://127.0.0.1:* as redirect URIs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Edge TLS termination strips HTTP/2 ALPN negotiation, breaking gRPC
connections from the openshell CLI. The gateway route now always uses
passthrough so the gateway VM handles TLS directly. The auth proxy is
retained for the dashboard route (HTTP/1.1) only, with its upstream
updated to the dashboard port (18789).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the virt-customize/libguestfs pipeline with a bootc Containerfile
based on quay.io/fedora/fedora-bootc:44. CDI on OpenShift 4.16+ imports
bootc images directly into golden image PVCs — no qcow2 wrapping needed.

Remove the snapshot workflow entirely (master VM + VirtualMachineSnapshot +
VirtualMachineClone). Sandboxes now always clone from the bootc golden image.

Key changes:
- buildconfig.yaml: single-stage bootc Containerfile (no libguestfs)
- Deleted snapshot-job, snapshot-cleanup, snapshot-rbac templates
- Deleted virtualmachineclone.yaml (snapshot-only)
- Simplified cloud-init, Makefile, RBAC, and test templates
- Added scripts/test-bootc-e2e.sh for end-to-end validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sauagarwa

Copy link
Copy Markdown
Collaborator Author

Superseded by feat/validated-pattern-integration which includes all these changes plus validated pattern integration, operator-based Keycloak, ESO secrets, and repo reorganization.

@sauagarwa sauagarwa closed this Jul 29, 2026
@sauagarwa
sauagarwa deleted the feat/openshell-charts branch July 29, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant