Spring cloud vault not loading properties from vault

133 views Asked by At

I am trying to run Java Spring cloud sample connecting to Hashicorp using this sample, it is not pulling values from vault. vault is running, spring cloud is not pulling props from bootstrap.properties at runtime.

https://github.com/luramarchanjo/poc-spring-vault

No errors, it is not pulling values from vault. For example (From application.properties) database.username=${DB_USERNAME:[DEFAULT] VAULT WILL REPLACE IT}

It is printing "[DEFAULT] VAULT WILL REPLACE IT", not vaule from vault

Thank you,

1

There are 1 answers

0
Ricardo Gellman On

Normally it is the vault sealed. Check if you are able to validate the data from Vault

Check Vault Server Status:

curl http://127.0.0.1:8200/v1/sys/seal-status

This command should return JSON indicating whether Vault is sealed or unsealed.

Retrieve Secrets:

curl -H "X-Vault-Token: <your-vault-token>" http://<vault_ip>:8200/v1/secret/data/application