Skip to content

fix: inject OPENSHELL_K8S_SA_TOKEN_FILE env for supervisor auth#6

Merged
pdettori merged 1 commit into
mvpfrom
fix/sandbox-sa-token-env
Jun 4, 2026
Merged

fix: inject OPENSHELL_K8S_SA_TOKEN_FILE env for supervisor auth#6
pdettori merged 1 commit into
mvpfrom
fix/sandbox-sa-token-env

Conversation

@pdettori
Copy link
Copy Markdown

@pdettori pdettori commented Jun 4, 2026

Summary

  • Inject OPENSHELL_K8S_SA_TOKEN_FILE=/var/run/secrets/kubernetes.io/serviceaccount/token into sandbox agent container env
  • The mvp-v2 supervisor uses this token to authenticate back to the gateway via IssueSandboxToken

Without this env var, the supervisor fails with:

no sandbox token source available — set one of OPENSHELL_SANDBOX_TOKEN, OPENSHELL_SANDBOX_TOKEN_FILE, or OPENSHELL_K8S_SA_TOKEN_FILE

The K8s SA token is already mounted by default — the supervisor just needs to be told where to find it.

Fixes: kagenti/kagenti#1815

Test plan

  • Unit test added (TestBuildSandboxSpec_SATokenEnv)
  • Full test suite passing (19 tests)
  • Deploy and verify sandbox creation + relay session works

Assisted-By: Claude Code

The mvp-v2 supervisor requires a token to authenticate back to the
gateway via IssueSandboxToken. The K8s service account token is already
mounted at the default path, but the supervisor needs the env var to
know where to find it.

Fixes: kagenti/kagenti#1815

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@pdettori pdettori merged commit 8aea7a6 into mvp Jun 4, 2026
4 checks passed
@pdettori pdettori deleted the fix/sandbox-sa-token-env branch June 4, 2026 14:32
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