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 |
|---|---|
|
The workload’s SPIFFE ID, identity source, SVID serial and validity, and trusted trust domains. |
|
mTLS: the caller’s SPIFFE ID through |
|
JWT-SVID: Spring Security’s resource server backed by the starter’s |
|
Calls a peer with |
|
Calls a peer with a JWT-SVID minted for |
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 |
|---|---|
|
Two workloads get their identities from IDIRA |
|
The same checks with a SPIRE server, agent and CSI driver. One workload sets no |
|
Calls between the SWA and SPIRE trust domains fail the TLS handshake, because neither trusts the other’s bundle. |
|
A workload with a 6-minute SVID gets a new certificate serial with no pod restart, and mTLS keeps working. |
|
On GKE with no node agent, the identity source is |
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.ioheader, 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=spiffeand are rotated while running.