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/cosmos-db/how-to-setup-cmk.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ description: Learn how to configure customer-managed keys for your Azure Cosmos
4
4
author: ThomasWeiss
5
5
ms.service: cosmos-db
6
6
ms.topic: conceptual
7
-
ms.date: 01/09/2020
7
+
ms.date: 01/11/2020
8
8
ms.author: thweiss
9
+
ROBOTS: noindex, nofollow
9
10
---
10
11
11
12
# Configure customer-managed keys for your Azure Cosmos DB account
@@ -25,13 +26,13 @@ Currently, customer-managed keys are only available for new accounts and need to
25
26
26
27
### 1. Make sure the Azure Cosmos DB resource provider is registered for your Azure subscription
27
28
28
-
From the Azure portal, go to your Azure subscription and select "Resource providers" from the left menu:
29
+
From the Azure portal, go to your Azure subscription and select **Resource providers** from the left menu:
29
30
30
31

31
32
32
-
Search for the "Microsoft.DocumentDB" resource provider.
33
+
Search for the **Microsoft.DocumentDB** resource provider.
33
34
- If the resource provider is already marked as registered, nothing needs to be done.
34
-
- If not, select it and click on "Register":
35
+
- If not, select it and click on **Register**:
35
36
36
37

37
38
@@ -45,51 +46,54 @@ To learn how to enable these properties on an existing Azure Key Vault instance,
45
46
46
47
### 3. Add an access policy to your Azure Key Vault instance
47
48
48
-
From the Azure portal, go to the Azure Key Vault instance you plan to use to host your encryption keys. Then, select "Access Policies" from the left menu:
49
+
From the Azure portal, go to the Azure Key Vault instance you plan to use to host your encryption keys. Then, select **Access Policies** from the left menu:
49
50
50
51

51
52
52
-
-Click on "+ Add Access Policy"
53
-
- Under the "Key permissions" dropdown menu, select "Get", "Unwrap Key" and "Wrap Key":
53
+
-Select **+ Add Access Policy**
54
+
- Under the **Key permissions** dropdown menu, select **Get**, **Unwrap Key** and **Wrap Key**:
54
55
55
56

56
57
57
-
- Under "Select principal", click on "None selected", search for and select the "Azure Cosmos DB" principal, then click "Select" at the bottom (if the "Azure Cosmos DB" principal can't be found, you may need to re-register the "Microsoft.DocumentDB" resource provider at step 2):
58
+
- Under **Select principal**, select **None selected**. Then, search for and select the **Azure Cosmos DB** principal. Finally, click **Select** at the bottom (if the **Azure Cosmos DB** principal can't be found, you may need to re-register the **Microsoft.DocumentDB** resource provider at step 1):
58
59
59
60

60
61
61
-
-Click "Add" to add the new access policy
62
+
-Select **Add** to add the new access policy
62
63
63
64
### 4. Generate a key in Azure Key Vault
64
65
65
-
From the Azure portal, go the Azure Key Vault instance you plan to use to host your encryption keys. Then, select "Keys" from the left menu:
66
+
From the Azure portal, go the Azure Key Vault instance you plan to use to host your encryption keys. Then, select **Keys** from the left menu:
66
67
67
68

68
69
69
-
-Click on "Generate/Import"
70
-
- Provide a name for the new key, select an RSA key size (a minimum of 3072 is recommended for best security) and click "Create":
70
+
-Select **Generate/Import**
71
+
- Provide a name for the new key, select an RSA key size (a minimum of 3072 is recommended for best security) and select **Create**:
71
72
72
73

73
74
74
75
- Once the key is created, click on the newly created key, then on its current version
75
-
- Copy the key’s "Key Identifier" except the part after the last forward slash:
76
+
- Copy the key’s **Key Identifier** except the part after the last forward slash:
76
77
77
78

78
79
79
80
### 5. Create a new Azure Cosmos DB account
80
81
81
82
#### Using the Azure portal
82
83
83
-
When creating a new Azure Cosmos DB account from the Azure portal, choose "Customer-managed key" at the "Encryption" step. In the "Key URI" field, pass the URI of the Azure Key Vault key copied from step 4:
84
+
When creating a new Azure Cosmos DB account from the Azure portal, choose **Customer-managed key** at the **Encryption** step. In the **Key URI** field, pass the URI of the Azure Key Vault key copied from step 4:
84
85
85
86

86
87
87
88
#### Using PowerShell
88
89
89
90
When creating a new Azure Cosmos DB account with PowerShell,
90
-
- pass the URI of the Azure Key Vault key copied from step 4 under the "keyVaultKeyUri" property in the "PropertyObject",
91
+
- pass the URI of the Azure Key Vault key copied from step 4 under the **keyVaultKeyUri** property in the **PropertyObject**,
91
92
- make sure to use "2019-12-12" as the API version.
92
93
94
+
> [!IMPORTANT]
95
+
> The `Location` parameter has to be set explicitly for the account to be successfully created with CMK.
0 commit comments