General

What is SPIFFE, and do I need to know it to use the starter?

SPIFFE is an open standard for workload identity: it names each service with a URI such as spiffe://example.org/ns/shop/sa/orders and proves that name with short-lived certificates or tokens. You only need the basics, which fit in one table on the Overview page.

Which Java and Spring Boot versions are supported?

Java 21 or later and Spring Boot 4.2.0 (the 4.2 line).

Does it only work on Kubernetes?

No. It works wherever a SPIFFE agent serves the Workload API: VMs, bare metal or Kubernetes. Agentless mode is specific to GKE.

What happens when I run the app without an agent, for example on my laptop?

If no socket is configured or found and agentless mode is off, the starter configures nothing and the app starts exactly as it would without it. If you set server.ssl.bundle=spiffe anyway, startup fails because the bundle does not exist, so keep that property in a profile that only production uses.

Is it on Maven Central?

Not yet. Until the first release, install it from source with ./mvnw install as shown in Getting started.

TLS and rotation

My HTTP client fails with a hostname verification error. Why?

SVIDs normally carry no DNS name, so classic hostname verification cannot succeed. The starter’s trust manager checks the peer’s SPIFFE ID instead, which works with the JDK HttpClient, Reactor Netty, and the RestClient and WebClient built on them.

Apache HttpClient 5 always adds its own hostname verifier on top. Use the JDK or Reactor Netty client factory for calls that use SPIFFE identities.

Tomcat accepts a caller that is not on spiffe.ssl.allowed-ids. Is that a bug?

No. Tomcat builds its trust from the bundle’s trust store, so at the TLS layer it accepts any SVID from a trusted trust domain. Per-ID enforcement happens in the starter’s peer authorization filter or in Spring Security; set spiffe.mtls.server.allowed-ids for that. On Reactor Netty the check happens both at the TLS layer and in the filter.

Do I need to restart the app when the certificate rotates?

No. Tomcat reloads the certificate from the updated bundle, and Reactor Netty and the HTTP clients read the current SVID at every handshake. The spiffe health indicator goes DOWN if no new SVID arrives in time (spiffe.health.min-remaining), so you hear about a stalled rotation before the certificate expires.

Startup fails waiting for the first SVID. What should I check?

A socket was found, but the agent sent no SVID within spiffe.workload-api.init-timeout (30 seconds by default). Usually:

  • the workload is not registered with the SPIRE or SWA server, or its selectors do not match the running process;

  • the agent is still starting;

  • the socket belongs to another agent.

The error message names the socket the starter used. Check the agent’s logs for the attestation result.

Authorization and JWT-SVIDs

Should I use mTLS or JWT-SVIDs?

Prefer mTLS whenever the TLS connection reaches your service directly: the identity is proven by the handshake itself. Use JWT-SVIDs when something in between terminates TLS, such as an ingress, an API gateway or a mesh sidecar.

Inbound JWT-SVIDs are rejected in agentless mode.

No agent streams JWT bundles in agentless mode. Set spiffe.swa.agentless.jwt-bundle-url to the trust domain’s JWKS.

My Kubernetes probes get 401 or 403.

The peer authorization filter skips /actuator/** and /error by default. If your probes hit other paths, add them to spiffe.mtls.server.exclude-paths, or serve Actuator on a separate management port.

SPIFFE Spring Boot is an independent open-source project under the Apache License 2.0. It is not affiliated with or endorsed by the SPIFFE project, the CNCF, or Broadcom (Spring). SPIFFE, SPIRE, Spring and Spring Boot are trademarks of their respective owners.

GitHub · Issues · Sample