Hi,
I would like to know how to do step #2 and #3 below via the REST api. I only find the documentation here: https://www.vaultproject.io/api/system/wrapping-wrap.html
But I can see how I use it without retrieving the actual secret data first before the REST API call to /sys/wrapping/wrap endpoint. Can step #2 be done in one single REST API call to the vault?
#1. Write secret k/v pairs
vault write secret/test k1=k1secret k2=k2secret
#2. Read them and wrap them
vault read -wrap-ttl=60s secret/test
Key Value
--- -----
wrapping_token: 023bbbb8-bdae-yyyy-yyyy-1688eebf598b
wrapping_token_ttl: 60
wrapping_token_creation_time: 2016-06-28 00:36:37.795712351 +0000 UTC
#3. Unwrap of field directly is fine
vault unwrap -field=k1 023bbbb8-bdae-yyyy-yyyy-1688eebf598b
k1secret
Thanks.
Will