azure-keyvault-secrets-rust
Allows your agent to store and access secrets in Azure Key Vault using Rust. Ideal for passwords and API keys.
What it does
This tool allows computer programs to securely store and retrieve sensitive information, like passwords and access keys, in a place called Azure Key Vault. It is written in the Rust programming language.
When to use it
- ✓When a program needs to save a new password.
- ✓When a program needs to retrieve an old access key.
- ✓When you want to list all stored passwords.
Example of what to ask your AI
“How do I make my program store the password 'my_secret_password' with the name 'api_key' in Azure Key Vault?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The program connects to Azure Key Vault using security credentials. Then, it can send or request secret information, as if using a secure digital vault.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill azure-keyvault-secrets-rustOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/azure-keyvault-secrets-rust/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Azure Key Vault Secrets SDK for Rust
Client library for Azure Key Vault Secrets — secure storage for passwords, API keys, and other secrets.
The examples below require a reviewed compatible crate set and replacement of every resource placeholder. Do not use production data for demonstration writes.
Installation
cargo add azure_security_keyvault_secrets@=1.0.1 azure_identity@=1.0.0 azure_core@=1.1.0
Environment Variables
export AZURE_KEYVAULT_URL="https://<vault-name>.vault.azure.net/"
Authentication
use azure_identity::DeveloperToolsCredential;
use azure_security_keyvault_secrets::SecretClient;
let credential = DeveloperToolsCredential::new(None)?;
let client = SecretClient::new(
"https://<vault-name>.vault.azure.net/",
credential.clone(),
None,
)?;
Core Operations
Get Secret
let secret = client
.get_secret("secret-name", None)
.await?
.into_model()?;
let secret_value = secret.value.ok_or("Secret has no value")?;
// Pass directly to the authorized consumer; never print the value.
Set Secret
use azure_security_keyvault_secrets::models::SetSecretParameters;
let params = SetSecretParameters {
value: Some("secret-value".into()),
..Default::default()
};
let secret = client
.set_secret("secret-name", params.try_into()?, None)
.await?
.into_model()?;
Update Secret Properties
use azure_security_keyvault_secrets::models::UpdateSecretPropertiesParameters;
use std::collections::HashMap;
let params = UpdateSecretPropertiesParameters {
content_type: Some("text/plain".into()),
tags: Some(HashMap::from([("env".into(), "prod".into())])),
..Default::default()
};
client
.update_secret_properties("secret-name", params.try_into()?, None)
.await?;
Delete Secret
client.delete_secret("secret-name", None).await?;
List Secrets
use azure_security_keyvault_secrets::ResourceExt;
use futures::TryStreamExt;
let mut pager = client.list_secret_properties(None)?;
while let Some(secret) = pager.try_next().await? {
let name = secret.resource_id()?.name;
println!("Secret: {}", name);
}
Get Specific Version
use azure_security_keyvault_secrets::models::SecretClientGetSecretOptions;
let options = SecretClientGetSecretOptions {
secret_version: Some("version-id".into()),
..Default::default()
};
let secret = client
.get_secret("secret-name", Some(options))
.await?
.into_model()?;
Best Practices
- Use Entra ID auth —
DeveloperToolsCredentialfor dev,ManagedIdentityCredentialfor production - Use
into_model()?— to deserialize responses - Use
ResourceExttrait — for extracting names from IDs - Handle soft delete — deleted secrets can be recovered within retention period
- Set content type — helps identify secret format
- Use tags — for organizing and filtering secrets
- Version secrets — new values create new versions automatically
RBAC Permissions
Assign these Key Vault roles:
Key Vault Secrets User— get and listKey Vault Secrets Officer— full CRUD
The reviewed example set uses azure_security_keyvault_secrets 1.0.1 and compatible Azure core/credential crates. Record and commit Cargo.lock; source/API review is not a compiler or live-service test.
Reference Links
| Resource | Link |
|---|---|
| API Reference | https://docs.rs/azure_security_keyvault_secrets |
| Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/keyvault/azure_security_keyvault_secrets |
| crates.io | https://crates.io/crates/azure_security_keyvault_secrets |
When to Use
Use when a Rust application retrieves a specified secret/version or performs authorized secret creation, metadata updates, listing or deletion in an identified Key Vault.
Limitations
- Examples are fragments inside async application code, with compatible pinned Azure crates and the required Tokio/Serde/Futures dependencies; verify the selected version’s API before use. They were reviewed against official source/reference, not compiled or run against a cloud account here.
…
FAQ
What is Azure Key Vault?
It is a Microsoft service that securely stores sensitive information, such as passwords, keys, and certificates.
What is Rust?
It is a programming language known for being fast and safe.
Can I store anything?
Yes, you can store passwords, API keys, certificates, and other types of secrets that need protection.
Details
Original description by the author
Azure Key Vault Secrets SDK for Rust. Use for storing and retrieving secrets, passwords, and API keys. Triggers: "keyvault secrets rust", "SecretClient rust", "get secret rust", "set secret rust".
Popularity
- GitHub stars
- 48k
- Ranking position
- #2329
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
api-connector-builder
Has your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
affaan-m/ECC
api-design
Helps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
affaan-m/ECC
backend-patterns
Helps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.
affaan-m/ECC