SPIRE · AsyncAPI Specification
SPIRE Workload API Events
Version 1.2
The SPIRE Workload API is a gRPC streaming interface exposed by the SPIRE Agent on each node, through which workloads request and receive SPIFFE Verifiable Identity Documents (SVIDs) and trust bundle updates. Workloads connect to the Agent's Unix domain socket and subscribe to streaming RPCs that deliver X.509-SVIDs, JWT-SVIDs, and trust bundles. The Agent continuously monitors SVID expiry and re-issues certificates before they expire, streaming updated SVIDs to all connected workloads. This AsyncAPI document describes the streaming event channels of the SPIRE Workload API as implemented by SPIRE Agent.
View Spec
View on GitHub
AuthenticationCloud NativeGraduatedIdentitySecurityZero TrustAsyncAPIWebhooksEvents
Channels
/spiffe.workload.SpiffeWorkloadAPI/FetchX509SVID
Receive streaming X.509-SVID updates
Streaming channel through which SPIRE Agent delivers X.509-SVIDs to workloads. After attestation, the agent sends the initial set of X.509-SVIDs the workload is authorized to hold, then proactively re-delivers updated SVIDs before each certificate expires. The stream remains open indefinitely and workloads should reconnect automatically if disconnected.
/spiffe.workload.SpiffeWorkloadAPI/FetchX509Bundles
Receive streaming X.509 trust bundle updates
Streaming channel for receiving X.509 trust bundles for all trust domains the workload needs to validate peer identities. Delivers the local trust domain bundle and all federated trust domain bundles configured on the SPIRE Server.
/spiffe.workload.SpiffeWorkloadAPI/FetchJWTSVID
Receive a JWT-SVID for a target audience
Unary-style channel for requesting JWT-SVIDs for a specific audience. The workload requests a JWT for a target service and receives a short-lived token. JWT-SVIDs have a TTL of typically 5 minutes and must be fetched immediately before use.
/spiffe.workload.SpiffeWorkloadAPI/FetchJWTBundles
Receive streaming JWT trust bundle updates
Streaming channel for receiving JWT trust bundles (JWKS) for all configured trust domains. Used by services that need to validate incoming JWT-SVIDs from workloads in the local or federated trust domains.
/spiffe.workload.SpiffeWorkloadAPI/ValidateJWTSVID
Receive JWT-SVID validation result
Unary channel for delegating JWT-SVID validation to the SPIRE Agent. Services can send incoming JWT-SVIDs to the Agent for validation rather than implementing token validation themselves.
Messages
X509SVIDResponse
X.509 SVID Response
Batch of X.509-SVIDs and trust bundles for the workload
X509BundlesResponse
X.509 Bundles Response
Complete set of X.509 trust bundles
JWTSVIDResponse
JWT-SVID Response
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 for the SPIFFE Workload API. The socket path is configurable via the SPIRE Agent socket_path configuration parameter. Workloads connect to this socket to receive their identities.