Skip to content

feat(openshell): add sandbox JWT auth config and certgen hook - #1819

Merged
pdettori merged 8 commits into
rossoctl:mainfrom
pdettori:feat/openshell-jwt-auth-1818
Jun 4, 2026
Merged

pdettori merged 8 commits into
rossoctl:mainfrom
pdettori:feat/openshell-jwt-auth-1818

Conversation

@pdettori

@pdettori pdettori commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Adds the gateway-side Helm templates needed for sandbox pods to authenticate via projected ServiceAccount tokens (the IssueSandboxToken bootstrap exchange from mvp-v2).

  • gateway-config.yaml — TOML ConfigMap replacing individual CLI flags/env vars with a structured config file (--config /etc/openshell/gateway.toml)
  • certgen.yaml — Pre-install/pre-upgrade hook Job that generates an Ed25519 signing keypair secret (detects existing cert-manager TLS secrets and only creates the JWT keypair)
  • rbac.yaml — ClusterRole + ClusterRoleBinding granting tokenreviews/create to the gateway SA (required for K8sServiceAccountAuthenticator)
  • statefulset.yaml — Gateway container uses --config arg; mounts gateway-config CM and jwt-keys Secret
  • values.yaml — New gatewayJwt and sandboxServiceAccount configuration sections

Closes #1818
Depends on #1814

Test plan

  • helm template renders cleanly with default values (gatewayJwt.enabled=true)
  • helm template renders cleanly with gatewayJwt.enabled=false (no JWT resources)
  • helm lint passes
  • Deploy to Kind cluster — gateway starts with JWT keys mounted
  • Gateway log shows K8sServiceAccountAuthenticator constructed
  • openshell sandbox create succeeds (supervisor establishes relay)
  • Existing OIDC auth for CLI still works

Assisted-By: Claude Code

pdettori added 8 commits June 3, 2026 22:56
- Update gateway and supervisor image tags to latest (built from mvp-v2)
- Update build-images.sh to clone mvp-v2 branch and use Dockerfile.gateway
  (the old multi-stage Dockerfile.images no longer exists upstream)
- Replace fork CLI binary downloads with upstream CLI installation
  (upstream CLI is fully compatible with mvp-v2 gateway)

Closes rossoctl#1813

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Pin to the latest published mvp-v2 image for each component rather than
using the mutable :latest tag, for reproducibility.

- gateway: mvp-v2-3a1bbea
- supervisor: mvp-v2-9a6a0ed

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
The mvp-v2 gateway no longer accepts --sandbox-namespace. The sandbox
namespace is now controlled by the compute driver (--namespace flag on
the compute-driver container). The gateway connects to drivers via UDS
configured through OPENSHELL_COMPUTE_DRIVER_SOCKET env var.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
The new driver version handles scratch-based supervisor images (no shell
required for the init container copy operation).

Fixes rossoctl#1815

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
The new compute driver uses Go's flag package which expects single-dash
flags (-flag=value) not double-dash (--flag=value). Also removes the
obsolete -dtach-binary-path flag which no longer exists.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Includes fixes for both supervisor init container (scratch image copy)
and SA token auth injection for mvp-v2 sandbox relay.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Both gateway and supervisor must be from the same commit to avoid
proto/API mismatch in the IssueSandboxToken bootstrap exchange.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…tstrap

Add the gateway-side configuration needed for sandbox pods to authenticate
via projected ServiceAccount tokens (IssueSandboxToken bootstrap exchange).

Changes:
- gateway-config.yaml: TOML ConfigMap with gateway_jwt, TLS, OIDC, and
  driver sections — replaces individual CLI flags/env vars
- certgen.yaml: pre-install hook Job that generates Ed25519 signing keypair
  (CreateJwtOnly path when cert-manager TLS secrets already exist)
- rbac.yaml: ClusterRole + ClusterRoleBinding for tokenreviews/create
  (required for K8sServiceAccountAuthenticator)
- statefulset.yaml: gateway uses --config flag, mounts gateway-config and
  jwt-keys volumes
- values.yaml: gatewayJwt (enabled by default) and sandboxServiceAccount
  configuration sections

The certgen hook detects existing TLS secrets from cert-manager and only
creates the JWT keypair secret (openshell-gateway-jwt-keys).

Closes rossoctl#1818

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update OpenShell Helm chart with mvp-v2 sandbox JWT auth and projected SA tokens

1 participant