I'm using spring-cloud-vault
to retrieve the versioned kv
from the vault server. When I'm using the environemnt.getSecret("key1")
then it returns only the latest versions of key for example world2
. Is there any way to retrieve the old versions of secrets by specifying the version number for a given key using spring-cloud-vault
library?
#vault kv put secret/my-app key1=world1
Key Value
--- -----
created_time 2018-09-20T12:00:19.6136263Z
deletion_time n/a
destroyed false
version 1
#vault kv put secret/my-app key1=world2
Key Value
--- -----
created_time 2018-09-20T12:00:27.1820524Z
deletion_time n/a
destroyed false
version 2
Thanks for your help.