Skip to main content

Azure Key Vault

Keep secret values in an Azure Key Vault. Read Secret stores first for how stores, Resolve on and the default store work.

What you need​

SettingWhere to find it
Vault URLAzure portal → your key vault → Overview → Vault URI, e.g. https://acme-prod.vault.azure.net. Sovereign clouds (vault.azure.cn, vault.usgovcloudapi.net) work too
AuthenticationSee below: depends on Resolve on

Secret names in Key Vault use letters, digits and dashes (stripe-api-key, not stripe_api_key). Key Vault has no #field syntax: one entry is one value.

Resolve on Blokkio cloud: app registration​

Blokkio signs in as an app registration (service principal) with a client secret.

  1. Microsoft Entra ID → App registrations → New registration. Any name, e.g. Blokkio secrets. Copy the Application (client) ID and the Directory (tenant) ID from its overview.

  2. Certificates & secrets → New client secret. Copy the secret Value (shown once).

  3. In the key vault, Access control (IAM) → Add role assignment for the app:

    • Key Vault Secrets User to read secrets, or
    • Key Vault Secrets Officer if Blokkio should also create and delete secrets (values typed into Blokkio, connection credentials of the default store).

    Vaults that use access policies instead of RBAC: give the app Get (plus Set and Delete to write).

  4. In Blokkio, add the store with the vault URL, tenant ID, client ID and client secret, then Test connection.

The vault's firewall must allow access from the internet (or from Blokkio's outbound addresses). Managed and workload identity aren't offered for cloud stores: on Blokkio cloud they would be Blokkio's identity, not yours.

Resolve on your worker pool: the worker's identity​

The worker reads the vault with its own Azure identity; nothing is saved in Blokkio.

AuthenticationWhat the worker needs
Managed identity of the workerRun the worker on an Azure VM, VM scale set, Container Apps or App Service with a managed identity. Leave Client ID empty for the system-assigned identity, or enter the client ID of a user-assigned identity
Workload identity (Kubernetes)AKS with Microsoft Entra Workload ID: the webhook sets AZURE_FEDERATED_TOKEN_FILE, AZURE_TENANT_ID and AZURE_CLIENT_ID on the pod (or enter tenant / client ID on the store)
Client secret in the worker's environmentSet AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET (or AZURE_CLIENT_CERTIFICATE_PATH) on the worker container

Give that identity Key Vault Secrets User on the vault. Blokkio never writes into worker-pool vaults, so read access is enough.

Behaviour​

  • Deleting a secret Blokkio created starts a soft delete; the vault's retention and purge protection settings decide when it is gone for good. Entries Blokkio writes are tagged managed-by: blokkio.
  • The vault's own versions are used: Blokkio always reads the current version.

Test it live​

Blokkio's automated tests mock Azure. To try a real vault you need: the vault URL, a tenant ID, a client ID and a client secret of an app registration with Key Vault Secrets User (or Officer) on the vault, and one secret in the vault to reference. For worker-pool stores, a worker running on Azure with a managed identity that has the same role.

Troubleshooting​

MessageWhat to do
Azure sign-in failedCheck tenant ID, client ID and client secret (secrets expire), or the identity on the worker
The identity has no access to secrets in this vault (403)Assign Key Vault Secrets User / Officer, or an access policy. Role assignments can take a few minutes
Azure Key Vault rejected the sign-in (401)The vault is in a different tenant than the app registration
There is no secret named … in …Check the name in Secrets of the vault (names are case-insensitive in Azure)