Skip to content

Commit 7b6fc1f

Browse files
committed
Updated following feedback
1 parent 8e84f7d commit 7b6fc1f

File tree

2 files changed

+66
-12
lines changed

2 files changed

+66
-12
lines changed

articles/security-center/custom-security-policies.md

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: rkarlin
77

88
ms.service: security-center
99
ms.topic: conceptual
10-
ms.date: 04/16/2020
10+
ms.date: 04/22/2020
1111
ms.author: memildin
1212
---
1313

@@ -17,7 +17,7 @@ ms.author: memildin
1717

1818
To help secure your systems and environment, Azure Security Center generates security recommendations. These recommendations are based on industry best practices, which are incorporated into the generic, default security policy supplied to all customers. They can also come from Security Center's knowledge of industry and regulatory standards.
1919

20-
With this feature, you can add your own *custom* initiatives. You'll then receive recommendations if your environment doesn't follow the policies you create. Any custom initiatives you create will appear alongside the built-in initiatives in the regulatory compliance dashboard described in the tutorial [Improve your regulatory compliance](security-center-compliance-dashboard.md).
20+
With this feature, you can add your own *custom* initiatives. You'll then receive recommendations if your environment doesn't follow the policies you create. Any custom initiatives you create will appear alongside the built-in initiatives in the regulatory compliance dashboard, as described in the tutorial [Improve your regulatory compliance](security-center-compliance-dashboard.md).
2121

2222
As discussed in [the Azure Policy documentation](https://docs.microsoft.com/azure/governance/policy/concepts/definition-structure#definition-location), when you specify a location for your custom initiative, it must be a management group or a subscription.
2323

@@ -51,7 +51,7 @@ As discussed in [the Azure Policy documentation](https://docs.microsoft.com/azur
5151
1. Select the policies to include and click **Add**.
5252
1. Enter any desired parameters.
5353
1. Click **Save**.
54-
1. In the Add custom initiatives page, click refresh and your new initiative will be shown as available.
54+
1. In the Add custom initiatives page, click refresh. Your new initiative will be shown as available.
5555
1. Click **Add** and assign it to your subscription.
5656

5757
> [!NOTE]
@@ -69,18 +69,72 @@ As discussed in [the Azure Policy documentation](https://docs.microsoft.com/azur
6969

7070
## Enhancing your custom recommendations with detailed information
7171

72-
The built-in recommendations supplied with Azure Security Center include details such as severity levels and remediation instructions. If you want to add this type of information to your custom recommendations so that it appears in the Azure Portal or wherever you access your recommendations, you'll need to use the REST API.
72+
The built-in recommendations supplied with Azure Security Center include details such as severity levels and remediation instructions. If you want to add this type of information to your custom recommendations so that it appears in the Azure portal or wherever you access your recommendations, you'll need to use the REST API.
7373

74-
These are the types of information you can add:
74+
The two types of information you can add are:
7575

7676
- **RemediationDescription** – String
77-
- **Severity** – Enum [Unknown, Low, Medium, High]
78-
79-
The metadata should be added to the policy definition under the ‘SecurityCenter’ property, as shown:
80-
81-
![Example of the SecurityCenter property with custom metadata](media/custom-security-policies/custom-policy-metadata.png)
82-
83-
For an example of how to do this, see [this section of the REST API documentation](https://docs.microsoft.com/rest/api/securitycenter/assessmentsmetadata/createinsubscription#examples).
77+
- **Severity** – Enum [Low, Medium, High]
78+
79+
The metadata should be added to the policy definition for a policy that is part of the custom initiative. It should be in the ‘securityCenter’ property, as shown:
80+
81+
```json
82+
"metadata": {
83+
"securityCenter": {
84+
"RemediationDescription": "Custom description goes here",
85+
"Severity": "High",
86+
},
87+
```
88+
89+
Below is an example of a custom policy including the metadata/securityCenter property:
90+
91+
```json
92+
{
93+
"properties": {
94+
"displayName": "Security - ERvNet - AuditRGLock",
95+
"policyType": "Custom",
96+
"mode": "All",
97+
"description": "Audit required resource groups lock",
98+
"metadata": {
99+
"securityCenter": {
100+
"remediationDescription": "Resource Group locks can be set via Azure Portal -> Resource Group -> Locks",
101+
"severity": "High",
102+
},
103+
},
104+
"parameters": {
105+
"expressRouteLockLevel": {
106+
"type": "String",
107+
"metadata": {
108+
"displayName": "Lock level",
109+
"description": "Required lock level for ExpressRoute resource groups."
110+
},
111+
"allowedValues": [
112+
"CanNotDelete",
113+
"ReadOnly"
114+
]
115+
}
116+
},
117+
"policyRule": {
118+
"if": {
119+
"field": "type",
120+
"equals": "Microsoft.Resources/subscriptions/resourceGroups"
121+
},
122+
"then": {
123+
"effect": "auditIfNotExists",
124+
"details": {
125+
"type": "Microsoft.Authorization/locks",
126+
"existenceCondition": {
127+
"field": "Microsoft.Authorization/locks/level",
128+
"equals": "[parameters('expressRouteLockLevel')]"
129+
}
130+
}
131+
}
132+
}
133+
}
134+
}
135+
```
136+
137+
For another example of using the securityCenter property, see [this section of the REST API documentation](https://docs.microsoft.com/rest/api/securitycenter/assessmentsmetadata/createinsubscription#examples).
84138

85139

86140
## Next steps
Loading

0 commit comments

Comments
 (0)