Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

feat(spiffe): socket credential handler for Workload API (RFC UAA-SPIFFE-001)#136

Draft
rkoster wants to merge 1 commit into
cloudfoundry:mainfrom
rkoster:spiffe-socket-handler
Draft

feat(spiffe): socket credential handler for Workload API (RFC UAA-SPIFFE-001)#136
rkoster wants to merge 1 commit into
cloudfoundry:mainfrom
rkoster:spiffe-socket-handler

Conversation

@rkoster

@rkoster rkoster commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds a SPIFFE socket credential handler to the Diego executor so app
containers can reach the per-cell SPIFFE Agent's Workload API.

When executor.spiffe_socket_dir is configured, the executor bind-mounts that
host directory read-only into every app container at /run/spiffe and
injects SPIFFE_ENDPOINT_SOCKET=unix:///run/spiffe/workload.sock. Workloads then
use the standard SPIFFE Workload API (FetchJWTSVID) to obtain a JWT-SVID minted
by UAA.

Key changes

  • depot/containerstore/spiffe_socket_handler.go (+ tests) — new credential handler
  • initializer/initializer_garden.go — register the handler, gated on config.SpiffeSocketDir
  • depot/depot.go — wire the handler into the container lifecycle

Context

Part of RFC UAA-SPIFFE-001UAA as a SPIFFE Identity Server for Cloud
Foundry
— a POC in which UAA issues offline-OIDC JWT-SVIDs to CF apps.

Cross-repo dependencies

  • Vendored by cloudfoundry/diego-release (spiffe-agent branch), which ships
    the SPIFFE Agent sidecar (Plan B1) and creates the shared socket directory.
  • Pairs with the JWT-SVID signing endpoint in cloudfoundry/uaa (spiffe-signer).

Status

Draft / POC. End-to-end verified on a live bosh-lite CF deployment: a test app
fetched a valid RS256 JWT-SVID
(spiffe://<trust-domain>/cf/org/.../space/.../app/.../process/web) over the
injected socket.

Deliver the SPIFFE workload socket into app containers. SpiffeSocketHandler
bind-mounts the host socket directory read-only at /run/spiffe and exports
SPIFFE_ENDPOINT_SOCKET so go-spiffe / spiffe-helper workloads discover it
automatically. Wired into the cred-manager fan-out alongside instance
identity; dormant until SpiffeSocketDir is configured.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant