| Crates.io | llm-orchestrator-secrets |
| lib.rs | llm-orchestrator-secrets |
| version | 0.1.1 |
| created_at | 2025-11-14 22:27:15.236193+00 |
| updated_at | 2025-11-14 23:43:17.108401+00 |
| description | Secret management for LLM Orchestrator with Vault, AWS Secrets Manager, and environment variable support |
| homepage | https://llm-devops.io/orchestrator |
| repository | https://github.com/llm-devops/llm-orchestrator |
| max_upload_size | |
| id | 1933598 |
| size | 169,162 |
Comprehensive secret management for the LLM Orchestrator, providing secure storage and retrieval of sensitive configuration data.
Add to your Cargo.toml:
[dependencies]
llm-orchestrator-secrets = "0.1"
use llm_orchestrator_secrets::{EnvSecretStore, SecretStore};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let store = EnvSecretStore::new();
// Reads from OPENAI_API_KEY environment variable
let secret = store.get_secret("openai/api_key").await?;
println!("Retrieved API key: {}", secret.key);
Ok(())
}
use llm_orchestrator_secrets::{VaultSecretStore, SecretStore};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let store = VaultSecretStore::new(
"https://vault.example.com:8200".to_string(),
"hvs.YOUR_TOKEN".to_string(),
)?;
let secret = store.get_secret("database/password").await?;
Ok(())
}
use llm_orchestrator_secrets::{AwsSecretStore, SecretStore};
use aws_sdk_secretsmanager::config::Region;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let store = AwsSecretStore::new(Region::new("us-east-1")).await?;
let secret = store.get_secret("prod/api/key").await?;
Ok(())
}
use llm_orchestrator_secrets::{SecretManagerBuilder, SecretStoreType};
use chrono::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let store = SecretManagerBuilder::new(SecretStoreType::Environment)
.with_cache(Duration::minutes(10))
.build()
.await?;
let secret = store.get_secret("api_key").await?;
Ok(())
}
| Backend | Production Ready | Versioning | Rotation | Caching |
|---|---|---|---|---|
| Environment Variables | Development only | ❌ | ❌ | ✅ |
| HashiCorp Vault | ✅ | ✅ | ✅ | ✅ |
| AWS Secrets Manager | ✅ | ✅ | ✅ | ✅ |
All backends implement the SecretStore trait:
#[async_trait]
pub trait SecretStore: Send + Sync {
async fn get_secret(&self, key: &str) -> Result<Secret>;
async fn put_secret(&self, key: &str, value: &str, metadata: Option<SecretMetadata>) -> Result<()>;
async fn delete_secret(&self, key: &str) -> Result<()>;
async fn list_secrets(&self, prefix: &str) -> Result<Vec<String>>;
async fn rotate_secret(&self, key: &str) -> Result<Secret>;
async fn health_check(&self) -> Result<()>;
async fn get_secret_versions(&self, key: &str) -> Result<Vec<SecretVersion>>;
async fn get_secret_version(&self, key: &str, version: &str) -> Result<Secret>;
}
pub struct Secret {
pub key: String,
pub value: String,
pub version: Option<String>,
pub created_at: DateTime<Utc>,
pub metadata: HashMap<String, String>,
}
The crate includes comprehensive unit and integration tests:
cargo test -p llm-orchestrator-secrets
Tests cover:
See the main documentation for complete examples:
MIT OR Apache-2.0