https://github.com/commercetools/vaultier
Vault secrets reader
https://github.com/commercetools/vaultier
Last synced: about 1 year ago
JSON representation
Vault secrets reader
- Host: GitHub
- URL: https://github.com/commercetools/vaultier
- Owner: commercetools
- License: mit
- Created: 2023-09-01T09:17:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T13:09:31.000Z (over 1 year ago)
- Last Synced: 2025-04-20T15:18:00.235Z (about 1 year ago)
- Language: Rust
- Homepage: https://docs.rs/vaultier
- Size: 31.3 KB
- Stars: 16
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Vaultier `/slɒθ/` :sloth:
Small crate to read secrets from Hashicorp Vault. Based on [vaultrs](https://github.com/jmgilman/vaultrs).
## Usage
```rust
use vaultier::SecretClient;
use serde::Deserialize;
#[derive(Deserialize)]
struct MySecrets {
pub username: String,
pub password: String,
}
let address = "";
let mount = String::from("");
let base_path = String::from("");
// With token or default feature enabled
let client = SecretClient::new(address, mount, base_path, None).unwrap();
// With auth feature enabled
let auth_mount = "";
let role = "";
let client = SecretClient::create(address, auth_mount, role, mount, base_path).unwrap();
// read secrets from that base path
let secrets = client.read_secrets::().await.unwrap();
// read secrets from the passed path relative to the base path: mount/data/base_path/my-secrets
let secrets = client.read_secrets_from::("my-secrets").await.unwrap();
```
## License
[MIT](./LICENSE-MIT)