Skip to content
azure-keyvault-certificates-rust logo

Azure Key Vault Certificates SDK for Rust

azure-keyvault-certificates-rust

Azure Key Vault Certificates SDK for Rust. Use for creating, importing, and managing certificates.

ranbot-ai/awesome-skills0installs6stars

SKILL.md

Full skill instructions

Azure Key Vault Certificates SDK for Rust

Client library for Azure Key Vault Certificates — secure storage and management of certificates.

Installation

cargo add azure_security_keyvault_certificates azure_identity

Environment Variables

AZURE_KEYVAULT_URL=https://<vault-name>.vault.azure.net/

Authentication

use azure_identity::DeveloperToolsCredential;
use azure_security_keyvault_certificates::CertificateClient;

let credential = DeveloperToolsCredential::new(None)?;
let client = CertificateClient::new(
    "https://<vault-name>.vault.azure.net/",
    credential.clone(),
    None,
)?;

Core Operations

Get Certificate

use azure_core::base64;

let certificate = client
    .get_certificate("certificate-name", None)
    .await?
    .into_model()?;

println!(
    "Thumbprint: {:?}",
    certificate.x509_thumbprint.map(base64::encode_url_safe)
);

Create Certificate

use azure_security_keyvault_certificates::models::{
    CreateCertificateParameters, CertificatePolicy,
    IssuerParameters, X509CertificateProperties,
};

let policy = CertificatePolicy {
    issuer_parameters: Some(IssuerParameters {
        name: Some("Self".into()),
        ..Default::default()
    }),
    x509_certificate_properties: Some(X509CertificateProperties {
        subject: Some("CN=example.com".into()),
        ..Default::default()
    }),
    ..Default::default()
};

let params = CreateCertificateParameters {
    certificate_policy: Some(policy),
    ..Default::default()
};

let operation = client
    .create_certificate("cert-name", params.try_into()?, None)
    .await?;

Import Certificate

use azure_security_keyvault_certificates::models::ImportCertificateParameters;

let params = ImportCertificateParameters {
    base64_encoded_certificate: Some(base64_cert_data),
    password: Some("optional-password".into()),
    ..Default::default()
};

let certificate = client
    .import_certificate("cert-name", params.try_into()?, None)
    .await?
    .into_model()?;

Delete Certificate

client.delete_certificate("certificate-name", None).await?;

List Certificates

use azure_security_keyvault_certificates::ResourceExt;
use futures::TryStreamExt;

let mut pager = client.list_certificate_properties(None)?.into_stream();
while let Some(cert) = pager.try_next().await? {
    let name = cert.resource_id()?.name;
    println!("Certificate: {}", name);
}

Get Certificate Policy

let policy = client
    .get_certificate_policy("certificate-name", None)
    .await?
    .into_model()?;

Update Certificate Policy

use azure_security_keyvault_certificates::models::UpdateCertificatePolicyParameters;

let params = UpdateCertificatePolicyParameters {
    // Update policy properties
    ..Default::default()
};

client
    .update_certificate_policy("cert-name", params.try_into()?, None)
    .await?;

Certificate Lifecycle

  1. Create — generates new certificate with policy
  2. Import — import existing PFX/​PEM certificate
  3. Get — retrieve certificate (public key only)
  4. Update — modify certificate properties
  5. Delete — soft delete (recoverable)
  6. Purge — permanent deletion

Best Practices

  1. Use Entra ID auth — DeveloperToolsCredential for dev
  2. Use managed certificates — auto-renewal with supported issuers
  3. Set proper validity period — balance security and maintenance
  4. Use certificate policies — define renewal and key properties
  5. Monitor expiration — set up alerts for expiring certificates
  6. Enable soft delete — required for production vaults

RBAC Permissions

Assign these Key Vault roles:

  • Key Vault Certificates Officer — full CRUD on certificates
  • Key Vault Reader — read certificate metadata

Reference Links

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

More skills from ranbot-ai

react-modernization logo
ranbot-ai/awesome-skills

react-modernization

Master React version upgrades, class to hooks migration, concurrent features adoption, and codemods for automated transformation.

6 1
View
cicd-automation-workflow-automate logo
ranbot-ai/awesome-skills

cicd-automation-workflow-automate

You are a workflow automation expert specializing in creating efficient CI/CD pipelines, GitHub Actions workflows, and automated development processes. Design and implement automation that reduces man

6 1
View
conductor-manage logo
ranbot-ai/awesome-skills

conductor-manage

Manage track lifecycle: archive, restore, delete, rename, and cleanup

6 0
View
c-pro logo
ranbot-ai/awesome-skills

c-pro

Write efficient C code with proper memory management, pointer

6 0
View
clerk-auth logo
ranbot-ai/awesome-skills

clerk-auth

Expert patterns for Clerk auth implementation, middleware, organizations, webhooks, and user sync

6 0
View
mezmo-automation logo
ranbot-ai/awesome-skills

mezmo-automation

Automate Mezmo tasks via Rube MCP (Composio). Always search tools first for current schemas.

6 0
View
fp-types-ref logo
ranbot-ai/awesome-skills

fp-types-ref

Quick reference for fp-ts types. Use when user asks which type to use, needs Option/Either/Task decision help, or wants fp-ts imports.

6 0
View
google-calendar-automation logo
ranbot-ai/awesome-skills

google-calendar-automation

Lightweight Google Calendar integration with standalone OAuth authentication. No MCP server required.

6 0
View
scala-pro logo
ranbot-ai/awesome-skills

scala-pro

Master enterprise-grade Scala development with functional programming, distributed systems, and big data processing. Expert in Apache Pekko, Akka, Spark, ZIO/Cats Effect, and reactive architectures.

6 0
View
python-development-python-scaffold logo
ranbot-ai/awesome-skills

python-development-python-scaffold

You are a Python project architecture expert specializing in scaffolding production-ready Python applications. Generate complete project structures with modern tooling (uv, FastAPI, Django), type hint

6 0
View
onedesk-automation logo
ranbot-ai/awesome-skills

onedesk-automation

Automate Onedesk tasks via Rube MCP (Composio). Always search tools first for current schemas.

6 0
View
googlecalendar-automation logo
ranbot-ai/awesome-skills

googlecalendar-automation

Automate Google Calendar tasks via Rube MCP (Composio). Always search tools first for current schemas.

6 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View