Skip to content

Commit 483f0fd

Browse files
authored
Merge pull request #222242 from mattmsft/mattmsft/cmk-policy-enforcement-docs
Add docs on setting up CMK policy enforcement
2 parents b3111f3 + 0b0ec48 commit 483f0fd

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed
7.74 KB
Loading
12.1 KB
Loading

articles/search/search-security-manage-encryption-keys.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Azure Cognitive Search automatically encrypts data at rest with [service-managed
1818

1919
This article walks you through the steps of setting up customer-managed key (CMK) or "bring-your-own-key" (BYOK) encryption. Here are some points to keep in mind:
2020

21-
+ CMK encryption is enacted on individual objects. If you require CMK unilaterally across your search service, [set an enforcement policy](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchencryptionwithcmk) at the service level so that you can be notified if the service falls out of compliance.
21+
+ CMK encryption is enacted on individual objects. If you require CMK across your search service, [set an enforcement policy](#encryption-enforcement-policy).
2222

2323
+ CMK encryption depends on [Azure Key Vault](../key-vault/general/overview.md). You can create your own encryption keys and store them in a key vault, or you can use Azure Key Vault APIs to generate encryption keys.
2424

@@ -333,6 +333,40 @@ Once you create the encrypted object on the search service, you can use it as yo
333333
> [!Note]
334334
> None of these key vault details are considered secret and could be easily retrieved by browsing to the relevant Azure Key Vault page in Azure portal.
335335
336+
<a name="encryption-enforcement-policy"></a>
337+
338+
## 6 Set up policy
339+
340+
Azure Cognitive Search has an optional [built-in policy](https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F76a56461-9dc0-40f0-82f5-2453283afa2f) to enforce usage of CMK on individual objects defined in a search service. In this step, you'll apply this policy to your search service and set up your search service to enforce this policy.
341+
342+
> [!NOTE]
343+
> Policy set up requires the preview [Services - Create or Update API](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update).
344+
345+
1. Navigate to the [built-in policy](https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F76a56461-9dc0-40f0-82f5-2453283afa2f) in your web browser. Select **Assign**
346+
347+
:::image type="content" source="media/search-security-manage-encryption-keys/assign-policy.png" alt-text="Screenshot of assigning built-in CMK policy." border="true":::
348+
349+
1. Set up the [policy scope](../governance/policy/concepts/scope.md). In the **Parameters** section, uncheck **Only show parameters...** and set **Effect** to **Deny**
350+
351+
:::image type="content" source="media/search-security-manage-encryption-keys/effect-deny.png" alt-text="Screenshot of changing built-in CMK policy effect to deny." border="true":::
352+
353+
1. Finish creating the policy.
354+
355+
1. Call the [Services - Create or Update API](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update) to enable CMK policy enforcement.
356+
357+
```http
358+
PATCH https://management.azure.com/subscriptions/[subscriptionId]/resourceGroups/[resourceGroupName]/providers/Microsoft.Search/searchServices/[serviceName]?api-version=2021-04-01-preview
359+
360+
{
361+
"properties": {
362+
"encryptionWithCmk": {
363+
"enforcement": "Enabled",
364+
"encryptionComplianceStatus": "Compliant"
365+
}
366+
}
367+
}
368+
```
369+
336370
## REST examples
337371

338372
This section shows the JSON for several objects so that you can see where to locate "encryptionKey" in an object definition.

0 commit comments

Comments
 (0)