Closed MrWong99 closed 2 years ago
The configured token: my_wrapping_token_for_secret-id
has not the permission to obtain the Secret Id for pulling the Secret Id. As you've provided the role name (app-role.role: my-app
), the Secret Id is assumed to be pulled. If you remove the role name, then the Secret Id is assumed to be a wrapped Id.
Looking at the documentation matrix, we need to revisit the docs as the matrix seems misleading.
That was the issue, thank you :)
Describe the bug I want to authenticate my app against Vault using the AppRole login mechanism. I successfully did that when providing both the role-id and secret-id to my app. However since it is more secure/auditable I wanted to wrap my secret-id as described in the Vault tutorials.
This works fine if I unwrap it previously via curl and give the unwrapped secret-id to my app, however if I let the spring-cloud-vault-config-starter sort it out itself it fails with the error message displayed below.
I think its because this condition always wants to pull the secret-id instead of unwrapping it. In the Spring-cloud-vault docs this is described as a valid use-case though and should be done by providing the role-id and the token contains the wrapping token to retrieve the secret-id.
Sample
application.yml:
Exception during startup: