Reactive Springboot with Spring Cloud Vault

In the previous post, we saw how we can create reactive Microservices using Spring-boot and Kotlin. I want to write this as a series of articles to address various cross-cutting concerns when we encounter during the implementation of Microservices architecture. In this post, we will see about securing our Microservices using Spring Cloud Security and storing the credentials of the service and MongoDB in the Hashicorp Vault and then retrieve them using Spring Cloud Vault. In addition to providing a secure means of storing the credential and tokens in the vault, it gives us the advantage of dynamically serving them for your Microservices. We will be using the Hashicorp vault for our demo and use the Azure Vault in the next series. To begin with download the vaultproject from here according to you operating system. Create a vault config like below and the additional properties of the vault can be checked here. We are using the in-memory vault so the tokens will be persisted anywhere and disable_mlock prevents the memory being swapped to the disk. It is OK to use it for development/testing. Since I am using a MacOS for development mlock is not supported by the system. backend "inmem"

Continue reading »