I have a Spring boot 3 service and when I try to run it I got an error
Cannot create authentication mechanism for TOKEN. This method requires either a Token (spring.cloud.vault.token) or a token file
I'm trying to use APPROLE and I keep getting this error
The yaml I have is
spring:
cloud:
config:
enabled: true
fail-fast: true
vault:
uri: https://vault.secret-management.some-url
fail-fast: true
authentication: APPROLE
app-role:
role-id: ${env.ROLE_ID}
secret-id: ${env.SECRET_ID}
The dependencies I have in my project are
- spring boot 3.0.4
- spring-cloud-starter-vault-config 4.0.0
Any idea how to solve this problem?
I have tried to run the service
mvn spring-boot:run -pl application -D"spring-boot.run.profiles=local"
And I got the referred error