Synchronization for Hashicorp vault key-value stores
Project description
vault-sync
What is vault-sync?
vault-sync is a command-line tool for synchronizing secrets from one Hashicorp Vault instance or another.
This can useful either for backup reasons or for ensuring that changes in one environment are correctly brought over to the other.
vault_sync has support for the following authentication methods:
- token
- approle
- kubernetes (experimental)
Using vault-sync and config file
Vault-sync is a command-line tool that by default uses a small JSON document file to connect to the vault instances.
Any file can be used by the tool by using the --config=<path to file> flag. Do note however that pydantic is used to strictly
enforce the layout of the JSON document.
Example configs:
One time sync with token:
{
"source": {
"auth_method": "token",
"url": "https://test1.com",
"token": "aabbccddeeff",
"kv_store": "store1"
},
"destination": {
"auth_method": "token",
"url": "https://test2.com",
"token": "0011223344",
"kv_store": "store2"
}
}
Sync every 5 minutes (with kubernetes and approle auth_methods):
{
"source": {
"auth_method": "kubernetes",
"url": "https://test1.com",
"token_path": "/run/secrets/kubernetes.io/serviceaccount/token",
"secret_id": "vrl-vault-sync",
"kv_store": "store1"
},
"destination": {
"auth_method": "approle",
"url": "https://test2.com",
"role_id": "8d900c30-e078-4981-a1be-01c2a0770f2b",
"secret_id": "d1c5468e-15ee-427f-b69d-b77d214b2bfd",
"kv_store": "store2"
},
"schedule": {
"every": 300
}
}
(*) approle is the default auth_method, so its fine to remove "auth_method": "approle" from your configuration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vault_sync-0.3.3.tar.gz.
File metadata
- Download URL: vault_sync-0.3.3.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.12.28
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
943cc3c851008947442cc5f624f735318b67801c0af3c86f904bab17a7cf7115
|
|
| MD5 |
3435adf6ffcd91530f47a109f3fda996
|
|
| BLAKE2b-256 |
0e7cd839638f30ae3f017cc416564e85341b9af84995399d814e7a8c10243531
|
File details
Details for the file vault_sync-0.3.3-py3-none-any.whl.
File metadata
- Download URL: vault_sync-0.3.3-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.12.28
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
666a548e83eb51049bc42318383003c8550708d737ae1ba0cf699fd60d39dedd
|
|
| MD5 |
08e0d63d08ed8a0db3b8e11ece3418da
|
|
| BLAKE2b-256 |
0acda8d8959cbff87e097d04c163cdeee6baee20f701bcb55ac56827aa785bbb
|