|
| 1 | +--- |
| 2 | +title: Use the Azure portal to configure customer-managed keys |
| 3 | +titleSuffix: Cognitive Services |
| 4 | +description: Learn how to use the Azure portal to configure customer-managed keys with Azure Key Vault. Customer-managed keys enable you to create, rotate, disable, and revoke access controls. |
| 5 | +services: cognitive-services |
| 6 | +author: erindormier |
| 7 | + |
| 8 | +ms.service: cognitive-services |
| 9 | +ms.topic: include |
| 10 | +ms.date: 03/11/2020 |
| 11 | +ms.author: egeaney |
| 12 | +--- |
| 13 | + |
| 14 | +# Configure customer-managed keys with Azure Key Vault by using the Azure portal |
| 15 | + |
| 16 | +You must use Azure Key Vault to store your 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. The Cognitive Services resource and the key vault must be in the same region and in the same Azure Active Directory (Azure AD) tenant, but they can be in different subscriptions. For more information about Azure Key Vault, see [What is Azure Key Vault?](https://docs.microsoft.com/azure/key-vault/key-vault-overview). |
| 17 | + |
| 18 | +This article shows how to configure an Azure Key Vault with customer-managed keys using the [Azure portal](https://portal.azure.com/). To learn how to create a key vault using the Azure portal, see [Quickstart: Set and retrieve a secret from Azure Key Vault using the Azure portal](../../key-vault/quick-create-portal.md). |
| 19 | + |
| 20 | +## Configure Azure Key Vault |
| 21 | + |
| 22 | +Using customer-managed keys requires that two properties be set on the key vault, **Soft Delete** and **Do Not Purge**. These properties are not enabled by default, but can be enabled using either PowerShell or Azure CLI on a new or existing key vault. |
| 23 | + |
| 24 | +> [!IMPORTANT] |
| 25 | +> If you do not have the **Soft Delete** and **Do Not Purge** properties enabled and you delete your key, you won't be able to recover the data in your Cognitive Service resource. |
| 26 | +
|
| 27 | +To learn how to enable these properties on an existing key vault, see the sections titled **Enabling soft-delete** and **Enabling Purge Protection** in one of the following articles: |
| 28 | + |
| 29 | +- [How to use soft-delete with PowerShell](https://docs.microsoft.com/azure/key-vault/key-vault-soft-delete-powershell). |
| 30 | +- [How to use soft-delete with CLI](https://docs.microsoft.com/azure/key-vault/key-vault-soft-delete-cli). |
| 31 | + |
| 32 | +Only RSA keys of size 2048 are supported with Azure Storage encryption. For more information about keys, see **Key Vault keys** in [About Azure Key Vault keys, secrets and certificates](https://docs.microsoft.com/azure/key-vault/about-keys-secrets-and-certificates#key-vault-keys). |
| 33 | + |
| 34 | +## Enable customer-managed keys |
| 35 | + |
| 36 | +To enable customer-managed keys in the Azure portal, follow these steps: |
| 37 | + |
| 38 | +1. Navigate to your Cognitive Services resource. |
| 39 | +1. On the **Settings** blade for your Cognitive Services resource, click **Encryption**. Select the **Customer Managed Keys** option, as shown in the following figure. |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +## Specify a key |
| 44 | + |
| 45 | +After you enable customer-managed keys, you'll have the opportunity to specify a key to associate with the Cognitive Services resource. |
| 46 | + |
| 47 | +### Specify a key as a URI |
| 48 | + |
| 49 | +To specify a key as a URI, follow these steps: |
| 50 | + |
| 51 | +1. To locate the key URI in the Azure portal, navigate to your key vault, and select the **Keys** setting. Select the desired key, then click the key to view its versions. Select a key version to view the settings for that version. |
| 52 | +1. Copy the value of the **Key Identifier** field, which provides the URI. |
| 53 | + |
| 54 | +  |
| 55 | + |
| 56 | +1. In the **Encryption** settings for your storage account, choose the **Enter key URI** option. |
| 57 | +1. Paste the URI that you copied into the **Key URI** field. |
| 58 | + |
| 59 | +  |
| 60 | + |
| 61 | +1. Specify the subscription that contains the key vault. |
| 62 | +1. Save your changes. |
| 63 | + |
| 64 | +### Specify a key from a key vault |
| 65 | + |
| 66 | +To specify a key from a key vault, first make sure that you have a key vault that contains a key. To specify a key from a key vault, follow these steps: |
| 67 | + |
| 68 | +1. Choose the **Select from Key Vault** option. |
| 69 | +1. Select the key vault containing the key you want to use. |
| 70 | +1. Select the key from the key vault. |
| 71 | + |
| 72 | +  |
| 73 | + |
| 74 | +1. Save your changes. |
| 75 | + |
| 76 | +## Update the key version |
| 77 | + |
| 78 | +When you create a new version of a key, update the Cognitive Services resource to use the new version. Follow these steps: |
| 79 | + |
| 80 | +1. Navigate to your Cognitive Services resource and display the **Encryption** settings. |
| 81 | +1. Enter the URI for the new key version. Alternately, you can select the key vault and the key again to update the version. |
| 82 | +1. Save your changes. |
| 83 | + |
| 84 | +## Use a different key |
| 85 | + |
| 86 | +To change the key used for encryption, follow these steps: |
| 87 | + |
| 88 | +1. Navigate to your Cognitive Services resource and display the **Encryption** settings. |
| 89 | +1. Enter the URI for the new key. Alternately, you can select the key vault and choose a new key. |
| 90 | +1. Save your changes. |
| 91 | + |
| 92 | +## Disable customer-managed keys |
| 93 | + |
| 94 | +When you disable customer-managed keys, your Cognitive Services resource is then encrypted with Microsoft-managed keys. To disable customer-managed keys, follow these steps: |
| 95 | + |
| 96 | +1. Navigate to your Cognitive Services resource and display the **Encryption** settings. |
| 97 | +1. Deselect the checkbox next to the **Use your own key** setting. |
| 98 | + |
| 99 | +## Next steps |
| 100 | + |
| 101 | +* [What is Azure Key Vault](https://docs.microsoft.com/azure/key-vault/key-vault-overview)? |
| 102 | +* [Cognitive Services Customer-Managed Key Request Form](https://aka.ms/cogsvc-cmk) |
| 103 | +* [Face Services encryption of data at rest](../Face/face-encryption-of-data-at-rest.md) |
| 104 | +* [QnA Maker encryption of data at rest](../QnAMaker/qna-maker-encryption-of-data-at-rest.md) |
| 105 | +* [Language Understanding service encryption of data at rest](../LUIS/luis-encryption-of-data-at-rest.md) |
| 106 | +* [Content Moderator encryption of data at rest](../Content-Moderator/content-moderator-encryption-of-data-at-rest.md) |
| 107 | +* [Translator encryption of data at rest](../translator/translator-encryption-of-data-at-rest.md) |
0 commit comments