#azure #microsoft #sdk #keyvault #cloud

archived azure-sdk-keyvault

Rust wrapper around Microsoft Azure REST APIs for Azure Key Vault

8 releases

0.1.13 May 30, 2020
0.1.12 May 30, 2020

#15 in #microsoft

Download history 1/week @ 2022-03-02 1/week @ 2022-03-09 41/week @ 2022-03-16 16/week @ 2022-03-23 24/week @ 2022-04-27 49/week @ 2022-05-04 120/week @ 2022-05-11 36/week @ 2022-05-18 33/week @ 2022-05-25 59/week @ 2022-06-01 29/week @ 2022-06-08 3/week @ 2022-06-15

134 downloads per month

MIT license

39KB
641 lines

azure-sdk-keyvault

Crates.io Crates.io Build Status

🚧 Work in progress, do not use in production. 🚧

About this Crate

Azure Key Vault is a service in Microsoft Azure for securely storing and accessing secrets, credentials and certificates in the cloud. This crate exposes Rust bindings for the Azure Key Vault REST API.

This was started as a standalone contribution to MindFlavor/AzureSDKForRust, which has many other useful Azure REST API bindings for Rust.

Important Disclaimer

I am a Microsoft employee, but this is not an official Microsoft product nor an endorsed product. Purely a project for fun and for learning Rust.

Example Usage

use azure_sdk_keyvault::KeyVaultClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut client = KeyVaultClient::new(&"c1a6d79b-082b-4798-b362-a77e96de50db", &"SUPER_SECRET_KEY", &"bc598e67-03d8-44d5-aa46-8289b9a39a14", &"test-keyvault");

    // Set a secret.
    client.set_secret("test-secret", "42").await?;

    // Get a secret.
    let secret = client.get_secret("test-secret").await?;
    assert_eq!("42", secret.value());

    Ok(())
}

Features

Secrets

  • Get secret
  • Get secret versions
  • List secrets
  • Set secret
  • Update secret
  • Delete secret
  • Restore secret
  • Backup secret

Contributions

...are welcome! Currently the repo exposes a very small number of operations.

Related Work

This project was started from the fantastic MindFlavor/AzureSDKForRust repo.

Dependencies

~22MB
~500K SLoC