π‘οΈ 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_eventsto includeCONNECTIONonMySQL flexible servers.Rationaleβ
Enabling
CONNECTIONhelps MySQL to log 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 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β
- 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 following command returns a
valuethat includesCONNECTION:az mysql flexible-server parameter show \
--resource-group {{resource-group-name}} \
--server-name {{server-name}} \
... [see more](description.md)
Remediationβ
Remediationβ
From Azure Portalβ
- 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.- 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 following command to set
audit_log_eventstoCONNECTION:az mysql flexible-server parameter set \
--resource-group {{resource-group-name}} \
--server-name {{server-name}} \
--name audit_log_events \
--value CONNECTIONFrom PowerShellβ
Use the following command to set
audit_log_eventstoCONNECTION:... see more
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 | 77 | no data |