Skip to content

Azure Key Vault

Jiho Kim edited this page Nov 21, 2023 · 2 revisions

Azure Key Vault is the one place where we will be able to store and share all of our API, DBMS, and OAuth secrets.

Here is how you can access it:

  1. Create a free Azure for Students account.
  2. Install Azure CLI and sign-in.
  3. Ask @kcarnold to be added as Key Vault Secrets User.
  4. Use this vault URI to access the secrets: https://arnoldlab.vault.azure.net/

Run this program as a test:

pip install azure-keyvault-secrets azure-identity
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential

VAULT_URL = "https://arnoldlab.vault.azure.net/"

credential = DefaultAzureCredential()
client = SecretClient(vault_url=VAULT_URL, credential=credential)

bank_secret = client.get_secret("TEST")
print(f"Secret with name '{bank_secret.name}' was found with value '{bank_secret.value}'.")

You should get the following output: Secret with name 'TEST' was found with value 'thisisatestkey'.

Clone this wiki locally