You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/concept-customer-managed-keys.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,26 +51,24 @@ To begin, you will need a properly configured Azure App Configuration instance.
51
51
az keyvault create --name contoso-vault --resource-group contoso-resource-group
52
52
```
53
53
54
-
1. Enable soft-delete and purge-protection for the Key Vault.
55
-
Substitute the names of the Key Vault (`contoso-vault`) and Resource Group (`contoso-resource-group`) created in step 1.
54
+
1. Enable soft-delete and purge-protection for the Key Vault. Substitute the names of the Key Vault (`contoso-vault`) and Resource Group (`contoso-resource-group`) created in step 1.
56
55
57
56
```azurecli
58
57
az keyvault update --name contoso-vault --resource-group contoso-resource-group --enable-purge-protection --enable-soft-delete
59
58
```
60
59
61
-
1. Create an Key Vault key
62
-
Provide a unique `key-name` for this key, and substitute the names of the Key Vault (`contoso-vault`) created in step 1. Specify whether you prefer `RSA` or `RSA-HSM` encryption.
60
+
1. Create a Key Vault key. Provide a unique `key-name` for this key, and substitute the names of the Key Vault (`contoso-vault`) created in step 1. Specify whether you prefer `RSA` or `RSA-HSM` encryption.
63
61
64
62
```azurecli
65
63
az keyvault key create --name key-name --kty {RSA or RSA-HSM} --vault-name contoso-vault
66
64
```
67
65
68
66
The output from this command shows the key ID ("kid") for the generated key. Make a note of the key ID to use later in this exercise. The key ID has the form: `https://{my key vault}.vault.azure.net/keys/{key-name}/{Key version}`. The key ID has three important components:
69
-
a. Key Vault URI: `https://{my key vault}.vault.azure.net
70
-
b. Key Vault key name: {Key Name}
71
-
c. Key Vault key version: {Key version}
72
-
1. Assign a Managed Identity
73
-
Assign a managed identity to an Azure App Configuration instance in order to access the managed key. Create a system assigned managed identity using the Azure CLI, substituting the name of your App Configuration instance and resource group used in the previous steps. We use `contoso-app-config` to illustrate the name of an App Configuration instance:
1. Create a system assigned managed identity using the Azure CLI, substituting the name of your App Configuration instance and resource group used in the previous steps. The managed identity will be used to access the managed key. We use `contoso-app-config` to illustrate the name of an App Configuration instance:
74
72
75
73
```azurecli
76
74
az appconfig identity assign --na1. me contoso-app-config --group contoso-resource-group --identities [system]
@@ -86,17 +84,19 @@ To begin, you will need a properly configured Azure App Configuration instance.
86
84
"userAssignedIdentities": null
87
85
}
88
86
```
89
-
90
-
1. Grant Key Vault access to App Configuration
91
-
The managed identity of the Azure App Configuration instance needs access to the key to perform key validation, encryption and decryption. The specific set of actions to which it needs access includes: `GET`, `WRAP`, and `UNWRAP` for keys. Granting the access requires the principal ID of the App Configuration instance's managed identity. This value was obtained in the previous step. It is shown below as `contoso-principalId` Grant permission to the managed key using the command line:
87
+
88
+
1. The managed identity of the Azure App Configuration instance needs access to the key to perform key validation, encryption and decryption. The specific set of actions to which it needs access includes: `GET`, `WRAP`, and `UNWRAP` for keys. Granting the access requires the principal ID of the App Configuration instance's managed identity. This value was obtained in the previous step. It is shown below as `contoso-principalId` Grant permission to the managed key using the command line:
89
+
92
90
```azurecli
93
91
az keyvault set-policy -n contoso-vault --object-id contoso-principalId --key-permissions get wrapKey unwrapKey
94
92
```
95
-
2. Enable customer-managed key
96
-
Once the Azure App Configuration instance can access the managed key, we can enable the customer-managed key capability in the service using the Azure CLI. Recall the following properties recorded during the key creation steps: `key name` `key vault URI`.
93
+
94
+
1. Once the Azure App Configuration instance can access the managed key, we can enable the customer-managed key capability in the service using the Azure CLI. Recall the following properties recorded during the key creation steps: `key name` `key vault URI`.
0 commit comments