Skip to content

Commit f11139e

Browse files
authored
Merge pull request #2122 from Hanashiko/main
docs: add get key permission requirement for Azure Key Vault when version is omitted
2 parents 619e477 + 7fb2601 commit f11139e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,16 @@ 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
420420
421+
.. note::
422+
423+
The ``get`` key permission is required when the key version is ommited (for example if 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.
424+
421425
Now you can encrypt a file using::
422426
423427
$ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml

0 commit comments

Comments
 (0)