| name | cis-azure-database-5.6 |
| description | Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server |
| category | cis-azure-database |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","mysql","database"] |
| cis_id | 5.6 |
| cis_benchmark | CIS Microsoft Azure Database Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
5.6 Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server (Automated)
Profile Applicability
Description
Set audit_log_events to include CONNECTION on MySQL flexible servers.
Rationale
Enabling CONNECTION helps MySQL Database to log items such as successful and failed connection attempts to the server. 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 flexible servers.
- For each database, under
Settings, click Server parameters.
- In the filter bar, type
audit_log.
- Ensure that the
VALUE for audit_log_enabled is ON.
- Ensure that the
VALUE for audit_log_events includes CONNECTION.
Audit from Azure CLI
Ensure the below command returns a value that includes CONNECTION:
az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name audit_log_events
Audit from PowerShell
Ensure the below command returns a Value that includes CONNECTION:
Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_events
Expected Result
The audit_log_events server parameter should include CONNECTION in its value, and audit_log_enabled should be ON.
Remediation
Remediate from Azure Portal
- Login to Azure Portal using https://portal.azure.com.