Looking for someone to take this project from me. #94
vault-kv-mv is a command-line tool that simplifies moving and renaming secrets within HashiCorp Vault's Key-Value (KV) secrets engine. It supports moving single secrets, as well as recursively moving all secrets under a given path.
- Move a single secret: Rename a secret to a new path.
- Move a secret into a directory: Move a secret to be under a new path (directory).
- Recursively move a directory: Move all secrets from one path to another.
If you have Go installed, you can build and install vault-kv-mv with the following commands:
git clone https://github.com/xbglowx/vault-kv-mv.git
cd vault-kv-mv
go installPre-compiled binaries for various operating systems are available on the GitHub Releases page.
The tool uses the standard HashiCorp Vault environment variables for authentication:
VAULT_ADDR: The address of your Vault server.VAULT_TOKEN: Your Vault authentication token.
Make sure these are set before running the tool.
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="s.xxxxxxxxxxxx"The basic syntax is:
vault-kv-mv <source_path> <destination_path>To rename a secret from secret/foo to secret/bar:
vault-kv-mv secret/foo secret/barTo move the secret secret/foo to secret/new/foo:
vault-kv-mv secret/foo secret/new/To move all secrets from secret/old/ to secret/new/:
vault-kv-mv secret/old/ secret/new/- Clone this repository.
go build
Run the test suite with:
go test -v ./...This project is licensed under the MIT License - see the LICENSE file for details.