Skip to content

Commit 1835935

Browse files
committed
add steps for revoking keys
1 parent 83f87c7 commit 1835935

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

articles/storage/common/storage-encryption-keys-cli.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 01/10/2020
10+
ms.date: 03/10/2020
1111
ms.author: tamram
1212
ms.reviewer: cbrooks
1313
ms.subservice: common
@@ -116,11 +116,21 @@ When you create a new version of a key, you'll need to update the storage accoun
116116

117117
To change the key used for Azure Storage encryption, call [az storage account update](/cli/azure/storage/account#az-storage-account-update) as shown in [Configure encryption with customer-managed keys](#configure-encryption-with-customer-managed-keys) and provide the new key name and version. If the new key is in a different key vault, also update the key vault URI.
118118

119+
## Revoke customer-managed keys
120+
121+
If you believe that a key may have been compromised, you can revoke customer-managed keys by removing the key vault access policy. To revoke a customer-managed key, call the [az keyvault delete-policy](/cli/azure/keyvault#az-keyvault-delete-policy) command, as shown in the following example. Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.
122+
123+
```azurecli-interactive
124+
az keyvault delete-policy \
125+
--name <key-vault> \
126+
--object-id $storage_account_principal
127+
```
128+
119129
## Disable customer-managed keys
120130

121131
When you disable customer-managed keys, your storage account is once again encrypted with Microsoft-managed keys. To disable customer-managed keys, call [az storage account update](/cli/azure/storage/account#az-storage-account-update) and set the `--encryption-key-source parameter` to `Microsoft.Storage`, as shown in the following example. Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.
122132

123-
```powershell
133+
```azurecli-interactive
124134
az storage account update
125135
--name <storage-account> \
126136
--resource-group <resource_group> \

articles/storage/common/storage-encryption-keys-powershell.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 01/03/2019
10+
ms.date: 03/10/2020
1111
ms.author: tamram
1212
ms.reviewer: cbrooks
1313
ms.subservice: common
@@ -93,6 +93,15 @@ When you create a new version of a key, you'll need to update the storage accoun
9393

9494
To change the key used for Azure Storage encryption, call [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) as shown in [Configure encryption with customer-managed keys](#configure-encryption-with-customer-managed-keys) and provide the new key name and version. If the new key is in a different key vault, also update the key vault URI.
9595

96+
## Revoke customer-managed keys
97+
98+
f you believe that a key may have been compromised, you can revoke customer-managed keys by removing the key vault access policy. To revoke a customer-managed key, call the [Remove-AzKeyVaultAccessPolicy](/powershell/module/az.keyvault/remove-azkeyvaultaccesspolicy) command, as shown in the following example. Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.
99+
100+
```powershell
101+
Remove-AzKeyVaultAccessPolicy -VaultName $keyVault.VaultName `
102+
-ObjectId $storageAccount.Identity.PrincipalId `
103+
```
104+
96105
## Disable customer-managed keys
97106

98107
When you disable customer-managed keys, your storage account is once again encrypted with Microsoft-managed keys. To disable customer-managed keys, call [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) with the `-StorageEncryption` option, as shown in the following example. Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.

articles/storage/common/storage-service-encryption.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ Rotating the key does not trigger re-encryption of data in the storage account.
108108

109109
### Revoke access to customer-managed keys
110110

111-
To revoke access to customer-managed keys, use PowerShell or Azure CLI. For more information, see [Azure Key Vault PowerShell](/powershell/module/az.keyvault//) or [Azure Key Vault CLI](/cli/azure/keyvault). Revoking access effectively blocks access to all data in the storage account, as the encryption key is inaccessible by Azure Storage.
112-
113-
After access to customer-managed keys is revoked, operations that read from or write to a blob or its metadata are not permitted. All other data operations are permitted. The specific operations that are not permitted are:
111+
You can revoke customer-managed keys if you believe that a key may have been compromised. After access to customer-managed keys is revoked, operations that read from or write to a blob or its metadata are not permitted. All other data operations are permitted. The specific operations that are not permitted are:
114112

115113
- [List Blobs](/rest/api/storageservices/list-blobs), when called with the `include=metadata` parameter on the request URI
116114
- [Get Blob](/rest/api/storageservices/get-blob)
@@ -130,7 +128,9 @@ After access to customer-managed keys is revoked, operations that read from or w
130128
- [Put Page From URL](/rest/api/storageservices/put-page-from-url)
131129
- [Incremental Copy Blob](/rest/api/storageservices/incremental-copy-blob)
132130

133-
After customer-managed keys are revoked for the storage account, calling any of the listed operations will fail with error code 403 (Forbidden) for all users. To call these operations again, configure a new customer-managed key.
131+
After customer-managed keys are revoked for the storage account, calling any of the listed operations will fail with error code 403 (Forbidden) for all users. To call these operations again, restore access to the customer-managed key.
132+
133+
To revoke access to customer-managed keys, use [PowerShell](storage-encryption-keys-powershell.md#revoke-customer-managed-keys) or [Azure CLI](storage-encryption-keys-cli.md#revoke-customer-managed-keys).
134134

135135
### Customer-managed keys for Azure managed disks (preview)
136136

0 commit comments

Comments
 (0)