0

I'm trying to read secret values using spring vault. All the properties for client application is stored in github and spring config server is used to access the properties. When I add the vault configuration to client application bootstrap.yml as below, the values are read properly.

bootstrap.yml

spring:
  application:
    name: client-app
  cloud:
    config:
      uri: http://config-server:8080
    vault:
      enabled: true
      authentication: APPROLE
      app-role:
        role-id: 12345
        secret-id: 12345
        role: pres-read
        app-role-path: approle
      connection-timeout: 5000
      read-timeout: 15000
      kv:
        enabled: true
        backend: secrets
        application-name: client-app
      uri: https://vault/

application.yml in config server

spring:
  cloud:
    config:
      server:
        git :
          uri: https://github/repo.git
          username: abc
          password: pass
          refreshRate: 300

Based on https://docs.spring.io/spring-cloud-vault/docs/current/reference/html/config-data.html#vault.configdata , it should be possible to load the vault config from properties yml in github. But if i move the above vault config to my client-app.yml in github, the properties are not read from the vault. How do I achieve this?

DxG
  • 147
  • 4
  • 17

0 Answers0