Skip to content

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

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

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

Conversation

@ericcurtin
Copy link

@ericcurtin ericcurtin commented Mar 21, 2026

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 15:56
@github-actions
Copy link

Thank you for your interest in contributing to OpenShell, @ericcurtin.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions github-actions bot closed this Mar 21, 2026
@github-actions
Copy link

github-actions bot commented Mar 21, 2026

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@ericcurtin
Copy link
Author

I have read the DCO document and I hereby sign the DCO.

@ericcurtin
Copy link
Author

recheck

@ericcurtin ericcurtin deleted the credsfix branch March 21, 2026 23:35
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