Skip to content

feat(agent): node-level CONNECT-terminating listener (R2 PR 3/6) - #85

Merged
bpalermo merged 1 commit into
mainfrom
feat/r2-dest-connect-listener
Jun 8, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/r2-dest-connect-listener

Conversation

@bpalermo

@bpalermo bpalermo commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Stack

Targets feat/r2-node-svid; rebase onto main once #84 merges.

What

Adds the node-level CONNECT-terminating listener — the R2 tunnel ingress. Peer node proxies open an mTLS HTTP/2 CONNECT tunnel to it; it routes each tunnel by :authority (the destination pod's IP) to that pod's app_<pod> cluster, delivering the decrypted stream to the app on loopback. A non-tunneled GET /-/-/node/live is answered locally with 200 for peer reachability health checks.

Safety: additive

  • Node-level on host port 15008, separate from the per-pod R1 inbound on 18080. The live mesh is undisturbed; clients are flipped over in PR 4.
  • Downstream mTLS presents the node identity (PR 2) and validates the caller's workload SVID; the verified client pod is exposed to the app via XFCC (SANITIZE_SET + URI) — matching the identity model proven in the spike (dest sees the client pod, not the node).

Wiring

  • The SPIRE bridge notifies the cache of the node SPIFFE ID via NodeIdentitySink once the node SVID is served; until then the listener is omitted.
  • The route table is rebuilt from the cached local pods on every pod add/remove.

Tests

New connectlistener tests (CONNECT routing, per-pod IP→app-cluster, node-live, mTLS, no-identity → nil); full agent suite (12/12) passes.

🤖 Generated with Claude Code

Base automatically changed from feat/r2-node-svid to main June 8, 2026 14:55
Round 2 (PR 3/6): add the node-level CONNECT listener that receives HBONE-style
mTLS tunnels from peer node proxies and routes each by its :authority (the
destination pod's IP) to that pod's app cluster, delivering the decrypted stream
to the pod's application on loopback. A non-tunneled GET on /-/-/node/live is
answered locally with 200 for peer reachability health checks.

The listener is additive — node-level on host port 15008, separate from the
per-pod R1 inbound listeners on 18080 — so the tunnel data path is introduced
without disturbing the live mesh. Its downstream mTLS presents the node identity
(PR 2) and validates the caller's workload SVID; the verified client pod is
exposed to the application via XFCC (SANITIZE_SET + URI).

The SPIRE bridge notifies the cache of the node SPIFFE ID once the node SVID is
served (NodeIdentitySink); until then the listener is omitted. The route table is
rebuilt from the cached local pods on every pod add/remove.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@bpalermo
bpalermo force-pushed the feat/r2-dest-connect-listener branch from 673ec34 to 34ac3de Compare June 8, 2026 14:56
@bpalermo
bpalermo merged commit f8bcae5 into main Jun 8, 2026
19 checks passed
@bpalermo
bpalermo deleted the feat/r2-dest-connect-listener branch June 8, 2026 15:03
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