Skip to content

docs: add get key permission requirement for Azure Key Vault when version is omitted#2122

Open
Hanashiko wants to merge 1 commit intogetsops:mainfrom
Hanashiko:main
Open

docs: add get key permission requirement for Azure Key Vault when version is omitted#2122
Hanashiko wants to merge 1 commit intogetsops:mainfrom
Hanashiko:main

Conversation

@Hanashiko
Copy link
Copy Markdown

Summary

Fixes #2112

When the key version is omitted from the Azure Key Vault URL (trailing slash), SOPS resolves the latest key version via the Azure Key Vault API. This requires the get key permission in addition to encrypt and decrypt, which was not mentioned in the documentation.

Changes:

  • Added get tot he recommended az keyvault set-policy --key-permissions command
  • Added a note explaining wht get is needed and the trade-off with explicit versioning

Copy link
Copy Markdown
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Please note that you must sign-off your commits, otherwise this cannot be merged. Thanks.

$ az keyvault key show --name sops-key --vault-name $keyvault_name --query key.kid

https://sops.vault.azure.net/keys/sops-key/some-string
.. note::
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. note::
.. note::


https://sops.vault.azure.net/keys/sops-key/some-string
.. note::
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.

@felixfontein
Copy link
Copy Markdown
Contributor

CI failures are unrelated, see #2123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure Key Vault documentation should mention get key permission is needed when key version is omitted

2 participants