1

We are in process of migrating spring boot 3 from 2.7.7(We did an incremental upgrade from 2.6.8 to 2.7.7 and then to 3.0.0). We have almost got our application working except for the secrets are not read from the vault after migrating to Spring Boot 3 - Getting an error - This method requires either a Token (spring.cloud.vault.token) or a token file at ~/.vault-token. The vault integration worked perfectly fine in the previous version of 2.6.8.

**Specifications - ** JDK - 17 Spring boot - 3.0.0 Spring Cloud - 2022.0.0 spring-cloud-starter-vault-config - 4.0.0

**bootstrap.yml - **

bootstrap.yml: |-
    spring:
      cloud:
        vault:
          enabled: true
          host: pvault.dummy.local
          port: 8200
          uri: https://localhost:8200
          scheme: https
          namespace: rpp
          authentication: KUBERNETES
          generic:
            enabled: false
          kv:
            enabled: true
            backend: kv
            profile-separator: '/'
            application-name: path1/couchbase
          ssl:
            trust-store: classpath:config/vault-truststore.p12
            trust-store-password: password
            #trust-store-type: JKS
          kubernetes:
            role: b2c-isp-bss-role
            kubernetes-path: path1
            service-account-token-file: /var/run/secrets/kubernetes.io/serviceaccount/token

application.yml -

application.yml: |-
   spring:
      cloud:
        bootstrap:
          enabled: true

The migration guide does not suggest any change w.r.t vault. I'm a bit clueless as to where to start the changes.

Arun
  • 11
  • 3

0 Answers0