lmrc-vault
HashiCorp Vault management library for the LMRC Stack - comprehensive library for managing Vault installations on Kubernetes/K3s clusters and interacting with the Vault API for secret management.
Features
- Vault Deployment: Deploy Vault to K3s/Kubernetes clusters via Helm charts
- Secret Operations: Read, write, list, and delete secrets using KV v2 engine
- Authentication: Token-based and Kubernetes service account authentication
- Initialization & Unsealing: Initialize Vault clusters and manage unseal operations
- Policy Management: Create, read, list, and delete Vault policies
- Builder Pattern API: Fluent, type-safe configuration for both client and deployment
- Error Handling: Comprehensive error types with context
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
Using Vault Client for Secret Management
use ;
async
Deploying Vault to K3s
use ;
Usage
For detailed usage examples, configuration options, and best practices, see the full documentation.
Secret Path Format
The library uses Vault's KV v2 engine path format: mount/data/secret-path
Example: secret/data/myapp/database/credentials
Security Considerations
- Store root token securely and revoke after initial setup
- Distribute unseal keys to multiple trusted parties
- Always use TLS in production
- Implement principle of least privilege with policies
- Enable audit logging for security monitoring
Development
# Build
# Test
# Lint
License
Dual licensed under MIT OR Apache-2.0
Repository
https://gitlab.com/lemarco/lmrc-stack
Author
Lemarc lemarc.dev@gmail.com