feat(orchestrator): slice 13c(vii) — stable shared gateway CA #377

Closed
didericis-claude wants to merge 1 commits from orchestrator-gateway-ca into orchestrator-consolidated-launch
Collaborator

Sub-slice of slice 13c — the one genuine design piece in the cut-over: a single CA every agent trusts.

The consolidated gateway TLS-intercepts every bottle's egress, so all agents must trust one CA (per-bottle each had its own host-generated CA). Rather than host-generate + mount one, this lets the gateway's own mitmproxy generate its CA into a persistent named volume and extracts the cert for agents — no host openssl, and gateway.py stays lean.

Changes

  • DockerGateway mounts GATEWAY_CA_VOLUME at /home/mitmproxy/.mitmproxy, so the self-generated CA survives container recreation — it must not rotate, or already-launched agents would stop trusting the gateway.
  • ca_cert_pem() reads the CA cert (PEM) out of the running gateway (docker exec cat mitmproxy-ca-cert.pem); the agent-launch installs this into the agent's trust store so it accepts the gateway's bumped CONNECT certs.

Verification

pyright 0 errors, pylint 9.83/10 (changed files 10.00), unit suite green (the 13 test_sidecar_init /bin/sleep errors are pre-existing NixOS-local noise). New tests: runs with the persistent CA volume, ca_cert_pem reads the container path, raises when absent.

Stacked on #376.

🤖 Generated with Claude Code

Sub-slice of **slice 13c** — the one genuine design piece in the cut-over: a **single CA every agent trusts**. The consolidated gateway TLS-intercepts every bottle's egress, so all agents must trust one CA (per-bottle each had its own host-generated CA). Rather than host-generate + mount one, this lets the gateway's own **mitmproxy generate its CA into a persistent named volume** and extracts the cert for agents — no host openssl, and `gateway.py` stays lean. ### Changes - `DockerGateway` mounts `GATEWAY_CA_VOLUME` at `/home/mitmproxy/.mitmproxy`, so the self-generated CA **survives container recreation** — it must not rotate, or already-launched agents would stop trusting the gateway. - `ca_cert_pem()` reads the CA cert (PEM) out of the running gateway (`docker exec cat mitmproxy-ca-cert.pem`); the agent-launch installs this into the agent's trust store so it accepts the gateway's bumped CONNECT certs. ### Verification pyright **0 errors**, pylint **9.83/10** (changed files 10.00), unit suite green (the 13 `test_sidecar_init` `/bin/sleep` errors are pre-existing NixOS-local noise). New tests: runs with the persistent CA volume, `ca_cert_pem` reads the container path, raises when absent. Stacked on #376. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
didericis-claude added 1 commit 2026-07-13 22:12:20 -04:00
feat(orchestrator): slice 13c(vii) — stable shared gateway CA
lint / lint (push) Successful in 2m4s
test / unit (pull_request) Successful in 1m2s
test / integration (pull_request) Successful in 20s
test / coverage (pull_request) Successful in 1m13s
389a2c10ce
The consolidated gateway TLS-intercepts every bottle, so all agents must
trust ONE CA. Rather than host-generate + mount a CA, let the gateway's own
mitmproxy generate its CA into a persistent named volume and extract the
cert for agents — no host openssl, keeps gateway.py lean.

- DockerGateway mounts GATEWAY_CA_VOLUME at /home/mitmproxy/.mitmproxy so the
  self-generated CA survives container recreation (it must not rotate, or
  already-launched agents would stop trusting the gateway).
- ca_cert_pem(): read the CA cert (PEM) out of the running gateway
  (docker exec cat mitmproxy-ca-cert.pem) — the agent installs this into its
  trust store to accept the gateway's bumped certs.

pyright 0 errors; pylint 9.83/10; unit suite green (the 13 test_sidecar_init
/bin/sleep errors are pre-existing NixOS-local noise).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBMWTEtQdJ4W5UrWuLHCck
Author
Collaborator

Collapsed into the single stack PR #380 (per-host orchestrator, PRD 0070). Closing this slice PR; review + merge happens on #380.

Collapsed into the single stack PR #380 (per-host orchestrator, PRD 0070). Closing this slice PR; review + merge happens on #380.
didericis-claude closed this pull request 2026-07-14 00:57:45 -04:00
Some checks are pending
lint / lint (push) Successful in 2m4s
test / unit (pull_request) Successful in 1m2s
test / integration (pull_request) Successful in 20s
test / coverage (pull_request) Successful in 1m13s

Pull request closed

Sign in to join this conversation.