Skip to content

Commit 3a7ff91

Browse files
committed
Merge branch 'patch-3' of https://github.com/EldertGrootenboer/azure-docs into sbuscmk0203
2 parents 6f94ea1 + 00444da commit 3a7ff91

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

articles/service-bus-messaging/configure-customer-managed-key.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,20 @@ To enable customer-managed keys in the Azure portal, follow these steps:
3333

3434
After you enable customer-managed keys, you need to associate the customer managed key with your Azure Service Bus namespace. Service Bus supports only Azure Key Vault. If you enable the **Encryption with customer-managed key** option in the previous section, you need to have the key imported into Azure Key Vault. Also, the keys must have **Soft Delete** and **Do Not Purge** configured for the key. These settings can be configured using [PowerShell](/azure/key-vault/general/key-vault-recovery) or [CLI](/azure/key-vault/general/key-vault-recovery).
3535

36-
1. To create a new key vault, follow the Azure Key Vault [Quickstart](/azure/key-vault/general/overview). For more information about importing existing keys, see [About keys, secrets, and certificates](/azure/key-vault/general/about-keys-secrets-certificates).
36+
# [Key Vault](#tab/Key-Vault)
37+
38+
1. To create a new Key Vault, follow the Azure Key Vault [Quickstart](/azure/key-vault/general/quick-create-cli).
39+
40+
# [Key Vault Managed HSM](#tab/Key-Vault-Managed-HSM)
3741

38-
> [!IMPORTANT]
39-
> Using customer-managed keys with Azure Service Bus requires that the key vault have two required properties configured. They are: **Soft Delete** and **Do Not Purge**. The Soft Delete property is enabled by default when you create a new key vault in the Azure portal whereas the Purge Protection is optional so make sure to select it when creating the Key Vault. Also, if you need to enable these properties on an existing key vault, you must use either PowerShell or Azure CLI.
42+
1. To create a new Managed HSM, follow the Managed HSM [Quickstart](/azure/key-vault/managed-hsm/quick-create-cli).
43+
44+
---
45+
46+
For more information about importing existing keys, see [About keys, secrets, and certificates](/azure/key-vault/general/about-keys-secrets-certificates).
47+
48+
> [!IMPORTANT]
49+
> Using customer-managed keys with Azure Service Bus requires that the vault have two required properties configured. They are: **Soft Delete** and **Do Not Purge**. The Soft Delete property is enabled by default when you create a new vault in the Azure portal whereas the Purge Protection is optional so make sure to select it when creating the vault. Also, if you need to enable these properties on an existing key vault, you must use either PowerShell or Azure CLI.
4050
4151
# [Key Vault](#tab/Key-Vault)
4252
@@ -45,7 +55,7 @@ After you enable customer-managed keys, you need to associate the customer manag
4555
```azurecli-interactive
4656
az keyvault create --name contoso-SB-BYOK-keyvault --resource-group ContosoRG --location westus --enable-soft-delete true --enable-purge-protection true
4757
```
48-
58+
4959
3. To add purge protection to an existing vault (that already has soft delete enabled), use the [az keyvault update](/cli/azure/keyvault#az-keyvault-update) command.
5060

5161
```azurecli-interactive
@@ -57,8 +67,10 @@ az keyvault update --name contoso-SB-BYOK-keyvault --resource-group ContosoRG --
5767
2. To turn on both soft delete and purge protection when creating a vault, use the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command.
5868

5969
```azurecli-interactive
60-
az keyvault create --hsm-name contoso-SB-BYOK-keyvault --resource-group ContosoRG --location westus --enable-soft-delete true --enable-purge-protection true
61-
```
70+
az keyvault create --hsm-name contoso-SB-BYOK-keyvault --resource-group ContosoRG --location westus --enable-purge-protection true --retention-days 90 --administrators 86a8f506-bb1c-4964-839a-78287daf85b1
71+
```
72+
73+
After creation you will need to [activate the Managed HSM](/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) and ensure that you have the correct permissions to generate keys by [assigning an RBAC role and local RBAC role](/azure/key-vault/managed-hsm/secure-your-managed-hsm) with he correct permissions.
6274

6375
3. To add purge protection to an existing vault (that already has soft delete enabled), use the [az keyvault update](/cli/azure/keyvault#az-keyvault-update) command.
6476

0 commit comments

Comments
 (0)