SPIFFE · AsyncAPI Specification
SPIFFE Workload API Events
Version 1.0
The SPIFFE Workload API is a gRPC streaming interface through which workloads request and receive SPIFFE Verifiable Identity Documents (SVIDs) and trust bundle updates. Workloads subscribe to the API and receive a continuous stream of identity updates as certificates are issued, rotated, and renewed. The API uses server-side streaming RPCs where the workload sends a single request and the SPIFFE implementation (such as SPIRE Agent) streams back identity updates for the lifetime of the connection. This AsyncAPI document describes the streaming event channels for X.509 SVID delivery, JWT SVID issuance, and trust bundle synchronization as exposed by SPIFFE Workload API implementors.
View Spec
View on GitHub
AuthenticationCloud NativeGraduatedIdentitySecurityZero TrustAsyncAPIWebhooksEvents
Channels
/spiffe.workload.SpiffeWorkloadAPI/FetchX509SVID
Stream X.509 SVID updates
Streaming channel through which workloads receive X.509-SVID identity documents. After the workload sends a request, the server streams back an initial bundle of all SVIDs the workload is authorized to hold, followed by updated bundles whenever certificates are rotated or authorization changes. The stream remains open indefinitely and the workload should reconnect if the stream is interrupted.
/spiffe.workload.SpiffeWorkloadAPI/FetchX509Bundles
Stream X.509 trust bundle updates
Streaming channel for receiving the X.509 trust bundle set for all trust domains the workload needs to validate peer identities. This channel delivers the federation bundles from all configured federated trust domains in addition to the workload's own trust domain.
/spiffe.workload.SpiffeWorkloadAPI/FetchJWTSVID
Receive a JWT-SVID
Request-response channel for fetching a JWT-SVID for a specific audience. Unlike X.509 streaming, JWT-SVIDs are issued on demand with a short TTL and should be fetched fresh for each use. The workload specifies the audience claim(s) and optionally a specific SPIFFE ID to obtain a JWT for.
/spiffe.workload.SpiffeWorkloadAPI/FetchJWTBundles
Stream JWT trust bundle updates
Streaming channel for receiving JWT trust bundle updates. JWT bundles contain the public keys needed to validate JWT-SVIDs from all trust domains the workload is configured to federate with.
/spiffe.workload.SpiffeWorkloadAPI/ValidateJWTSVID
Receive JWT-SVID validation result
Request-response channel for asking the SPIFFE implementation to validate a JWT-SVID on behalf of the workload. This allows workloads to delegate JWT validation to the SPIRE Agent rather than implementing it themselves.
Messages
X509SVIDResponse
X.509 SVID Response
A batch of X.509-SVIDs for the workload
X509BundlesResponse
X.509 Bundles Response
The complete set of X.509 trust bundles
JWTSVIDResponse
JWT-SVID Response
One or more JWT-SVIDs for the requested audience
JWTBundlesResponse
JWT Bundles Response
JWT trust bundles for all trust domains
ValidateJWTSVIDResponse
Validate JWT-SVID Response
Result of JWT-SVID validation
Servers
grpc
spireAgent
unix:///tmp/spire-agent/public/api.sock
SPIRE Agent Unix domain socket exposing the SPIFFE Workload API. Workloads connect to this socket to receive their SPIFFE identities. The socket path is configurable in the SPIRE Agent configuration.