π Azure Subscription Activity Log Alert for Delete Policy Assignment does not exist π’
- Contextual name: π Activity Log Alert for Delete Policy Assignment does not exist π’
- ID:
/ce/ca/azure/subscription/activity-log-alert-for-delete-policy-assignment
- 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-9002886f
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-9002886f | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Create an activity log alert for the Delete Policy Assignment event.
Rationaleβ
Monitoring for delete policy assignment events gives insight into changes done in "azure policy - assignments" and can reduce the time it takes to detect unsolicited changes.
Auditβ
This policy evaluates Azure Subscriptions for the presence of an Azure Activity Log Alert that captures Delete Policy Assignment events. A subscription is marked asΒ
INCOMPLIANT
Β if it does not have an Activity Log Alert whoseCondition JSON
filters on theΒ Microsoft.Authorization/policyAssignments/deleteΒ operation.Default Valueβ
By default, no monitoring alerts are created.
Referencesβ
- https://docs.microsoft.com/en-in/azure/azure-monitor/platform/alerts-activity-log
- https://docs.microsoft.com/en-in/rest/api/monitor/activitylogalerts/createorupdate
- https://docs.microsoft.com/en-in/rest/api/monitor/activitylogalerts/listbysubscriptionid
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation
... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Navigate to the
Monitor
blade.- Select
Alerts
.- Select
Create
.- Select
Alert rule
.- Choose a subscription.
- Select
Apply
.- Select the
Condition
tab.- Click
See all signals
.- Select
Delete policy assignment (Policy assignment)
.- Click
Apply
.- Select the
Actions
tab.- Click
Select action groups
to select an existing action group, orCreate action group
to create a new action group.- Follow the prompts to choose or create an action group.
- Select the
Details
tab.- Select a
Resource group
, provide anAlert rule name
and an optionalAlert rule description
.- Click
Review + create
.- Click
Create
.From Azure CLIβ
az monitor activity-log alert create --resource-group "<resource group name>" --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/delete and level=<verbose | information | warning | error | critical> --scope "/subscriptions/<subscription ID>" --name "<activity log rule name>" --subscription <subscription id> --action-group <action group ID>
... [see more](remediation.md)