kir4h / rvault

Small tool to perform some recursive operations on Hashicorp's Vault KV
MIT License
46 stars 11 forks source link

Feature request: support Enterprise vault namespace #18

Open evermilu opened 1 year ago

evermilu commented 1 year ago

I have a need to sync secrets from opensource vault to enterprise vault which uses namespaces. It would be very nice to have the client support this option in its configuration. Possible Solution

Provide an ability to specify the 'namespace' option in the config, and modify client code to be namespace aware.

[global]
# Vault address
address = "http://127.0.0.1:8200"
# Specify namespace for Vault Enterprise (optional)
namespace = "<VAULT_NAMESPACE>"
evermilu commented 1 year ago

I forked the project here https://github.com/evermilu/rvault and added support for namespaces, but I do not know how to best the test cases which would require vault enterprise.

kir4h commented 1 year ago

Tests are done using vault libraries (so they are not integration tests starting an actual vault instance), so I think you should be able to use vault library to add namespaces to the Test Vault and then use it for testing? (haven´t worked on this project in a while so I might be talking nonsense, if so forgive me in advance)