π‘οΈ Azure MySQL Flexible Server audit_log_enabled Parameter is not set to ONπ’
- Contextual name: π‘οΈ Flexible Server audit_log_enabled Parameter is not set to ONπ’
- ID:
/ce/ca/azure/mysql-database/flexible-server-audit-log-enabled-parameter - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY,PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Descriptionβ
Descriptionβ
Enable
audit_log_enabledonMySQL flexible servers.Rationaleβ
Enabling
audit_log_enabledhelps MySQL to log items such as connection attempts, DDL/DML access, and other events. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.Impactβ
There are additional costs for log storage. For high-traffic databases, these logs can be significant. Determine your organization's needs before enabling.
Auditβ
From Azure Portalβ
- Log in to Azure Portal using https://portal.azure.com.
- Select
Azure Database for MySQL Servers.- For each database, under the Settings, click
Server parameters.- In the filter bar, type
audit_log_enabled.- Ensure that the
VALUEforaudit_log_enabledisON.From Azure CLIβ
Ensure the following command returns a
valueofon:az mysql flexible-server parameter show \
--resource-group {{resource-group-name}} \
--server-name {{server-name}} \
--name audit_log_enabledFrom PowerShellβ
... see more
Remediationβ
Remediationβ
From Azure Portalβ
Part 1 - Turn on audit logsβ
- Log in to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for MySQL flexible servers.- For each database, under
Settings, clickServer parameters.- Set
audit_log_enabledtoON.- Click
Save.Part 2 - Capture audit logs (diagnostic settings are examples only, send these logs to the appropriate data sink for your logging needs)β
- Under Monitoring, select
Diagnostic settings.- Select
+ Add diagnostic setting.- Provide a diagnostic setting name.
- Under Categories, select
MySQL Audit Logs.- Specify destination details.
- Click
Save.It may take up to 10 minutes for the logs to appear in the configured destination.
From Azure CLIβ
Use the following command to enable
audit_log_enabled:az mysql flexible-server parameter set \
--resource-group {{resource-group-name}} \
--server-name {{server-name}} \
--name audit_log_enabled \
--value onFrom PowerShellβ
Use the following command to enable
audit_log_enabled:... see more
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ CIS Azure v3.0.0 β πΌ 5.3.3 Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server (Automated) | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Logging and Monitoring Configuration | 75 | no data |