Skip to content

feat: Implement mutating webhook for Authbridge sidecar injection #74

Closed

Description

@cwiklik

Summary

Implement a Kubernetes mutating admission webhook that intercepts workload creation/updates and injects Authbridge identity infrastructure sidecars into pods. This is a core component of the compositional architecture described in the Kagenti Implementation Design.

Motivation

The current Kagenti architecture requires users to deploy agents using the custom Agent CR. The new compositional approach allows users to use standard Kubernetes workloads (Deployment, StatefulSet, DaemonSet) with automatic identity infrastructure injection via an opt-in label.
This enables:

  • Zero-friction adoption using familiar Kubernetes primitives
  • Support for multiple workload types (not just Deployments)
  • Automatic SPIFFE identity and token exchange capabilities
  • Separation of identity infrastructure from application code

Requirements

Webhook Configuration
The webhook must:

Watch workload resources at CREATE and UPDATE operations:

  • apps/v1 Deployments
  • apps/v1 StatefulSets
  • apps/v1 DaemonSets
  • batch/v1 Jobs (future consideration)
  • batch/v1 CronJobs (future consideration)

Injected Components

The webhook must inject the following Authbridge components into the pod template spec:

Init Container:

proxy-init : Sets up iptables for traffic interception, creates SPIFFE socket directory


Sidecars:

spiffe-helper : Manages SPIFFE workload identity (fetches JWT SVID from SPIRE agent)


client-registration : Registers agent with identity provider (Keycloak), obtains client credentials


envoy-proxy : Intercepts outbound traffic, performs RFC 8693 token exchange


Related Issue(s): #68

Activity

  1. self-assigned this
    on Jan 21, 2026
  2. added
    enhancement
    on Jan 21, 2026
  3. added theissue type on Jan 21, 2026
  4. huang195 commented on Jan 21, 2026

    @huang195
    Member

    @cwiklik just to clarify, auth-proxy shouldn't be added as one of the sidecars. Only envoy-proxy should be added. This sidecar has both envoy and ext proc processes for intercepting outbound requests and doing token exchanges. There is a separate issue for capturing inbound requests to do token validation, but that is not what auth-proxy is supposed to do.

  5. pdettori commented on Jan 28, 2026

    @pdettori
    Member

    @cwiklik is this completed by #75 and #76 ? or there is something else ?

  6. cwiklik commented on Jan 28, 2026

    @cwiklik
    CollaboratorAuthor

    Merged under #75

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

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions