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
+15-21Lines changed: 15 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Azure App Configuration encrypts sensitive information at rest by using a 256-bi
19
19
> [!IMPORTANT]
20
20
> If the identity assigned to the App Configuration instance is no longer authorized to unwrap the instance's encryption key, or if the managed key is permanently deleted, then it will no longer be possible to decrypt sensitive information stored in the App Configuration instance. By using Azure Key Vault's [soft delete](../key-vault/general/soft-delete-overview.md) function, you mitigate the chance of accidentally deleting your encryption key.
21
21
22
-
When users enable the customermanaged key capability on their Azure App Configuration instance, they control the service’s ability to access their sensitive information. The managed key serves as a root encryption key. Users can revoke their App Configuration instance’s access to their managed key by changing their key vault access policy. When this access is revoked, App Configuration will lose the ability to decrypt user data within one hour. At this point, the App Configuration instance will forbid all access attempts. This situation is recoverable by granting the service access to the managed key once again. Within one hour, App Configuration will be able to decrypt user data and operate under normal conditions.
22
+
When users enable the customer-managed key capability on their Azure App Configuration instance, they control the service’s ability to access their sensitive information. The managed key serves as a root encryption key. Users can revoke their App Configuration instance’s access to their managed key by changing their key vault access policy. When this access is revoked, App Configuration will lose the ability to decrypt user data within one hour. At this point, the App Configuration instance will forbid all access attempts. This situation is recoverable by granting the service access to the managed key once again. Within one hour, App Configuration will be able to decrypt user data and operate under normal conditions.
23
23
24
24
> [!NOTE]
25
25
> All Azure App Configuration data is stored for up to 24 hours in an isolated backup. This includes the unwrapped encryption key. This data isn't immediately available to the service or service team. In the event of an emergency restore, Azure App Configuration will revoke itself again from the managed key data.
@@ -40,30 +40,24 @@ After these resources are configured, use the following steps so that the Azure
40
40
41
41
## Enable customer-managed key encryption for your App Configuration store
42
42
43
-
1.[Create an App Configuration store](./quickstart-azure-app-configuration-create.md) if you don't have one.
43
+
1.[Create an App Configuration store](./quickstart-azure-app-configuration-create.md)in the Standard tier if you don't have one.
44
44
45
-
1.Create an Azure Key Vault by using the Azure CLI. Both `vault-name` and `resource-group-name` are user-provided and must be unique. We use `contoso-vault` and `contoso-resource-group` in these examples.
45
+
1.Using the Azure CLI, create an Azure Key Vault with purge protection enabled. Soft delete is enabled by default. Both `vault-name` and `resource-group-name` are user-provided and must be unique. We use `contoso-vault` and `contoso-resource-group` in these examples.
46
46
47
47
```azurecli
48
-
az keyvault create --name contoso-vault --resource-group contoso-resource-group
48
+
az keyvault create --name contoso-vault --resource-group contoso-resource-group --enable-purge-protection
49
49
```
50
50
51
-
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.
52
-
53
-
```azurecli
54
-
az keyvault update --name contoso-vault --resource-group contoso-resource-group --enable-purge-protection --enable-soft-delete
55
-
```
56
-
57
-
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.
51
+
1. Create a Key Vault key. Provide a unique `key-name` for this key, and substitute the name of the Key Vault (`contoso-vault`) created in step 2. Specify whether you prefer `RSA` or `RSA-HSM` encryption (`RSA-HSM` is only available in the Premium tier).
58
52
59
53
```azurecli
60
54
az keyvault key create --name key-name --kty {RSA or RSA-HSM} --vault-name contoso-vault
61
55
```
62
56
63
-
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:
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:
1. Create a system-assigned managed identity by 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:
69
63
@@ -75,20 +69,20 @@ After these resources are configured, use the following steps so that the Azure
75
69
76
70
```json
77
71
{
78
-
"principalId": {Principal Id},
79
-
"tenantId": {Tenant Id},
80
-
"type": "SystemAssigned",
81
-
"userAssignedIdentities": null
72
+
"principalId": {Principal Id},
73
+
"tenantId": {Tenant Id},
74
+
"type": "SystemAssigned",
75
+
"userAssignedIdentities": null
82
76
}
83
77
```
84
78
85
-
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 access requires the principal ID of the App Configuration instance's managed identity. This value was obtained in the previous step. It's shown below as `contoso-principalId`. Grant permission to the managed key by using the command line:
79
+
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 access requires the principal ID of the App Configuration instance's managed identity. Replace the value shown below as `contoso-principalId` with the principal ID obtained in the previous step. Grant permission to the managed key by using the command line:
86
80
87
81
```azurecli
88
82
az keyvault set-policy -n contoso-vault --object-id contoso-principalId --key-permissions get wrapKey unwrapKey
89
83
```
90
84
91
-
1. After the Azure App Configuration instance can access the managed key, we can enable the customer-managed key capability in the service by using the Azure CLI. Recall the following properties recorded during the key creation steps: `key name` `key vault URI`.
85
+
1. Now that the Azure App Configuration instance can access the managed key, we can enable the customer-managed key capability in the service by using the Azure CLI. Recall the following properties recorded during the key creation steps: `key name` `key vault URI`.
For more information, see [List, update, and delete image resources](update-image-resources.md).
249
249
250
+
---
251
+
250
252
### Can I move my existing image to an Azure Compute Gallery?
251
253
252
254
Yes. There are 3 scenarios based on the types of images you may have.
@@ -302,22 +304,24 @@ There are two ways you can specify the number of image version replicas to be cr
302
304
1. The regional replica count which specifies the number of replicas you want to create per region.
303
305
2. The common replica count which is the default per region count in case regional replica count isn't specified.
304
306
305
-
###[Azure CLI]
307
+
# [Azure CLI](#tab/azure-cli)
306
308
307
309
To specify the regional replica count, pass the location along with the number of replicas you want to create in that region: "South Central US=2".
308
310
309
311
If regional replica count isn't specified with each location, then the default number of replicas will be the common replica count that you specified.
310
312
311
313
To specify the common replica count in Azure CLI, use the **--replica-count** argument in the `az sig image-version create` command.
312
314
313
-
###[Azure PowerShell]
315
+
# [Azure PowerShell](#tab/azure-powershell)
314
316
315
317
To specify the regional replica count, pass the location along with the number of replicas you want to create in that region, `@{Name = 'South Central US';ReplicaCount = 2}`, to the **-TargetRegion** parameter in the `New-AzGalleryImageVersion` command.
316
318
317
319
If regional replica count isn't specified with each location, then the default number of replicas will be the common replica count that you specified.
318
320
319
321
To specify the common replica count in Azure PowerShell, use the **-ReplicaCount** parameter in the `New-AzGalleryImageVersion` command.
320
322
323
+
---
324
+
321
325
### Can I create the gallery in a different location than the one for the image definition and image version?
322
326
323
327
Yes, it's possible. But, as a best practice, we encourage you to keep the resource group, gallery, image definition, and image version in the same location.
0 commit comments