docs(architecture): ADR-0008 — session-to-egress attribution by presented token#237
Conversation
…ed token Per-session deny policy (kill-switch denylist, downloadable-deny, rate limits) has to reach the egress edge, but nothing decided how the edge derives the session identity. Because the edge bump-terminates TLS — the guest trusts the per-deployment CA in its trust store — it holds the plaintext request and the session token the guest carries. Attribute the request to its session by the session-scoped token it presents at L7, read after bump-termination, via the native Envoy chain jwt_authn -> ext_authz -> rbac -> ratelimit -> credential_injector -> router: jwt_authn verifies the token and writes the session claim to metadata; ext_authz consults the denylist and ratelimit bounds the session on that claim; credential_injector attaches the SDS-delivered upstream credential. Injection stays gated on the presented token by filter order — auth and denylist terminate a disallowed request before the injector, which carries no per-request predicate (ADR-0007 line). The network-layer fact (netns / peer-credentials / vsock context id) is NOT the egress key: it attributes a connection to a guest and isolates sandboxes on the host-guest channel (NFR-SEC-43), a different boundary. The chain is native Envoy (ADR-0006); no custom data-plane code. Adds 0008 to the ADR index and component-06 bound ADRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR introduces Architecture Decision Record 0008 (ADR-0008) specifying that egress session attribution uses session-scoped tokens presented at L7 after TLS termination, with deny and rate-limit decisions keyed to verified token claims. The ADR is integrated into the documentation index and component references. ChangesADR-0008: Session-to-egress attribution by presented token
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Supersedes the closed #235, which mis-modelled the mechanism (it keyed egress attribution on a host-attested network fact — netns/peer-credentials/vsock CID). That conflated guest isolation (host↔guest channel, NFR-SEC-43) with egress session attribution.
Decision
Because the trust-edge bump-terminates TLS (the guest trusts the per-deployment CA's root in its trust store), Envoy holds the plaintext request and attributes it to its session by the session token presented at L7 — via the native Envoy chain:
jwt_authnverifies the token, writes the session claim to metadataext_authzconsults the denylist (revoked session?),ratelimitbounds the sessioncredential_injectorattaches the SDS-delivered upstream credentialInjection stays gated on the presented token by filter ORDER — auth/denylist terminate a disallowed request before the injector (which has no per-request predicate), satisfying the ADR-0007 gate. The session token IS the presented scoped credential ADR-0007 gates on: one L7 read serves both gates.
No custom data-plane code — all native Envoy filters (verified against envoyproxy.io). The network-layer fact (netns/peer-creds/vsock CID) is explicitly NOT the egress key — it is guest isolation on the host↔guest channel (NFR-SEC-43), a different boundary.
Verification
Cross-consistency reviewed against ADR-0007, ADR-0006, component-06, trust-boundaries §4/§7, threat-model P6-E2, and the cited NFRs: CONSISTENT, no contradiction. The two cross-review WARNINGs (FLEX-15 anchor on the bump rung; the token-is-the-scoped-credential statement) are folded in. Adds 0008 to the ADR index and component-06 bound ADRs.
Deferred (not blocking): naming the deny/rate filters in component-06's own spec (the chain currently lives in the ADR).
🤖 Generated with Claude Code
Summary by CodeRabbit