π Azure Subscription Security Alert Notifications to subscription owners are not configured π’
- Contextual name: π Security Alert Notifications to subscription owners are not configured π’
- ID:
/ce/ca/azure/subscription/security-alert-notifications-to-subscription-owners
- Located in: π Azure Subscription
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-351e376f
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-351e376f | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Enable security alert emails to subscription owners.
Rationaleβ
Enabling security alert emails to subscription owners ensures that they receive security alert emails from Microsoft. This ensures that they are aware of any potential security issues and can mitigate the risk in a timely fashion.
Auditβ
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Select
Microsoft Defender for Cloud
.- Under
Management
, selectEnvironment Settings
.- Click on the appropriate Management Group, Subscription, or Workspace.
- Click on
Email notifications
.- Ensure that
All users with the following roles
is set toOwner
.From Azure CLIβ
Ensure the command below returns state of
On
and thatOwner
appears in roles:az account get-access-token --query "{subscription:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X GET -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview'| jq '.[] | select(.name=="default").properties.notificationsByRole'
... [see more](description.md)
Remediationβ
Remediationβ
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Select
Microsoft Defender for Cloud
.- Under
Management
, selectEnvironment Settings
.- Click on the appropriate Management Group, Subscription, or Workspace.
- Click on
Email notifications
.- In the drop down of the
All users with the following roles
field selectOwner
.- Click
Save
.From Azure CLIβ
Use the below command to set
Send email also to subscription owners
toOn
:az account get-access-token --query "{subscription:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X PUT -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts/default1?api-version=2017-08-01-preview -d@"input.json"'
Where
input.json
contains the data below, replacingvalidEmailAddress
with a single email address or multiple comma-separated email addresses:{
"id": "/subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/securityContacts/default1",
... [see more](remediation.md)