Golang API support for kv2 secrets

1,096 views
Skip to first unread message

Karl Fischer

unread,
Jul 23, 2018, 9:22:38 AM7/23/18
to Vault
I use a custom tool which uses vault's golang API https://github.com/hashicorp/vault/tree/master/api to read/write secrets from KV, like

api.client.Logical().Read(path)

This works fine for KV version 1, but it fails for KV version 2. Do you know of any API lib for KV2? Is there a plan to add it soon to vaults standard golang API (https://github.com/hashicorp/vault/tree/master/api)?

Chris Hoffman

unread,
Jul 23, 2018, 9:25:06 AM7/23/18
to Vault
The API client works with KVv2 but the API paths are slightly different for v2.  

Check out the API docs here:

Chris
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/03f6014b-cc9a-485f-b31b-93561e9039ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mike sharma

unread,
Jul 23, 2018, 9:34:17 AM7/23/18
to vault...@googlegroups.com
I posted my question 1 weeks ago no one response 


On Mon, Jul 23, 2018 at 8:24 AM, Chris Hoffman <chof...@hashicorp.com> wrote:
The API client works with KVv2 but the API paths are slightly different for v2.  

Check out the API docs here:

Chris
On Jul 23, 2018, 9:22 AM -0400, Karl Fischer <fish...@gmail.com>, wrote:
I use a custom tool which uses vault's golang API https://github.com/hashicorp/vault/tree/master/api to read/write secrets from KV, like

api.client.Logical().Read(path)

This works fine for KV version 1, but it fails for KV version 2. Do you know of any API lib for KV2? Is there a plan to add it soon to vaults standard golang API (https://github.com/hashicorp/vault/tree/master/api)?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+unsubscribe@googlegroups.com.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/000a4ea1-42d2-4f7f-ad5d-1288c821d272%40Spark.

Karl Fischer

unread,
Jul 24, 2018, 5:18:30 AM7/24/18
to Vault
Thank you for the fast response! Yes you are right. I was mostly struggling with the List() function, as it has to run against secret/metadata in KV2. Thank you for the clarification.
Reply all
Reply to author
Forward
0 new messages