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
You need an Azure subscription. If you don't have one, create a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
You need an Azure subscription. If you don't have one, create a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
> Managed HSM instances are always in use. If you enable purge protection by using the `--enable-purge-protection` flag, you pay for the entire retention period.
Copy file name to clipboardExpand all lines: articles/key-vault/managed-hsm/configure-network-security.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,19 +39,19 @@ Here's how to configure Managed HSM firewalls by using the Azure CLI:
39
39
1. Use the [az keyvault update-hsm](/cli/azure/keyvault#az-keyvault-update-hsm) command to set the default action to Deny before creating a firewall.
40
40
41
41
```azurecli
42
-
az keyvault update-hsm --resource-group "myresourcegroup" --hsm-name "mymanagedhsm" --default-action Deny
42
+
az keyvault update-hsm --resource-group "ContosoResourceGroup" --hsm-name "ContosoMHSM" --default-action Deny
43
43
```
44
44
45
45
1. Use the [az keyvault network-rule add](/cli/azure/keyvault/network-rule#az-keyvault-network-rule-add) command to add an IP address range to allow traffic.
46
46
47
47
```azurecli
48
-
az keyvault network-rule add --resource-group "myresourcegroup" --hsm-name "mymanagedhsm" --ip-address "191.10.18.0/24"
48
+
az keyvault network-rule add --resource-group "ContosoResourceGroup" --hsm-name "ContosoMHSM" --ip-address "191.10.18.0/24"
49
49
```
50
50
51
-
1. If this key vault should be accessible by any trusted services, use the [az keyvault update](/cli/azure/keyvault#az-keyvault-update) command to set bypass to AzureServices.
51
+
1. If any trusted services need access to this key vault, use the [az keyvault update](/cli/azure/keyvault#az-keyvault-update) command to set bypass to AzureServices.
52
52
53
53
```azurecli
54
-
az keyvault update --resource-group "myresourcegroup" --hsm-name "mymanagedhsm" --bypass AzureServices
54
+
az keyvault update --resource-group "ContosoResourceGroup" --hsm-name "ContosoMHSM" --bypass AzureServices
55
55
```
56
56
57
57
# [Azure PowerShell](#tab/azure-powershell)
@@ -62,15 +62,15 @@ Here's how to configure Managed HSM firewalls by using PowerShell:
62
62
1. Use the [Update-AzKeyVaultManagedHsmNetworkRuleSet](/powershell/module/az.keyvault/update-azkeyvaultmanagedhsmnetworkruleset) cmdlet to set default action to Deny and add an IP address range to allow traffic.
Include `-ReplaceAllRules` to overwrite IP Lists. Otherwise, the command merges the newly included rules.
69
69
70
-
1. If this managed HSM should be accessible by any trusted services, use the [Update-AzKeyVaultManagedHsmNetworkRuleSet](/powershell/module/az.keyvault/update-azkeyvaultmanagedhsmnetworkruleset) cmdlet to set bypass to AzureServices.
70
+
1. If any trusted services need access to this managed HSM, use the [Update-AzKeyVaultManagedHsmNetworkRuleSet](/powershell/module/az.keyvault/update-azkeyvaultmanagedhsmnetworkruleset) cmdlet to set bypass to AzureServices.
* The Azure CLI version 2.25.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
26
29
* A managed HSM in your subscription. See [Quickstart: Provision and activate a managed HSM using Azure CLI](quick-create-cli.md) to provision and activate a managed HSM.
Copy file name to clipboardExpand all lines: articles/key-vault/managed-hsm/hsm-protected-keys-byok.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,14 @@ ms.author: mbaldwin
13
13
14
14
# Import HSM-protected keys to Managed HSM (BYOK)
15
15
16
-
Azure Key Vault Managed HSM supports importing keys generated in your on-premises hardware security module (HSM); the keys will never leave the HSM protection boundary. This scenario often is referred to as *bring your own key (BYOK)*. Managed HSM uses the Marvell LiquidSecurity HSM adapters (FIPS 140-3 Level 3 validated) to protect your keys.
16
+
Azure Key Vault Managed HSM supports importing keys generated in your on-premises hardware security module (HSM). The keys never leave the HSM protection boundary. This scenario is often referred to as *bring your own key (BYOK)*. Managed HSM uses the Marvell LiquidSecurity HSM adapters (FIPS 140-3 Level 3 validated) to protect your keys.
17
17
18
18
Use the information in this article to help you plan for, generate, and transfer your own HSM-protected keys to use with Managed HSM.
19
19
20
20
> [!NOTE]
21
21
> This import method is available only for [supported HSMs](#supported-hsms).
22
22
23
-
For more information, and for a tutorial to get started using Managed HSM, see [What is Managed HSM?](overview.md).
23
+
For more information, and for a tutorial to get started using Managed HSM, see [What is Managed HSM?](overview.md)
24
24
25
25
## Overview
26
26
@@ -33,26 +33,27 @@ Here's an overview of the process. Specific steps to complete are described late
33
33
* The target key is encrypted with a KEK, which stays encrypted until it's transferred to the Managed HSM. Only the encrypted version of your key leaves the on-premises HSM.
34
34
* A KEK that's generated inside a Managed HSM isn't exportable. HSMs enforce the rule that no clear version of a KEK exists outside a Managed HSM.
35
35
* The KEK must be in the same managed HSM where the target key will be imported.
36
-
* When the BYOK file is uploaded to Managed HSM, a Managed HSM uses the KEK private key to decrypt the target key material and import it as an HSM key. This operation happens entirely inside the HSM. The target key always remains in the HSM protection boundary.
36
+
* When you upload the BYOK file to Managed HSM, a Managed HSM uses the KEK private key to decrypt the target key material and import it as an HSM key. This operation happens entirely inside the HSM. The target key always remains in the HSM protection boundary.
37
37
38
38
39
39
## Prerequisites
40
40
41
-
To use the Azure CLI commands in this article, you must have the following items:
* A subscription to Microsoft Azure. If you don't have one, you can sign up for a [free trial](https://azure.microsoft.com/pricing/free-trial).
44
-
* The Azure CLI version 2.12.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
45
-
* A managed HSM the [supported HSMs list](#supported-hsms) in your subscription. See [Quickstart: Provision and activate a managed HSM using Azure CLI](quick-create-cli.md) to provision and activate a managed HSM.
43
+
You also need:
44
+
45
+
* Azure CLI version 2.12.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
46
+
* A managed HSM in the [supported HSMs list](#supported-hsms) in your subscription. To provision and activate a managed HSM, see [Quickstart: Provision and activate a managed HSM using Azure CLI](quick-create-cli.md).
For more information on login options via the CLI, take a look at [sign in with Azure CLI](/cli/azure/authenticate-azure-cli)
56
+
For more information on authentication options through the CLI, see [sign in with Azure CLI](/cli/azure/authenticate-azure-cli).
56
57
57
58
## Supported HSMs
58
59
@@ -86,20 +87,20 @@ For more information on login options via the CLI, take a look at [sign in with
86
87
87
88
### Step 1: Generate a KEK
88
89
89
-
A KEK is an RSA key that's generated in a Managed HSM. The KEK is used to encrypt the key you want to import (the *target* key).
90
+
A KEK is an RSA key that you generate in a Managed HSM. Use the KEK to encrypt the key you want to import (the *target* key).
90
91
91
92
The KEK must be:
92
-
- An RSA-HSM key (2,048-bit; 3,072-bit; or 4,096-bit)
93
-
- Generated in the same managed HSM where you intend to import the target key
93
+
- An RSA-HSM key (2,048-bit, 3,072-bit, or 4,096-bit)
94
+
- Generated in the same Managed HSM where you intend to import the target key
94
95
- Created with allowed key operations set to `import`
95
96
96
97
> [!NOTE]
97
-
> The KEK must have 'import' as the only allowed key operation. 'import' is mutually exclusive with all other key operations.
98
+
> The KEK must have `import` as the only allowed key operation. `import` is mutually exclusive with all other key operations.
98
99
99
100
Use the [az keyvault key create](/cli/azure/keyvault/key#az-keyvault-key-create) command to create a KEK that has key operations set to `import`. Record the key identifier (`kid`) that's returned from the following command. (You'll use the `kid` value in [Step 3](#step-3-generate-and-prepare-your-key-for-transfer).)
Use [az keyvault key download](/cli/azure/keyvault/key#az-keyvault-key-download) to download the KEK public key to a .pem file. The target key you import is encrypted by using the KEK public key.
110
111
111
112
```azurecli-interactive
112
-
az keyvault key download --name KEKforBYOK --hsm-name ContosoKeyVaultHSM --file KEKforBYOK.publickey.pem
113
+
az keyvault key download --name KEKforBYOK --hsm-name ContosoMHSM --file KEKforBYOK.publickey.pem
113
114
```
114
115
---
115
116
116
-
Transfer the KEKforBYOK.publickey.pem file to your offline computer. You'll need this file in the next step.
117
+
Transfer the `KEKforBYOK.publickey.pem` file to your offline computer. You need this file in the next step.
117
118
118
119
### Step 3: Generate and prepare your key for transfer
119
120
120
-
Refer to your HSM vendor's documentation to download and install the BYOK tool. Follow instructions from your HSM vendor to generate a target key, and then create a key transfer package (a BYOK file). The BYOK tool will use the `kid` from [Step 1](#step-1-generate-a-kek) and the KEKforBYOK.publickey.pem file you downloaded in [Step 2](#step-2-download-the-kek-public-key) to generate an encrypted target key in a BYOK file.
121
+
To download and install the BYOK tool, see your HSM vendor's documentation. Follow the instructions from your HSM vendor to generate a target key, and then create a key transfer package (a BYOK file). The BYOK tool uses the `kid` from [Step 1](#step-1-generate-a-kek) and the `KEKforBYOK.publickey.pem` file you downloaded in [Step 2](#step-2-download-the-kek-public-key) to generate an encrypted target key in a BYOK file.
121
122
122
123
Transfer the BYOK file to your connected computer.
123
124
124
125
> [!NOTE]
125
-
> Importing RSA 1,024-bit keys is not supported. Importing EC-HSM P256K keys is supported.
> **Known issue**: Importing an RSA 4K target key from Luna HSMs is only supported with firmware 7.4.0 or newer.
128
129
@@ -131,7 +132,7 @@ Transfer the BYOK file to your connected computer.
131
132
To complete the key import, transfer the key transfer package (a BYOK file) from your disconnected computer to the internet-connected computer. Use the [az keyvault key import](/cli/azure/keyvault/key#az-keyvault-key-import) command to upload the BYOK file to the Managed HSM.
132
133
133
134
```azurecli-interactive
134
-
az keyvault key import --hsm-name ContosoKeyVaultHSM --name ContosoFirstHSMkey --byok-file KeyTransferPackage-ContosoFirstHSMkey.byok
135
+
az keyvault key import --hsm-name ContosoMHSM --name ContosoFirstHSMkey --byok-file KeyTransferPackage-ContosoFirstHSMkey.byok
135
136
```
136
137
137
138
If the upload is successful, Azure CLI displays the properties of the imported key.
0 commit comments