8000 docs(spikes): measure whether clients send a sealed handle unmodified by norrietaylor · Pull Request #2327 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(spikes): measure whether clients send a sealed handle unmodified - #2327

Merged
norrietaylor merged 1 commit into
mainfrom
docs/sp1-sealed-handle-bearer-clients
Oct 19, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
docs/sp1-sealed-handle-bearer-clients

Conversation

@norrietaylor
Copy link
Copy Markdown
Member

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 a proxy_env box is: HTTPS_PROXY plus 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:

Client and setting Header Value as sent
Claude Code, ANTHROPIC_API_KEY x-api-key the handle
Claude Code, ANTHROPIC_AUTH_TOKEN / CLAUDE_CODE_OAUTH_TOKEN Authorization Bearer <handle>
Claude Code as MCP client (Linear, Cloudflare / Sentry) Authorization Bearer <handle> / Sentry-Bearer <handle>
mcp-remote with NODE_USE_ENV_PROXY=1 Authorization Bearer <handle>
Python MCP SDK Authorization the value it was given

This 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:

  1. The anthropic preset (BEP-079) fits only the token variables. With ANTHROPIC_API_KEY, Claude Code sends the key in x-api-key with no prefix. The preset names Authorization with a Bearer prefix, so a handle set as ANTHROPIC_API_KEY goes upstream unsubstituted.
  2. proxy_env steering misses Node clients that use the built-in fetch. mcp-remote ignored HTTPS_PROXY until NODE_USE_ENV_PROXY=1 was 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-prose on the write-up: 0 alerts.
  • The committed results hold no handle and no other credential value. For a value other than the handle, each row records only its length and a short hash.

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.
@coderabbitai
coderabbitai Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 73f8ea8b-d429-4643-a804-3d81e17efa34
📥 Commits

Reviewing files that changed from the base of the PR and between 0a297d0 and bba7a69.

📒 Files selected for processing: 13
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients.md
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/make-handle.py
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/py_mcp_client.py
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/cc-api-key.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/cc-auth-token.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/cc-mcp.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/cc-oauth-token.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/node-steer-envproxy.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/py-linear.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/py-sentry.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/results/py-steer.jsonl
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/run.py
  • docs/spikes/2026-10-20-sealed-handle-bearer-clients/standin.py
+---------------------------------------------------------------------------------------------------+
| Test your software, or your users will. Test ruthlessly. Don't make your users find bugs for you. |
+---------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as ready for review October 19, 2026 00:29
@norrietaylor
norrietaylor requested a review from a team as a code owner October 19, 2026 00:29
@norrietaylor
norrietaylor merged commit dedbf2c into main Oct 19, 2026
34 of 35 checks passed
@norrietaylor
norrietaylor deleted the docs/sp1-sealed-handle-bearer-clients branch October 19, 2026 00:29
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

0