How to store the content of binary file in Vault?

What is the best way to store a content of binary file in Vault ? Any recommendation ?

What is the use case you need to store a binary file? I’d say that isn’t a normal thing in Vault.

I’d recommend using transit to encrypt the file but storing the encrypted content in your existing storage/db platform.

The file has sensitive content (certificates) - it is jks file.

Hello,

Did you try to convert it to base64 and they put it in Vault ?

Martin

No I haven’t. I didn’t know it has to be converted to base64. Once I did that what vault command should I use to write the content to Vault ?

I think you can use the API below

curl \
    --header "X-Vault-Token: ..." \
    --request POST \
    --data @payload.json \
    http://127.0.0.1:8200/v1/transit/encrypt/my-key