Search code examples
javahashicorp-vaultspring-vault

Hashicorp Vault get Vault to generate several key values


I'm using Hashicorp Vault and java spring vault, trying to generate several key-value pairs. What is the best way (or vault API) to do this? Ideally this key-value pair is generated within Vault.

Java will only have access (or need to know) to the key-part which is a reference to the real secret, the value-part.

As an illustration: From java initalizeSecret() -> Vault creates key-value pair -> return key-part to java.


Solution

  • If I understood your question, you have to supply the key to write it to vault. Vault itself does not generate your key. You must know the key so you will use it to read this value afterwords.