Skip to main content

Crate tsafe_azure

Crate tsafe_azure 

Source
Expand description

Optional Azure Key Vault integration for tsafe.

Pulls secrets from an Azure Key Vault and imports them into the local tsafe vault. The local vault remains the single source of truth — KV is purely a read source. No secret data is ever written back to Azure.

§Configuration (environment variables)

VariableRequiredDescription
TSAFE_AKV_URLyesKey Vault endpoint, e.g. https://myvault.vault.azure.net
AZURE_TENANT_IDSP authAAD tenant ID
AZURE_CLIENT_IDSP authService principal / app registration client ID
AZURE_CLIENT_SECRETSP authService principal client secret

If AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET are all set, a client-credentials token is obtained. Otherwise the IMDS managed identity endpoint is tried automatically (works inside Azure VMs / ACI).

§Key normalisation

Key Vault secret names use hyphens (my-secret). On import they are normalised to MY_SECRET (uppercase, hyphens → underscores) so they are immediately usable as environment variables.

Re-exports§

pub use auth::acquire_token;
pub use config::KvConfig;
pub use error::KvError;
pub use keyvault::delete_secret;
pub use keyvault::pull_secrets;
pub use keyvault::push_secret;
pub use keyvault::PushOutcome;

Modules§

auth
config
error
keyvault
Azure Key Vault HTTP client.