Skip to content

fix: webhook should mount svid-output volume in envoy-proxy container #153

Closed

Description

@mrsabath

Problem

The kagenti-webhook injects AuthBridge sidecars into agent pods, including:

  • spiffe-helper: writes SPIFFE JWT SVID to /opt/jwt_svid.token (via svid-output emptyDir volume)
  • kagenti-client-registration: reads the SVID for client registration (mounts svid-output at /opt)
  • envoy-proxy: runs Envoy + go-processor for inbound validation and outbound token exchange

The svid-output volume is mounted in spiffe-helper and kagenti-client-registration containers, but not in envoy-proxy. This means the go-processor cannot read the JWT SVID file, which is needed as a subject token for RFC 8693 token exchange on outbound requests.

Current Behavior

# Volume mounts injected by webhook:
spiffe-helper:              /opt -> svid-output (rw)
kagenti-client-registration: /opt -> svid-output (rw)
envoy-proxy:                /etc/envoy -> envoy-config (ro), /shared -> shared-data (ro)
                            # svid-output NOT mounted

Expected Behavior

The envoy-proxy container should also mount svid-output (read-only) so the go-processor can access the JWT SVID:

envoy-proxy: /opt -> svid-output (ro)

Workaround

Manually patch the deployment:

kubectl patch deployment git-issue-agent -n team1 --type='json' -p='[{"op":"add","path":"/spec/template/spec/containers/1/volumeMounts/-","value":{"name":"svid-output","mountPath":"/opt","readOnly":true}}]'

Impact

Without the SVID volume, the go-processor cannot use the SPIFFE JWT SVID as a subject token for token exchange, breaking the outbound auth flow.

Part of: rossoctl/rossoctl#767

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions