Skip to main content
HashiTalks 2025 Learn about unique use cases, homelab setups, and best practices at scale at our 24-hour virtual knowledge sharing event. Register
Demo

How to use Vault with Spring applications

See Vault in action with Spring Boot and Spring Cloud by watching this detailed demo from the Spring I/O conference.

At a recent talk for the Spring I/O conference in Barcelona, Jan Dittberner, a software architect at the IT services firm T-Systems, walked through his process for securing Spring Boot applications with Vault. This talk is 90% demo time, covering:

  • Vault token and AppRole authentication in Spring Boot
  • Dynamic X.509 (TLS) certificates from Vault PKI
  • Dynamic database credentials from Vault's database engine with PostgreSQL

The demo is a great intro to Vault's secret management capabilities for anyone who's working in a Spring-based Java environment. Vault has excellent integration with Spring Cloud as well, so there's no tricky setup if that's a part of your environment.

There is also some demo time on how to use the generic secrets backend for other application credentials.

Slides: https://speakerdeck.com/jandd/securing-spring-applications-with-hashicorp-vault

Demo code on GitHub: https://github.com/jandd/spring-boot-vault-demo

There are also several good resources from the Spring open source community for setting up the Spring Cloud Vault integration:

More resources like this one

4/11/2024FAQ

Introduction to HashiCorp Vault

Vault identity diagram
12/28/2023FAQ

Why should we use identity-based or "identity-first" security as we adopt cloud infrastructure?

3/14/2023Article

5 best practices for secrets management

2/3/2023Case Study

Automating Multi-Cloud, Multi-Region Vault for Teams and Landing Zones