Skip to content

Commit b1c2393

Browse files
committed
docs: add get key permission requirement for Azure Key Vault when version is omitted
1 parent a1bd885 commit b1c2393

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,13 @@ from the commandline:
412412
$ az keyvault create --name $keyvault_name --resource-group sops-rg --location westeurope
413413
$ az keyvault key create --name sops-key --vault-name $keyvault_name --protection software --ops encrypt decrypt
414414
$ az keyvault set-policy --name $keyvault_name --resource-group sops-rg --spn $AZURE_CLIENT_ID \
415-
--key-permissions encrypt decrypt
415+
--key-permissions get encrypt decrypt
416416
# Read the key id:
417417
$ az keyvault key show --name sops-key --vault-name $keyvault_name --query key.kid
418418
419419
https://sops.vault.azure.net/keys/sops-key/some-string
420+
.. note::
421+
The ``get`` key permission is required when the key version is ommited (i.e the URL ends with a trailing slash). In that case SOPS calls the Azure Key Vault API to resolve the latest key version, which requires the ``get`` permission. If you specifty an explicit key version in the URL you can omit ``get``, but this means you will need to update your configuration every time the key is rotated.
420422
421423
Now you can encrypt a file using::
422424

0 commit comments

Comments
 (0)