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/automation/automation-secure-asset-encryption.md
+29-21Lines changed: 29 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,52 +26,54 @@ Each secure asset is encrypted and stored in Azure Automation using a unique key
26
26
27
27
## Customer-managed Keys with Key Vault (preview)
28
28
29
-
You can manage encryption of secure assets in Azure Automation at the level of an automation account with your own keys. When you specify a customer-managed key at the level of the Automation account, that key is used to protect and control access to the account encryption key for the automation account, which in turn is used to encrypt and decrypt all the secure assets. Customer-managed keys offer greater flexibility to create, rotate, disable, and revoke access controls. You can also audit the encryption keys used to protect your secure assets.
29
+
You can manage encryption of secure assets in Azure Automation at the level of an Automation account with your own keys. When you specify a customer-managed key at the level of the Automation account, that key is used to protect and control access to the account encryption key for the Automation account. This in turn is used to encrypt and decrypt all the secure assets. Customer-managed keys offer greater flexibility to create, rotate, disable, and revoke access controls. You can also audit the encryption keys used to protect your secure assets.
30
30
31
31
You must use Azure Key Vault to store customer-managed keys. You can either create your own keys and store them in a key vault, or you can use the Azure Key Vault APIs to generate keys. For more information about Azure Key Vault, see [What is Azure Key Vault?](../key-vault/key-vault-overview.md)
32
32
33
33
## Enable customer-managed keys for an Automation account
34
34
35
-
When you enable encryption with customer-managed keys for an automation account, Azure Automation wraps the account encryption key with the customer-managed key in the associated key vault. Enabling customer-managed keys does not impact performance, and the account is encrypted with the new key immediately, without any time delay.
35
+
When you enable encryption with customer-managed keys for an Automation account, Azure Automation wraps the account encryption key with the customer-managed key in the associated key vault. Enabling customer-managed keys does not impact performance, and the account is encrypted with the new key immediately, without any delay.
36
36
37
-
A new automation account is always encrypted using Microsoft-managed keys. It's not possible to enable customer-managed keys at the time that the account is created. Customer-managed keys are stored in Azure Key Vault, and the key vault must be provisioned with access policies that grant key permissions to the managed identity that is associated with the automation account. The managed identity is available only after the storage account is created.
37
+
A new Automation account is always encrypted using Microsoft-managed keys. It's not possible to enable customer-managed keys at the time that the account is created. Customer-managed keys are stored in Azure Key Vault, and the key vault must be provisioned with access policies that grant key permissions to the managed identity that is associated with the Automation account. The managed identity is available only after the storage account is created.
38
38
39
-
When you modify the key being used for Azure Automation secure asset encryption by enabling or disabling customer-managed keys, updating the key version, or specifying a different key, then the encryption of the account encryption key changes, but the secure assets in your Azure Automation account do not need to be re-encrypted.
39
+
When you modify the key being used for Azure Automation secure asset encryption, by enabling or disabling customer-managed keys, updating the key version, or specifying a different key, the encryption of the account encryption key changes but the secure assets in your Azure Automation account do not need to be re-encrypted.
40
40
41
41
The following three sections describe the mechanics of enabling customer-managed keys for an Automation account.
42
42
43
43
> [!NOTE]
44
-
> To enable customer-managed keys, you will currently need to make Azure Automation REST API calls using api version 2020-01-13-preview
44
+
> To enable customer-managed keys, you need to make Azure Automation REST API calls using api version 2020-01-13-preview
45
45
46
46
### Pre-requisites for using Customer-managed keys in Azure Automation
47
47
48
-
Before enabling customer-managed keys for an Automation account, you must ensure the following pre-requisites are met
48
+
Before enabling customer-managed keys for an Automation account, you must ensure the following pre-requisites are met:
49
49
50
50
- The customer-manged key is stored in an Azure Key Vault.
51
51
- You must enable both the **Soft Delete** and **Do Not Purge** properties on the key vault. These features are required to allow for recovery of keys in case of accidental deletion.
52
52
- Only RSA keys are supported with Azure Automation encryption. For more information about keys, see [About Azure Key Vault keys, secrets, and certificates](../key-vault/about-keys-secrets-and-certificates.md#key-vault-keys).
53
-
- The automation account and the key vault can be in different subscriptions but need to be in the same Azure Active Directory tenant.
53
+
- The Automation account and the key vault can be in different subscriptions, but need to be in the same Azure Active Directory tenant.
54
54
55
55
### Assign an identity to the automation account
56
56
57
-
To use customer-managed keys with an automation account, your automation account needs to authenticate against the keyvault storing customer-managed keys. Azure Automation uses system assigned managed identities to authenticate the account with Key Vault. For more information about managed identities, see [What is managed identities for Azure resources?](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview)
57
+
To use customer-managed keys with an Automation account, your Automation account needs to authenticate against the key vault storing customer-managed keys. Azure Automation uses system assigned managed identities to authenticate the account with Azure Key Vault. For more information about managed identities, see [What is managed identities for Azure resources?](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview)
58
58
59
-
Configure a system assigned managed identity to the automation account using the following REST API call
59
+
Configure a system assigned managed identity to the automation account using the following REST API call:
System assigned identity for the automation account is returned in the response
76
+
System assigned identity for the Automation account is returned in a response similar to the following:
75
77
76
78
```json
77
79
{
@@ -89,13 +91,14 @@ System assigned identity for the automation account is returned in the response
89
91
90
92
### Configure the Key Vault access policy
91
93
92
-
Once a managed identity is assigned to the Automation account, you configure access to the Key Vault storing customer managed Keys. Azure Automation requires **get**, **recover**, **wrapKey**, **UnwrapKey** on the customer managed keys.
94
+
Once a managed identity is assigned to the Automation account, you configure access to the key vault storing customer managed keys. Azure Automation requires **get**, **recover**, **wrapKey**, **UnwrapKey** on the customer managed keys.
93
95
94
-
Such an access policy can be set using the following REST API call.
96
+
Such an access policy can be set using the following REST API call:
95
97
96
98
```http
97
99
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/accessPolicies/add?api-version=2018-02-14
98
100
```
101
+
99
102
Request body
100
103
101
104
```json
@@ -121,16 +124,17 @@ Request body
121
124
}
122
125
```
123
126
124
-
> [!NOTE]
125
-
> The **tenantId** and **objectId** fields must be provided with values of **identity.tenantId** and **identity.principalId** respectively from the response of managed identity for the automation account.
127
+
> [!NOTE]
128
+
> The **tenantId** and **objectId** fields must be provided with values of **identity.tenantId** and **identity.principalId** respectively from the response of managed identity for the Automation account.
126
129
127
-
### Change the configuration of automation account to use customer managed key
130
+
### Change the configuration of Automation account to use customer managed key
128
131
129
-
Finally, you can switch your automation account from Microsft-managed keys to customer-managed keys, using the following REST API call.
132
+
Finally, you can switch your Automation account from Microsft-managed keys to customer-managed keys, using the following REST API call:
You can rotate a customer-managed key in Azure Key Vault according to your compliance policies. When the key is rotated, you must update the automation account to use the new key URI.
181
+
You can rotate a customer-managed key in Azure Key Vault according to your compliance policies. When the key is rotated, you must update the Automation account to use the new key URI.
177
182
178
-
Rotating the key does not trigger re-encryption of secure assets in the automation account. There is no further action required from the user.
183
+
Rotating the key does not trigger re-encryption of secure assets in the Automation account. There is no further action required.
179
184
180
185
### Revoke access to customer-managed keys
181
186
182
-
To revoke access to customer-managed keys, use PowerShell or Azure CLI. For more information, see [Azure Key Vault PowerShell](https://docs.microsoft.com/powershell/module/az.keyvault/) or [Azure Key Vault CLI](https://docs.microsoft.com/cli/azure/keyvault). Revoking access effectively blocks access to all secure assets in the automation account, as the encryption key is inaccessible by Azure Automation.
187
+
To revoke access to customer-managed keys, use PowerShell or the Azure CLI. For more information, see [Azure Key Vault PowerShell](https://docs.microsoft.com/powershell/module/az.keyvault/) or [Azure Key Vault CLI](https://docs.microsoft.com/cli/azure/keyvault). Revoking access effectively blocks access to all secure assets in the Automation account, as the encryption key is inaccessible by Azure Automation.
183
188
184
189
## Next steps
185
190
186
-
-[What is Azure Key Vault?](../key-vault/key-vault-overview.md)
191
+
-[What is Azure Key Vault?](../key-vault/key-vault-overview.md)
192
+
187
193
-[Certificate assets in Azure Automation](shared-resources/certificates.md)
194
+
188
195
-[Credential assets in Azure Automation](shared-resources/credentials.md)
196
+
189
197
-[Variable assets in Azure Automation](shared-resources/variables.md)
0 commit comments