usr42 / vault-spring-database-secret-expired-shutdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shutdown a Spring Boot app when the Hashicorp Vault max_ttl of the database credentials expire

This code example is used in my blog post Hashicorp Vault max_ttl Killed My Spring App.

It ensures that the Spring Boot application is shutdown, whenever the dynamic database credentials expire. When the application is automatically restarted by e.g. Kubernetes or systemd this can solve the problem, that the application cannot access the database anymore, whenever the Vault lease of its database secrets expire.

About

License:Apache License 2.0


Languages

Language:Kotlin 74.6%Language:Shell 23.4%Language:HCL 2.0%