Skip to content

chore(sandbox-kit): use egress proxy credential injection for the Chainloop token #3836

Open

Description

@migmartri

Context

The Docker Sandboxes kit in devel/sandbox-kit/ (published as chainloop/sbx-kit-claude) passes the Chainloop token into the sandbox VM as a value (chainloopToken kit arg / CHAINLOOP_TOKEN env var), or adopts a mounted config.toml. We did this because the sbx egress proxy could not inject credentials for our hosts: to rewrite a header it terminates TLS, and its intercepted path did not negotiate the h2 ALPN. chainloop trace talks gRPC to the control plane, and grpc-go aborts with missing selected ALPN property. So the kit keeps the Chainloop hosts on NO_PROXY and documents why sbx secret set and secrets: in sbxenv.yaml must not be used.

Upstream now indicates this limitation is fixed: docker/sbx-releases#574

Goal

Verify that proxy-managed credential injection now works for the Chainloop CLI, and if so, move the kit and its documentation to that model, so the real token never lives inside the VM.

Scope

  • Verify with a current sbx build that the intercepted proxy path negotiates h2 for the Chainloop hosts (the kit already documents the check: curl -sv --http2 --proxy "$HTTPS_PROXY" https://cp.chainloop.dev/ must show the "Docker Sandboxes Proxy CA" issuer and still negotiate h2).
  • Verify an end-to-end chainloop trace session (gRPC to control plane and CAS, attestation push on git push) with the token injected by the egress proxy (sbx secret set / set-custom, or a secrets: entry in sbxenv.yaml) and only a placeholder inside the VM.
  • If it works, update the kit:
    • devel/sandbox-kit/claude/spec.yaml: add a credentials: entry for the Chainloop hosts, remove them from NO_PROXY/no_proxy, and revisit the chainloopToken arg and the wrapper's credential check (it must still refuse to start without credentials).
    • sbxenv.yaml: replace the --env-arg chainloopToken flow and the "never bind a Chainloop host to a credential" guidance.
    • Decide what to do with the chainloopConfig (mounted config.toml) path.
    • Note the minimum sbx version required, and re-check the "Why nightly" section (schema v2: child setup block drops parent setup commands in extends: claude kits docker/sbx-releases#415) against the current stable release.
  • Update the documentation to match: devel/sandbox-kit/README.md (including "Why the token is passed in, and not stored in sbx's secret manager" and the "Which to use" table) and the docs guide at https://docs.chainloop.dev/guides/docker-sandboxes.
  • If it does not work yet, record the result and the sbx version tested in this issue, and keep the current approach.

🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri

Activity

  1. migmartri commented on Nov 20, 2026

    @migmartri
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions