turbot/tailpipe-mod-azure-activity-log-detections

Detection: SQL Server Firewall Rule Created or Updated

Overview

Detect when an Azure SQL server firewall rule was created or updated. Firewall rules control network access to SQL servers, and changes to these rules can impact database connectivity or security. Monitoring these updates helps ensure proper access control and prevents unauthorized modifications that could compromise data security.

References:

Usage

Run the detection in your terminal:

powerpipe detection run azure_activity_log_detections.detection.sql_server_firewall_rule_created_or_updated

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe detection run azure_activity_log_detections.detection.sql_server_firewall_rule_created_or_updated --share

SQL

This detection uses a named query:

select
tp_timestamp as timestamp,
operation_name as operation,
resource_id as resource,
caller as actor,
tp_index::varchar as subscription_id,
resource_group_name as resource_group,
tp_id as source_id,
status as event_status,
*
from
azure_activity_log
where
operation_name = 'Microsoft.Sql/servers/firewallRules/write'
and status = 'Succeeded'
order by
timestamp desc;

Tags