Repository navigation
Description
Executive summary. Agent-to-agent calls can traverse two AuthBridge sidecars over plaintext pod-network HTTP — exposing injected Authorization headers — whenever no service mesh is present. This epic makes AuthBridge provide its own encrypted, mutually authenticated transport between bridges using SPIRE X.509 SVIDs, with permissive→strict rollout and optional topology-based peer authorization. The core transport layer is already merged (Phase 1); the remaining work is productization: documentation and runbooks, MultiAgent-topology SPIFFE allowlists, CI proof of encrypted hops, observability, and mesh coexistence. The outcome is verifiable, mesh-free mTLS between agents that operators can adopt incrementally and prove in CI.
Epic: Secure mTLS Communication Between Agents via AuthBridge
Problem
Agent-to-agent calls in Kagenti often traverse two AuthBridge sidecars — caller outbound (forward proxy) and callee inbound (reverse proxy). Without a service mesh, that hop can be plaintext HTTP on the pod network, including any Authorization headers injected by token exchange. Even with Istio ambient mesh, operators running mesh-free or proxy-sidecar-only topologies need AuthBridge itself to provide encrypted, mutually authenticated transport between bridges.
The goal is not MITM or TLS interception for policy — it is transport-layer security: AuthBridge A talks to AuthBridge B over mTLS using SPIRE X.509 SVIDs, with optional topology-based authorization on peer SPIFFE IDs.
What already shipped (do not re-implement)
Phase 1 transport mTLS is implemented and merged on the authbridge binary and operator path:
| Layer | Status | Reference |
|---|---|---|
AuthBridge proxy/lite listeners consume SPIRE SVIDs; mtls.mode permissive | strict |
MERGED | kagenti-extensions#424 |
AgentRuntime.spec.mtlsMode; per-agent ConfigMap mtls: block; SPIRE auto-enable |
MERGED | kagenti-operator#369 |
UI + backend validation (mtlsMode incompatible with envoy-sidecar) |
MERGED | kagenti#1627 |
| Demo: caller/callee pods, Makefile, wire verification scripts | MERGED | authbridge/demos/mtls/ in kagenti-extensions |
Trust model in v1: any peer with a cert from the SPIRE trust bundle may connect; no SPIFFE-ID allowlist at the transport layer (per-caller policy is a plugin concern via pctx.PeerCertificate()).
This epic tracks productization, policy integration, testing, and mesh coexistence — not re-building the TLS stack.
Architecture: AuthBridge ↔ AuthBridge
Typical agent-to-agent flow when both workloads use proxy-sidecar (or lite) mode:
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ Agent A pod │ │ Agent B pod │
│ app → localhost:forward │ mTLS │ reverse :8080 → app │
│ (AuthBridge outbound) │ ──────► │ (AuthBridge inbound) │
│ SPIFFE: .../agent-a │ SVIDs │ SPIFFE: .../agent-b │
└─────────────────────────────┘ └─────────────────────────────┘
| Hop | Component | mTLS role |
|---|---|---|
| App → local proxy | Forward proxy (127.0.0.1) |
Plaintext loopback (unchanged) |
| Proxy → remote reverse proxy | Forward proxy DialContext |
Client mTLS (presents caller SVID) |
| Remote → app | Reverse proxy listener | Server mTLS (presents callee SVID, verifies caller) |
Modes (Istio PeerAuthentication vocabulary):
mtls.mode |
Outbound (A→B) | Inbound (B accepts A) |
|---|---|---|
| (absent / disabled) | Plaintext | Plaintext |
permissive |
Try TLS; on handshake failure → plaintext + WARN | Byte-peek: TLS or plaintext on same port |
strict |
TLS or fail | TLS only |
Rollout pattern: namespace or per-agent permissive → monitor mode=permissive fallback WARNs → promote to strict.
Not in scope for transport mTLS: token exchange inside an established TLS tunnel to external APIs (e.g. https://api.github.com) — tracked under #1552 and kagenti-extensions#184.
Relationship to existing epics
| Epic / issue | Relationship |
|---|---|
| #1552 TLS-Aware AuthBridge | Sibling — #1552 Phase 2 covers SPIFFE lifecycle + agent-to-agent identity at platform level; this epic owns bridge-to-bridge wire security and operator/UI rollout for mtlsMode. |
| #1568 IdP portability & split trust | Complements — JWT path for user→agent; mTLS + topology allowlist for agent→agent MVP aligns with Option A in that epic. |
| #1187 Modular AuthBridge | Parent — mesh-free mTLS via SPIFFE when no Istio is a WS-1 deliverable. |
| kagenti-extensions#405 | Superseded by rossoctl/cortex#424 for core feature; close or reparent rossoctl/cortex#405 to this epic's remaining items. |
| #1428 Lean AuthBridge Default | Prerequisite — proxy-sidecar + HTTP_PROXY is the mode where mTLS between bridges applies. |
Scope
In scope
- Documentation & operator runbooks — enable mTLS for agent-to-agent in mesh-free clusters; permissive→strict rollout; plaintext-Authorization caveat in permissive inbound.
- MultiAgent topology allowlist — enforce caller SPIFFE ID against
MultiAgentCRD edges at proxy (coordination with #1568, ADR-0003). - E2E & CI — Kind job: two agents,
mtlsMode: strict, tcpdump or openssl s_client proves encrypted bridge-to-bridge hop; negative tests for strict rejection. - Observability — expose mTLS handshake / fallback metrics via
/statsand OTel (deferred in feat(authbridge): mTLS between proxy-sidecar listeners via SPIRE X.509 SVIDs cortex#424 Phase 2). - UI / API completeness — display resolved
mtlsModeon agent detail; TUI parity with Import Agent form. - envoy-sidecar path — SDS/mTLS for unified Envoy mode (called out as out-of-scope in feat(ui): Add mtlsMode select to AgentRuntime create form #1627 / feat(authbridge): mTLS between proxy-sidecar listeners via SPIRE X.509 SVIDs cortex#424).
Out of scope (initial)
- MITM TLS termination for external SaaS APIs (see epic: TLS-Aware AuthBridge — Token Exchange and Policy Enforcement for Encrypted Agent Traffic #1552 CONNECT / pre-flight exchange).
- Per-route asymmetric inbound/outbound mTLS modes (feat(authbridge): mTLS between proxy-sidecar listeners via SPIRE X.509 SVIDs cortex#424 Phase 2).
- Cross-trust-domain federation pinning (feat(authbridge): mTLS between proxy-sidecar listeners via SPIRE X.509 SVIDs cortex#424 Phase 2).
Progress tracker
Phase 1: Transport mTLS (AuthBridge ↔ AuthBridge) — DONE
| Item | Status | Reference |
|---|---|---|
| SPIRE SVID consumption on forward + reverse listeners | MERGED | rossoctl/cortex#424 |
mtls: config block + permissive/strict semantics |
MERGED | rossoctl/cortex#424 |
Operator spec.mtlsMode + ConfigMap render + webhook |
MERGED | rossoctl/operator#369 |
UI mtlsMode on Import Agent + backend validation |
MERGED | #1627 |
demos/mtls Makefile + verify scripts |
MERGED | kagenti-extensions |
Phase 2: Policy, topology, and product hardening
| Item | Status | Reference |
|---|---|---|
| SPIFFE peer allowlist from MultiAgent topology | NEW | ADR-0003, #1568 |
Document agent-to-agent mTLS in docs/authbridge/ + identity guide |
NEW | — |
| Kind CI: strict mTLS E2E between two AgentRuntimes | NEW | rossoctl/cortex#424 Phase 4 |
/stats + OTel for mTLS handshakes / permissive fallbacks |
NEW | rossoctl/cortex#424 Phase 2 |
Agent detail UI: show resolved mtlsMode |
NEW | deferred in #1627 |
| Close/reparent rossoctl/cortex#405 | NEW | — |
Phase 3: Envoy-sidecar and advanced posture
| Item | Status | Reference |
|---|---|---|
| envoy-sidecar mTLS via SDS in meta-chart | NEW | #1627 out-of-scope |
mtls.min_version knob; expected-trust-domain pinning |
NEW | rossoctl/cortex#424 Phase 2 |
| Ambient mesh detection / auto-disable duplicate mTLS | NEW | rossoctl/cortex#424 Phase 5 |
Success criteria
- Two proxy-sidecar agents with
mtlsMode: strictcommunicate only over verified mTLS on the bridge-to-bridge hop (documented + CI-proven). - Permissive rollout path documented; operators can grep fallback WARNs before promoting to strict.
- Agent-to-agent calls denied when caller SPIFFE ID is not in MultiAgent topology allowlist (Phase 2).
- User-facing docs explain when to use mesh mTLS vs AuthBridge mTLS vs both.
- No open duplicate tracking in feature: Enable mTLS connections when mesh is not enabled cortex#405 once reparented.
Suggested child issues
- docs: AuthBridge agent-to-agent mTLS guide (mesh-free, permissive→strict, security caveats).
- e2e: Kind test — strict
mtlsMode, bridge-to-bridge encryption assertion. - authbridge: MultiAgent topology SPIFFE allowlist at reverse proxy (plugin or built-in).
- ui: Agent detail — display
spec.mtlsMode/ resolved config. - extensions: Reparent/close feature: Enable mTLS connections when mesh is not enabled cortex#405; link demo to main docs.
- spike: envoy-sidecar SDS mTLS parity with proxy-sidecar.
References
- kagenti-extensions#424 — mTLS implementation
- kagenti-operator#369 — CRD + ConfigMap wiring
- kagenti#1627 — UI surfacing
- AuthBridge security model
- Identity guide
- SPIFFE/SPIRE
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
mrsabath commentedon Jun 12, 2026
📊 Status sync — 2026-06-12 (automated rollup, please verify before acting)
Phase 1 (transport mTLS) is complete and accurately marked DONE — 5 of 5 items merged/closed:
Gap: the Phase 2/3 "suggested child issues" (docs, e2e, topology allowlist, CI, observability, envoy spike) were never filed, so ~60% of the epic has no trackable sub-issues.
🔗 Suggestions: #1794 (docs(authbridge): rewrite sidecar injection guide for 0.7) overlaps the Phase 2 docs deliverable; #1554/#1570 (SPIFFE/ambient-mTLS Kind failures) relate to the Phase 2 CI deliverable.