vaultlib
vaultlib copied to clipboard
Feature Proposal: Access to Secret Metadata
Thanks for the library! We've enjoyed using it at work.
We'd like to continue using it, but we need to access metadata for our secrets (specifically the version of the secret). Would you be open to a pull request that modified Client.GetSecret()
such that the vaultSecretKV2.Metadata
is included on Secret
struct returned by Client.GetSecret()
?
Thanks for taking the time to consider the feature.
Sorry for delayed answer. It could definitively be an interesting feature. Long time without actively working on the lib, so I will need to get back to it ;)
@jambonrose I would be happy to review/merge your PR(s)
Great! Thanks for considering the feature, and no worries about the delay.
We've made a few changes to the library on our end:
- allow tests to be run locally on Mac and Windows (in addition to the original Linux setup; https://github.com/TrueTickets/vaultlib/pull/1)
- Run TravisCI tests only on the
master
branch and PRs (https://github.com/TrueTickets/vaultlib/pull/2; requires changes in the TravisCI Settings panel as well) - update code to run tests in Go 1.11, 1.12, 1.13, and 1.14 (https://github.com/TrueTickets/vaultlib/pull/3; this required some test code modifications due to https://golang.org/doc/go1.13#testing)
- create a
Metadata
struct which is provided with KV v2 secrets (https://github.com/TrueTickets/vaultlib/pull/5)
My proposal was originally just for item 4. Would you be interested in some of this other work on our end, and if so, would you like this work in individual PRs or all-together?
Finally, we have not modified any code around KV v1. Given the changes in https://github.com/TrueTickets/vaultlib/pull/5, would you expect similar changes to KV v1?
We're going to be testing these changes later today. Once I confirm that all of this works as expected, I will open a PR (or several) for you to consider.
I think the first 3 can be in one PR and the 4th in another one, if that's fine for you.
@jambonrose Any update on this? Thanks
We have not forgotten about this! We'll be swinging back around on this front ASAP.