Microservices architecture have multiple services which interact with each other and external resources like databases. They also need access to usernames and passwords to access these resources. Usually these credentials are stored in config properties. So each microservice will have its own copy of credentials. If any credentials change we will need to update the configurations in all microservices. We have previously discussed one solution to this problem is using Spring Cloud Config Native Server or Spring Cloud Config Git Server where common global properties which are repeated in all the microservices are usually stored. But still storing the secrets in configuration file is a security concern. Above approach as 2 drawbacks-
No single point of Truth
Security risk of exposing the credentials
spring:
application:
name: javainuseapp
cloud:
vault:
host: localhost
port: 8200
scheme: http
token: s.wO85qvAKuzL4QQifLE9N5aiq