Skip to content

proposal: Create a shared Envoy sidecar that extensions can register with independently (as body processors via ext_proc) #141

Closed as not planned

Description

@usize

Problem

Today, AuthBridge owns both the Envoy proxy configuration and its ext_proc filter logic. As new agent-level capabilities emerge (observability, budget enforcement, policy control), there is pressure to bolt them onto AuthBridge, diluting its clear auth-focused responsibility. Each new concern added to AuthBridge increases coupling and complicates ownership, testing, and release.

design

Extract the Envoy sidecar proxy into a shared, extension-managed component that any kagenti-extension can register an ext_proc filter with. Each extension remains an independent project with its own image, lifecycle, and owner -- Envoy is the only shared infrastructure.

Here's a nice ascii diagram from my LLM buddy:

                          Envoy Sidecar (shared)
                         ┌──────────────────────┐
  Inbound/Outbound       │  ext_proc chain:     │
  Traffic ──────────────►│   ├─ AuthBridge      │──────► Agent
                         │   ├─ A2A Observer    │
                         │   └─ (future: policy)│
                         └──────────────────────┘
                              │        │
                              ▼        ▼
                         Keycloak   OTEL Collector

Here you can see AuthBridge is a separate component from an observability focused component à la this proposal which could be thought of as a specialized observer of agent communications.

Goals and non-goals

Goals:

  • Separation of concerns. Each extension has a single purpose e.g., auth or observability.
  • Each extension is versioned, tested, and released on its own schedule.
  • Agent operators choose which extensions apply to their deployment.

Non-goals:

  • shared business logic in the shared Envoy proxy sidecar: let's not try to think about cross-dependencies for now, since they should be avoided and are not immediately necessary.

Success criteria

  • A shared envoy proxy exists within Kagenti-Extensions.
  • AuthBridge is refactored such that it registers with this shared envoy proxy as opposed to hosting its own.

(By porting AuthBridge we create a pattern that can be easily reused by additional projects.)

Stories to be associated with this epic

No response

Additional Context

No response

Activity

  1. huang195 commented on Feb 24, 2026

    @huang195
    Member

    There are a few things that we need to be very careful about when working with ext-proc filters in Envoy due to:

    • filter order matters
    • filter can short-circuit other filters from running in a chain
    • filter can modify headers, body, and other meta data, so filter that run later in the chain could be impacted in unexpected ways

    So, even though Envoy provides a plugin architecture, dependencies of these filters matter a lot. That is, it's not as simple as a list of toggles that decide what to enable and disable.

    Additionally, we need to differentiate those ext-procs that are on the critical path vs. those that aren't. Examples of those that are on the critical path are anything related to auth, e.g., token validation and exchange. Examples of those that are not on the critical path are those for tracing and observability. As all filters on every chain run for every request and response, it's important that we minimize latency impact of those that do not require to be on the critical path.

  2. usize commented on Feb 24, 2026

    @usize
    ContributorAuthor

    Agreed.

    There are two ways forward I can think of.

    1. In lieu of toggles we have some pre-set profiles which enable/disable core components: e.g. observability included versus excluded.

    2. We allow for some sort of flexible config and order the processors in a what you see is what you get fashion. This means we'll need to carefully call out caveats around ordering and critical path in documentation.

    Do we have another approach to consider?

  3. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment or remove the stale label.

  4. github-actions commented on May 10, 2026

    @github-actions
    Contributor

    This issue was closed because it has been stale for 14 days with no activity. Feel free to reopen if this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions