The spiffe-spring-boot-sample repository holds a small demo workload and the scripts that test the starter on real infrastructure. Its only SPIFFE-aware code is two controllers; the identity itself comes entirely from the starter.

The demo application

Endpoint Shows

GET /whoami

The workload’s SPIFFE ID, identity source, SVID serial and validity, and trusted trust domains.

GET /hello

mTLS: the caller’s SPIFFE ID through @SpiffePeer, refused when the caller is not in DEMO_ALLOWED_IDS.

GET /api/jwt-hello

JWT-SVID: Spring Security’s resource server backed by the starter’s SpiffeJwtDecoder.

GET /call/mtls?target=

Calls a peer with RestClientSsl.fromBundle("spiffe").

GET /call/jwt?target=&audience=

Calls a peer with a JWT-SVID minted for audience.

Build and run it

git clone https://github.com/spiffe-spring-boot/spiffe-spring-boot.git
(cd spiffe-spring-boot && ./mvnw install -DskipTests)    # until the starter is on Maven Central
git clone https://github.com/spiffe-spring-boot/spiffe-spring-boot-sample.git
cd spiffe-spring-boot-sample && ./mvnw verify

The sample’s CI does the same against the starter’s main branch on every push and every night.

What the end-to-end tests prove

The tests deploy the demo to three real environments and assert on its responses:

Suite Checks

swa

Two workloads get their identities from IDIRA swa-agent. alice calls bob over mTLS and bob’s @SpiffePeer sees alice. bob calling alice gets 403 because he is not on her allow-list. A JWT-SVID call succeeds and the callee sees sub = alice; a token for the wrong audience gets 401. /actuator/health/spiffe is UP.

spire

The same checks with a SPIRE server, agent and CSI driver. One workload sets no SPIFFE_ENDPOINT_SOCKET, which proves the starter finds the socket on its own.

cross

Calls between the SWA and SPIRE trust domains fail the TLS handshake, because neither trusts the other’s bundle.

rotation

A workload with a 6-minute SVID gets a new certificate serial with no pod restart, and mTLS keeps working.

agentless

On GKE with no node agent, the identity source is swa-agentless, mTLS works, JWT-SVIDs minted over mTLS work, and health is UP.

Latest results

Date IDIRA SWA SPIRE Result

2026-11-07

swa-server and swa-agent 1.2.3

Helm chart 0.30.4 (SPIRE 1.15.5)

swa 7/7, spire 6/6, cross 2/2, rotation 2/2, agentless 4/4 passed

Tested without infrastructure, too

The starter’s own build (./mvnw verify) needs no agent, cluster or cloud account:

  • a fake Workload API serves real unix sockets and in-process channels, enforces the workload.spiffe.io header, and pushes rotations;

  • a throwaway SPIFFE PKI and a JWT minter supply certificates and tokens;

  • a fake swa-server stands in for SWA in the agentless tests;

  • real Tomcat and Reactor Netty servers start with server.ssl.bundle=spiffe and are rotated while running.

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