Skip to content

Commit bbfb622

Browse files
authored
Merge pull request #50235 from barclayn/keyvault-hsm
minor updates
2 parents 311576f + 140cf60 commit bbfb622

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

articles/key-vault/key-vault-hsm-protected-keys.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ ms.workload: identity
1313
ms.tgt_pltfrm: na
1414
ms.devlang: na
1515
ms.topic: article
16-
ms.date: 12/05/2017
16+
ms.date: 08/27/2018
1717
ms.author: barclayn
1818

1919
---
2020
# How to generate and transfer HSM-protected keys for Azure Key Vault
21-
## Introduction
21+
2222
For added assurance, when you use Azure Key Vault, you can import or generate keys in hardware security modules (HSMs) that never leave the HSM boundary. This scenario is often referred to as *bring your own key*, or BYOK. The HSMs are FIPS 140-2 Level 2 validated. Azure Key Vault uses Thales nShield family of HSMs to protect your keys.
2323

2424
Use the information in this topic to help you plan for, generate, and then transfer your own HSM-protected keys to use with Azure Key Vault.
@@ -27,10 +27,7 @@ This functionality is not available for Azure China.
2727

2828
> [!NOTE]
2929
> For more information about Azure Key Vault, see [What is Azure Key Vault?](key-vault-whatis.md)
30-
>
3130
> For a getting started tutorial, which includes creating a key vault for HSM-protected keys, see [Get started with Azure Key Vault](key-vault-get-started.md).
32-
>
33-
>
3431
3532
More information about generating and transferring an HSM-protected key over the Internet:
3633

@@ -42,24 +39,28 @@ More information about generating and transferring an HSM-protected key over the
4239
* Microsoft uses separate KEKs and separate Security Worlds in each geographical region. This separation ensures that your key can be used only in data centers in the region in which you encrypted it. For example, a key from a European customer cannot be used in data centers in North American or Asia.
4340

4441
## More information about Thales HSMs and Microsoft services
42+
4543
Thales e-Security is a leading global provider of data encryption and cyber security solutions to the financial services, high technology, manufacturing, government, and technology sectors. With a 40-year track record of protecting corporate and government information, Thales solutions are used by four of the five largest energy and aerospace companies. Their solutions are also used by 22 NATO countries, and secure more than 80 per cent of worldwide payment transactions.
4644

4745
Microsoft has collaborated with Thales to enhance the state of art for HSMs. These enhancements enable you to get the typical benefits of hosted services without relinquishing control over your keys. Specifically, these enhancements let Microsoft manage the HSMs so that you do not have to. As a cloud service, Azure Key Vault scales up at short notice to meet your organization’s usage spikes. At the same time, your key is protected inside Microsoft’s HSMs: You retain control over the key lifecycle because you generate the key and transfer it to Microsoft’s HSMs.
4846

4947
## Implementing bring your own key (BYOK) for Azure Key Vault
48+
5049
Use the following information and procedures if you will generate your own HSM-protected key and then transfer it to Azure Key Vault—the bring your own key (BYOK) scenario.
5150

5251
## Prerequisites for BYOK
52+
5353
See the following table for a list of prerequisites for bring your own key (BYOK) for Azure Key Vault.
5454

