Skip to content

Spring Vault 3.0 Migration Guide

Mark Paluch edited this page Nov 25, 2022 · 2 revisions

This document is meant to help you migrate your application to Spring Vault 3.0.

Before You Start

Upgrade to the Latest 2.3.x Version

Before you start the upgrade, make sure to upgrade to the latest available 2.3.x version. This will ensure that you are building against the most recent dependencies of that line.

Review Dependencies

The move to Spring Vault 3 will upgrade several dependencies and might require work on your end. You can review dependency management for 2.3.x with dependency management for 3.0.x to asses how your project is affected.

Review System Requirements

Spring Vault 3.0 requires Java 17 or later. Java 8 is no longer supported. It also requires Spring Framework 6.0.

Review Deprecations from Spring Vault 2.x

Classes, methods and properties that were deprecated in early Spring Vault 2.x have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.

Spring Framework 6.0

Spring Vault 3.0 builds on Spring Framework 6.0. You might want to review their upgrade guide before continuing.

Core Changes

Several changes have been made to the core of Spring Vault that can be relevant to applications.

AWS SDK v2

Spring Vault uses now AWS SDK v2 for the AWS IAM authentication method, specifically the software.amazon.awssdk:auth artifact instead of com.amazonaws:aws-java-sdk-core. As part of this upgrade, you can now configure a RegionProvider to determine the signing region.

Deprecations from Spring Vault 2.x

  • Removal of Netty4ClientHttpRequestFactory support

  • Removal of the deprecated ClientHttpConnectorFactory types in the o.s.v.config package

  • Removal of deprecated API such as LoginToken.of(String, long) methods, methods accepting durations as int/long, and other utility methods

Removed LeaseEndpoints.SysLeases enum constant

If you use SysLeases in your configuration make sure to switch to Leases as direct replacement.

Other removals

  • Removal of AppRoleAuthenticationOptions.getInitialToken(). Configure RoleId/SecretId pull modes with a token instead.

  • Removal of AwsIamAuthenticationOptions.getServerName(). Use getServerId() instead.

  • Removal of deprecated SslConfiguration constructors and deprecated factory methods in favor of replacement factory methods.