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>
@johntmyers
Copy link
Collaborator

Thank you. Yes we've been discussing this. I created #533 which would solve for this as well.

@johntmyers
Copy link
Collaborator

We do not want to accept the risk of having secrets available to the child process and there are other corner cases where the manual setting of TLS termination has caused connection failures.

@johntmyers johntmyers assigned johntmyers and unassigned johntmyers Mar 21, 2026
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.

2 participants