| name | cis-azure-database-5.5 |
| description | Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server |
| category | cis-azure-database |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","mysql","database"] |
| cis_id | 5.5 |
| cis_benchmark | CIS Microsoft Azure Database Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
5.5 Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server (Automated)
Profile Applicability
Description
Enable audit_log_enabled on MySQL flexible servers.
Rationale
Enabling audit_log_enabled helps MySQL Database to log items such as connection attempts to the server, DDL/DML access, and more. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.
Impact
There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling.
Audit
Audit from Azure Portal
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for MySQL Servers.
- For each database, under
Settings, click Server parameters.
- In the filter bar, type
audit_log_enabled.
- Ensure that the
VALUE for audit_log_enabled is ON.
Audit from Azure CLI
Ensure the below command returns a value of on:
az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name audit_log_enabled
Audit from PowerShell
Ensure the below command returns a Value of on:
Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_enabled
Expected Result
The audit_log_enabled server parameter should return a value of ON.
Remediation
Remediate from Azure Portal
Part 1 - Turn on audit logs
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for MySQL flexible servers.
- For each database, under
Settings, click Server parameters.
- Set
audit_log_enabled to .