Repository navigation
docs(spikes): measure whether clients send a sealed handle unmodified - #2327
Merged
Merged
Conversation
SP1 of the box egress proxy plan. A local TLS stand-in recorded the request heads of Claude Code (API key, auth token and sign-in token), Claude Code as an MCP client, mcp-remote and the Python MCP SDK, each given a 484-character opaque handle. Every client sent it unchanged in the configured header, with no shape check. Two spec gaps came out of it: Claude Code sends an ANTHROPIC_API_KEY in x-api-key with no prefix, which the anthropic preset does not fit, and Node's built-in fetch ignores HTTPS_PROXY unless NODE_USE_ENV_PROXY=1 is set.
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 13
✨ Finishing Touches
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is the write-up for spike SP1, #2257, in the BEP plan (#1501). The question: does each intended client send the sealed handle unmodified, in the header the store rule names?
A local TLS stand-in (
mitmproxy, HTTP/1.1 only, forwarding nothing) recorded each request's head. Each client got a 484-character opaque handle shaped like a compact signed token, and its traffic was steered the way aproxy_envbox is:HTTPS_PROXYplus the CA in the trust variables.Result
The hypothesis holds. No client checks the token's shape, and each sends the handle byte for byte in the header it was given:
ANTHROPIC_API_KEYx-api-keyANTHROPIC_AUTH_TOKEN/CLAUDE_CODE_OAUTH_TOKENAuthorizationBearer <handle>AuthorizationBearer <handle>/Sentry-Bearer <handle>NODE_USE_ENV_PROXY=1AuthorizationBearer <handle>AuthorizationThis settles the open question on client acceptance. The injection task, #2292, can use the handle as it is.
Spec gaps found
Neither gap is about the handle:
anthropicpreset (BEP-079) fits only the token variables. WithANTHROPIC_API_KEY, Claude Code sends the key inx-api-keywith no prefix. The preset namesAuthorizationwith aBearerprefix, so a handle set asANTHROPIC_API_KEYgoes upstream unsubstituted.proxy_envsteering misses Node clients that use the built-infetch. mcp-remote ignoredHTTPS_PROXYuntilNODE_USE_ENV_PROXY=1was set. BEP-012 should set that variable.The write-up lists both as action items. They need a spec change, which this PR doesn't make.
Checks
just lint-proseon the write-up: 0 alerts.