π‘οΈ Azure MySQL Flexible Server audit_log_events Parameter is not set with the CONNECTION eventπ’
- Contextual name: π‘οΈ Flexible Server audit_log_events Parameter is not set with the CONNECTION eventπ’
- ID:
/ce/ca/azure/mysql-database/flexible-server-audit-log-events-parameter - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY,PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Descriptionβ
Descriptionβ
Set
audit_log_enabledto includeCONNECTIONonMySQL flexible servers.Rationaleβ
Enabling
CONNECTIONhelps 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β
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Go to
Azure Database for MySQL flexible servers.- For each database, under
Settings, clickServer parameters.- In the filter bar, type
audit_log.- Ensure that the
VALUEforaudit_log_enabledisON.- Ensure that the
VALUEforaudit_log_eventsincludesCONNECTION.From Azure CLIβ
Ensure the below command returns a
valuethat includesCONNECTION:az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name audit_log_events
... [see more](description.md)
Remediationβ
Remediationβ
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, clickServer parameters.- In the filter bar, type
audit_log.- Set
audit_log_enabledtoON.- In the drop-down next to
audit_log_events, checkCONNECTION.- Click
Save.- Under
Monitoring, selectDiagnostic settings.- Select
+ Add diagnostic setting.- Provide a diagnostic setting name.
- Under
Categories, selectMySQL 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 below command to set
audit_log_eventstoCONNECTION:az mysql flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name audit_log_events --value CONNECTIONFrom PowerShellβ
Use the below command to set
audit_log_eventstoCONNECTION:Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_events -Value CONNECTION
... [see more](remediation.md)
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ CIS Azure v3.0.0 β πΌ 5.3.4 Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server (Automated) | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Logging and Monitoring Configuration | 65 | no data |