Skip to content

fix(sandbox): real creds when no tls:terminate#528

Open
ericcurtin wants to merge 1 commit intoNVIDIA:mainfrom
ericcurtin:credsfix
Open

fix(sandbox): real creds when no tls:terminate#528
ericcurtin wants to merge 1 commit intoNVIDIA:mainfrom
ericcurtin:credsfix

Conversation

@ericcurtin
Copy link

Summary

Without a tls: terminate endpoint in the sandbox policy, the proxy cannot intercept HTTPS traffic to rewrite credential placeholders in request headers. Placeholder values reached upstream APIs verbatim, causing 401 errors and immediate process exit (e.g. openshell sandbox create -- claude exiting right after the Claude Code wizard appeared).

Related Issue

N/A

Changes

  • Skip placeholder mechanism when policy has no tls: terminate endpoints; pass real provider credentials directly to child process
  • Emit a warning log directing operators to add protocol: rest and tls: terminate to HTTPS endpoints for secure credential rewriting
  • Add has_tls_terminate_endpoints field to SandboxPolicy populated from the proto network policy at startup
  • Update testdata/sandbox-policy.yaml to configure api.anthropic.com:443 with correct protocol, tls, and enforcement fields

Testing

  • mise run pre-commit passes
  • Unit tests added/updated (285 pass, 0 failed)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Without a `tls: terminate` endpoint in the sandbox policy, the proxy
cannot intercept HTTPS traffic to rewrite credential placeholders in
request headers. Placeholder values reached upstream APIs verbatim,
causing 401 errors and immediate process exit (e.g. `openshell sandbox
create -- claude` exiting right after the Claude Code wizard appeared).

N/A

- Skip placeholder mechanism when policy has no `tls: terminate`
  endpoints; pass real provider credentials directly to child process
- Emit a warning log directing operators to add `protocol: rest` and
  `tls: terminate` to HTTPS endpoints for secure credential rewriting
- Add `has_tls_terminate_endpoints` field to `SandboxPolicy` populated
  from the proto network policy at startup
- Update `testdata/sandbox-policy.yaml` to configure
  `api.anthropic.com:443` with correct `protocol`, `tls`, and
  `enforcement` fields

- [x] `mise run pre-commit` passes
- [x] Unit tests added/updated (285 pass, 0 failed)
- [ ] E2E tests added/updated (if applicable)

- [x] Follows Conventional Commits
- [ ] Commits are signed off (DCO)
- [ ] Architecture docs updated (if applicable)

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@ericcurtin ericcurtin requested a review from a team as a code owner March 21, 2026 16:19
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