mx-keyvault
Azure Key Vault integration for secret management.
Features
- Secure mnemonic storage
- Flexible credential resolution (Client Secret, Developer Tools, Managed Identity)
Usage
use KeyVaultClient;
// Client creation is synchronous
let client = new?;
// Fetching secrets is async and returns Option<String>
let mnemonic: = client.fetch_secret.await?;
Credential Resolution
Credentials are resolved in the following order:
-
Client Secret - If all three environment variables are present:
AZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRET
-
Developer Tools - Fallback when client secret credentials are not complete. Uses Azure CLI, VS Code, or other developer tool credentials.
-
Managed Identity - For Azure-hosted services (App Service, AKS, VMs with managed identity enabled).
To disable Developer Tools/Managed Identity fallback, set:
AZURE_IDENTITY_DISABLE_MANAGED_IDENTITY_CREDENTIAL=true