Skip to content
Skillpedia
APIs & servers (backend)48k · #2329

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

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-keyvault-secrets-rust/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-keyvault-secrets-rust/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-rust

Or 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.md
Technical 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

  1. Use Entra ID auth — DeveloperToolsCredential for dev, ManagedIdentityCredential for production
  2. Use into_model()? — to deserialize responses
  3. Use ResourceExt trait — for extracting names from IDs
  4. Handle soft delete — deleted secrets can be recovered within retention period
  5. Set content type — helps identify secret format
  6. Use tags — for organizing and filtering secrets
  7. Version secrets — new values create new versions automatically

RBAC Permissions

Assign these Key Vault roles:

  • Key Vault Secrets User — get and list
  • Key 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".

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#2329
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills