The starter does not issue identities; it consumes them. It talks to any agent that implements the standard SPIFFE Workload API, and to IDIRA SWA directly where no agent can run.
| Backend | Use it when | What the app needs |
|---|---|---|
You run SPIRE, the CNCF reference implementation, on VMs or Kubernetes. |
The starter, plus access to the agent socket. |
|
You use IDIRA Secure Workload Access with |
The starter, plus access to the agent socket. |
|
No node agent can run, for example on a shared GKE cluster. |
The starter and the |
SPIRE
Run the SPIRE agent on each node and register your workloads with the SPIRE server as usual. The starter finds the agent socket at any of the well-known SPIRE paths, including the one the SPIFFE CSI driver mounts:
-
/tmp/spire-agent/public/api.sock -
/run/spire/sockets/agent.sock -
/run/spire/agent-sockets/api.sock -
/spiffe-workload-api/spire-agent.sock
Anywhere else, set SPIFFE_ENDPOINT_SOCKET (the standard SPIFFE variable) or spiffe.workload-api.socket.
If the agent issues several SVIDs to the same workload, pick one with spiffe.workload-api.svid-hint.
If the agent restarts, the starter reconnects with exponential backoff up to spiffe.workload-api.max-backoff, and the last good SVID stays in use meanwhile.
IDIRA Secure Workload Access agent
swa-agent serves the same SPIFFE Workload API, so nothing changes in the application.
The starter probes the SWA socket paths after the SPIRE ones:
-
/tmp/swa-agent/public/api.sock(Kubernetes) -
/run/swa-agent/api.sock(VM)
IDIRA SWA agentless mode
Some platforms do not let you run a privileged node agent; a shared GKE cluster is the typical case. In agentless mode the application gets its SVIDs straight from swa-server, using the platform identity it already has.
Add the module
<dependency>
<groupId>org.spiffe-spring-boot</groupId>
<artifactId>spiffe-spring-boot-swa-agentless</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
implementation("org.spiffe-spring-boot:spiffe-spring-boot-swa-agentless:0.1.0-SNAPSHOT")
Configure it
spiffe:
swa:
agentless:
server-address: swa-server.my-namespace.svc.cluster.local:8443
trust-domain: swa-java.demo
ca-bundle-url: https://<secrets-manager-api-url>/swa/trust-domains/swa-java.demo/.well-known/ca-bundles
jwt-bundle-url: https://<secrets-manager-api-url>/swa/trust-domains/swa-java.demo/.well-known/jwks # only to validate inbound JWT-SVIDs
Setting server-address turns agentless mode on. It then takes precedence over any Workload API socket.
How it works
-
At startup the app reads its GKE Workload Identity token from the metadata server and presents it to swa-server’s
ExchangeRPC. -
swa-server returns an X.509-SVID for a key the app generated locally; the private key never leaves the pod.
-
The app renews the SVID at half its lifetime (
renew-ratio). -
It mints JWT-SVIDs over mTLS with
FetchJWTSVID, without presenting the platform token again.
Everything on the Features page works the same way on top of it.
No agent streams JWT bundles in agentless mode. To validate inbound JWT-SVIDs, set spiffe.swa.agentless.jwt-bundle-url to the trust domain’s JWKS.
|
The full list of agentless settings is in the properties reference.
Precedence
When several sources are possible, the starter uses the first that applies:
-
agentless mode, if
spiffe.swa.agentless.server-addressis set; -
the socket in
spiffe.workload-api.socket; -
the socket in
SPIFFE_ENDPOINT_SOCKET; -
the first well-known socket path that exists.
If none applies, no identity source is created and every SPIFFE feature stays off.