5555
| Requirement | More information |
5656
| --- | --- |
5757
| A subscription to Azure |To create an Azure Key Vault, you need an Azure subscription: [Sign up for free trial](https://azure.microsoft.com/pricing/free-trial/) |
5858
| The Azure Key Vault Premium service tier to support HSM-protected keys |For more information about the service tiers and capabilities for Azure Key Vault, see the [Azure Key Vault Pricing](https://azure.microsoft.com/pricing/details/key-vault/) website. |
5959
| Thales HSM, smartcards, and support software |You must have access to a Thales Hardware Security Module and basic operational knowledge of Thales HSMs. See [Thales Hardware Security Module](https://www.thales-esecurity.com/msrms/buy) for the list of compatible models, or to purchase an HSM if you do not have one. |
60-
| The following hardware and software:<ol><li>An offline x64 workstation with a minimum Windows operation system of Windows 7 and Thales nShield software that is at least version 11.50.<br/><br/>If this workstation runs Windows 7, you must [install Microsoft .NET Framework 4.5](http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe).</li><li>A workstation that is connected to the Internet and has a minimum Windows operating system of Windows 7 and [Azure PowerShell](/powershell/azure/overview) **minimum version 1.1.0** installed.</li><li>A USB drive or other portable storage device that has at least 16 MB free space.</li></ol> |For security reasons, we recommend that the first workstation is not connected to a network. However, this recommendation is not programmatically enforced.<br/><br/>Note that in the instructions that follow, this workstation is referred to as the disconnected workstation.</p></blockquote><br/>In addition, if your tenant key is for a production network, we recommend that you use a second, separate workstation to download the toolset and upload the tenant key. But for testing purposes, you can use the same workstation as the first one.<br/><br/>Note that in the instructions that follow, this second workstation is referred to as the Internet-connected workstation.</p></blockquote><br/> |
60+
| The following hardware and software:<ol><li>An offline x64 workstation with a minimum Windows operation system of Windows 7 and Thales nShield software that is at least version 11.50.<br/><br/>If this workstation runs Windows 7, you must [install Microsoft .NET Framework 4.5](http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe).</li><li>A workstation that is connected to the Internet and has a minimum Windows operating system of Windows 7 and [Azure PowerShell](https://docs.microsoft.com/powershell/azure/overview?view=azurermps-6.7.0) **minimum version 1.1.0** installed.</li><li>A USB drive or other portable storage device that has at least 16 MB free space.</li></ol> |For security reasons, we recommend that the first workstation is not connected to a network. However, this recommendation is not programmatically enforced.<br/><br/>Note that in the instructions that follow, this workstation is referred to as the disconnected workstation.</p></blockquote><br/>In addition, if your tenant key is for a production network, we recommend that you use a second, separate workstation to download the toolset and upload the tenant key. But for testing purposes, you can use the same workstation as the first one.<br/><br/>Note that in the instructions that follow, this second workstation is referred to as the Internet-connected workstation.</p></blockquote><br/> |
6161

6262
## Generate and transfer your key to Azure Key Vault HSM
63+
6364
You will use the following five steps to generate and transfer your key to an Azure Key Vault HSM:
6465

6566
* [Step 1: Prepare your Internet-connected workstation](#step-1-prepare-your-internet-connected-workstation)
@@ -69,29 +70,33 @@ You will use the following five steps to generate and transfer your key to an Az
6970
* [Step 5: Transfer your key to Azure Key Vault](#step-5-transfer-your-key-to-azure-key-vault)
7071

7172
## Step 1: Prepare your Internet-connected workstation
73+
7274
For this first step, do the following procedures on your workstation that is connected to the Internet.
7375

7476
### Step 1.1: Install Azure PowerShell
77+
7578
From the Internet-connected workstation, download and install the Azure PowerShell module that includes the cmdlets to manage Azure Key Vault. This requires a minimum version of 0.8.13.
7679

7780
For installation instructions, see [How to install and configure Azure PowerShell](/powershell/azure/overview).
7881

7982
### Step 1.2: Get your Azure subscription ID
83+
8084
Start an Azure PowerShell session and sign in to your Azure account by using the following command:
8185

8286
```Powershell
83-
Add-AzureAccount
87+
Add-AzureRMAccount
8488
```
8589
In the pop-up browser window, enter your Azure account user name and password. Then, use the [Get-AzureSubscription](/powershell/module/servicemanagement/azure/get-azuresubscription?view=azuresmps-3.7.0) command:
8690

8791
```powershell
88-
Get-AzureSubscription
92+
Get-AzureRMSubscription
8993
```
9094
From the output, locate the ID for the subscription you will use for Azure Key Vault. You will need this subscription ID later.
9195

9296
Do not close the Azure PowerShell window.
9397

9498
### Step 1.3: Download the BYOK toolset for Azure Key Vault
99+
95100
Go to the Microsoft Download Center and [download the Azure Key Vault BYOK toolset](http://www.microsoft.com/download/details.aspx?id=45345) for your geographic region or instance of Azure. Use the following information to identify the package name to download and its corresponding SHA-256 package hash:
96101

97102
- - -
@@ -211,9 +216,11 @@ The toolset includes the following:
211216
Copy the package to a USB drive or other portable storage.
212217

213218
## Step 2: Prepare your disconnected workstation
219+
214220
For this second step, do the following procedures on the workstation that is not connected to a network (either the Internet or your internal network).
215221

216222
### Step 2.1: Prepare the disconnected workstation with Thales HSM
223+
217224
Install the nCipher (Thales) support software on a Windows computer, and then attach a Thales HSM to that computer.
218225

219226
Ensure that the Thales tools are in your path (**%nfast_home%\bin**). For example, type the following:
@@ -225,20 +232,24 @@ Ensure that the Thales tools are in your path (**%nfast_home%\bin**). For exampl
225232
For more information, see the user guide included with the Thales HSM.
226233

227234
### Step 2.2: Install the BYOK toolset on the disconnected workstation
235+
228236
Copy the BYOK toolset package from the USB drive or other portable storage, and then do the following:
229237

230238
1. Extract the files from the downloaded package into any folder.
231239
2. From that folder, run vcredist_x64.exe.
232240
3. Follow the instructions to the install the Visual C++ runtime components for Visual Studio 2013.
233241

234242
## Step 3: Generate your key
243+
235244
For this third step, do the following procedures on the disconnected workstation. To complete this step your HSM must be in initialization mode.
236245

237246

238247
### Step 3.1: Change the HSM mode to 'I'
248+
239249
If you are using Thales nShield Edge, to change the mode: 1. Use the Mode button to highlight the required mode. 2. Within a few seconds, press and hold the Clear button for a couple of seconds. If the mode changes, the new mode’s LED stops flashing and remains lit. The Status LED might flash irregularly for a few seconds and then flashes regularly when the device is ready. Otherwise, the device remains in the current mode, with the appropriate mode LED lit.
240250

241251
### Step 3.2: Create a security world
252+
242253
Start a command prompt and run the Thales new-world program.
243254

244255
```cmd
@@ -252,10 +263,11 @@ Then do the following:
252263
* Back up the world file. Secure and protect the world file, the Administrator Cards, and their pins, and make sure that no single person has access to more than one card.
253264

254265
### Step 3.3: Change the HSM mode to 'O'
255-
If you are using Thales nShield Edge, to change the mode: 1. Use the Mode button to highlight the required mode. 2. Within a few seconds, press and hold the Clear button for a couple of seconds. If the mode changes, the new mode’s LED stops flashing and remains lit. The Status LED might flash irregularly for a few seconds and then flashes regularly when the device is ready. Otherwise, the device remains in the current mode, with the appropriate mode LED lit.
256266

267+
If you are using Thales nShield Edge, to change the mode: 1. Use the Mode button to highlight the required mode. 2. Within a few seconds, press and hold the Clear button for a couple of seconds. If the mode changes, the new mode’s LED stops flashing and remains lit. The Status LED might flash irregularly for a few seconds and then flashes regularly when the device is ready. Otherwise, the device remains in the current mode, with the appropriate mode LED lit.
257268

258269
### Step 3.4: Validate the downloaded package
270+
259271
This step is optional but recommended so that you can validate the following:
260272

261273
* The Key Exchange Key that is included in the toolset has been generated from a genuine Thales HSM.
@@ -264,8 +276,6 @@ This step is optional but recommended so that you can validate the following:
264276

265277
> [!NOTE]
266278
> To validate the downloaded package, the HSM must be connected, powered on, and must have a security world on it (such as the one you’ve just created).
267-
>
268-
>
269279
270280
To validate the downloaded package:
271281

@@ -325,6 +335,7 @@ This script validates the signer chain up to the Thales root key. The hash of th
325335
You’re now ready to create a new key.
326336

327337
### Step 3.5: Create a new key
338+
328339
Generate a key by using the Thales **generatekey** program.
329340

330341
Run the following command to generate the key:
@@ -344,11 +355,12 @@ Back up this Tokenized Key File in a safe location.
344355
> [!IMPORTANT]
345356
> When you later transfer your key to Azure Key Vault, Microsoft cannot export this key back to you so it becomes extremely important that you back up your key and security world safely. Contact Thales for guidance and best practices for backing up your key.
346357
>
347-
>
358+
348359

349360
You are now ready to transfer your key to Azure Key Vault.
350361

351362
## Step 4: Prepare your key for transfer
363+
352364
For this fourth step, do the following procedures on the disconnected workstation.
353365

354366
### Step 4.1: Create a copy of your key with reduced permissions
@@ -416,6 +428,7 @@ You may inspects the ACLS using following commands using the Thales utilities:
416428
When you run these commands, replace contosokey with the same value you specified in **Step 3.5: Create a new key** from the [Generate your key](#step-3-generate-your-key) step.
417429

418430
### Step 4.2: Encrypt your key by using Microsoft’s Key Exchange Key
431+
419432
Run one of the following commands, depending on your geographic region or instance of Azure:
420433

421434
* For North America:
@@ -470,9 +483,11 @@ When you run this command, use these instructions:
470483
When this completes successfully, it displays **Result: SUCCESS** and there is a new file in the current folder that has the following name: KeyTransferPackage-*ContosoFirstHSMkey*.byok
471484

472485
### Step 4.3: Copy your key transfer package to the Internet-connected workstation
486+
473487
Use a USB drive or other portable storage to copy the output file from the previous step (KeyTransferPackage-ContosoFirstHSMkey.byok) to your Internet-connected workstation.
474488

475489
## Step 5: Transfer your key to Azure Key Vault
490+
476491
For this final step, on the Internet-connected workstation, use the [Add-AzureKeyVaultKey](/powershell/module/azurerm.keyvault/add-azurermkeyvaultkey) cmdlet to upload the key transfer package that you copied from the disconnected workstation to the Azure Key Vault HSM:
477492

478493
```powershell
@@ -482,4 +497,5 @@ For this final step, on the Internet-connected workstation, use the [Add-AzureKe
482497
If the upload is successful, you see displayed the properties of the key that you just added.
483498

484499
## Next steps
500+
485501
You can now use this HSM-protected key in your key vault. For more information, see the **If you want to use a hardware security module (HSM)** section in the [Getting started with Azure Key Vault](key-vault-get-started.md) tutorial.

0 commit comments

Comments
 (0)