Most applications need exactly one dependency: spiffe-spring-boot-starter. The other modules exist so that each concern stays small and optional.

The modules: starter
Artifact Purpose

spiffe-spring-boot-starter

The dependency an application adds. It brings in the auto-configuration and the core.

spiffe-spring-boot-autoconfigure

All the auto-configuration. Every integration (servlet, WebFlux, Spring Security, HTTP clients, Actuator) is optional and only activates when its classes are on the classpath.

spiffe-spring-boot-core

Spring-free code: a Workload API client built on grpc-netty-shaded, the identity source, rotating key and trust managers, and the JWT-SVID cache and validator.

spiffe-spring-boot-swa-agentless

Optional. An identity source for IDIRA SWA with no node agent.

spiffe-spring-boot-bom

A bill of materials that keeps every module on one version.

Using the BOM

Import the BOM when you use more than one module, and leave the versions out of the individual dependencies:

Maven
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.spiffe-spring-boot</groupId>
            <artifactId>spiffe-spring-boot-bom</artifactId>
            <version>0.1.0-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.spiffe-spring-boot</groupId>
        <artifactId>spiffe-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.spiffe-spring-boot</groupId>
        <artifactId>spiffe-spring-boot-swa-agentless</artifactId>
    </dependency>
</dependencies>
Gradle
dependencies {
    implementation(platform("org.spiffe-spring-boot:spiffe-spring-boot-bom:0.1.0-SNAPSHOT"))
    implementation("org.spiffe-spring-boot:spiffe-spring-boot-starter")
    implementation("org.spiffe-spring-boot:spiffe-spring-boot-swa-agentless")
}

The BOM is published without a parent, so importing it never pulls in Spring Boot’s dependency management or anyone else’s.

Dependencies worth knowing

  • gRPC with shaded Netty. The Workload API client uses grpc-netty-shaded, which ships epoll for Linux and falls back to NIO unix sockets elsewhere. It needs no extra native jars and never clashes with Reactor Netty.

  • gRPC and protobuf versions come from Spring Boot. The starter is built and tested against the versions Spring Boot 4.2.0 manages, which are the ones your application resolves.

  • java-spiffe-core for the model only. The starter uses its SPIFFE ID, SVID and bundle types and validators. The Workload API protocol itself is generated from the SPIFFE specification’s workload.proto, so the platform-specific transport artifacts of java-spiffe are never needed.

Java modules

Every jar declares an Automatic-Module-Name, so it can be used from a modular application:

Artifact Module name

spiffe-spring-boot-core

org.spiffespringboot.core

spiffe-spring-boot-autoconfigure

org.spiffespringboot.autoconfigure

spiffe-spring-boot-swa-agentless

org.spiffespringboot.swa.agentless

spiffe-spring-boot-starter

org.spiffespringboot.starter

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