More Info:
MySQL Database Server should have enforce ssl connection enabledRisk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AZURE
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- HIPAA
- HITRUST CSF
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Sure, here are the step-by-step instructions to remediate the MySQL Database Server Should Enforce SSL Connection misconfiguration in Azure using the Azure console:
- Log in to the Azure portal (https://portal.azure.com/).
- Navigate to the Azure Database for MySQL server that you want to remediate.
- Click on the “Connection security” option under the “Security” section in the left-hand menu.
- In the “Connection security” section, toggle the “Enforce SSL connection” option to “Enabled”.
- Click the “Save” button at the top of the page to save the changes.
- Once the changes are saved, the MySQL database server will now enforce SSL connections.
Using CLI
Using CLI
To remediate the MySQL Database Server Should Enforce SSL Connection misconfiguration in Azure using Azure CLI, you can follow the below steps:
-
Open the Azure CLI and log in to your Azure account using the command
az login. -
Once you are logged in, select the Azure subscription that contains your MySQL database by using the command
az account set --subscription <subscription_id>. -
Next, retrieve the resource ID of your MySQL server using the command
az mysql server list --resource-group <resource_group_name> --query [0].id --output tsv. -
Now, enable SSL enforcement for the MySQL server by running the command
az mysql server update --resource-group <resource_group_name> --name <mysql_server_name> --ssl-enforcement Enabled. -
Finally, verify that SSL enforcement is enabled by running the command
az mysql server show --resource-group <resource_group_name> --name <mysql_server_name> --query sslEnforcement.
Using Python
Using Python
To remediate the misconfiguration of MySQL Database Server Should Enforce SSL Connection in AZURE, you can follow the below steps using Python:That’s it! You have successfully remediated the misconfiguration of MySQL Database Server Should Enforce SSL Connection in Azure using Python.
- First, you need to install the ‘azure-mgmt-rdbms’ package. You can install it using the following command:
- Next, you need to authenticate to your Azure account. You can use the following code to authenticate:
- After authentication, you need to create a client object for the Azure Database for MySQL server. You can use the following code to create the client object:
- Once you have the client object, you can update the server configuration to enforce SSL connection. You can use the following code to update the server configuration:
- Finally, you can verify if the SSL connection is enforced by checking the server configuration. You can use the following code to check the server configuration:
Using Terraform
Using Terraform
ssl_enforcement_enabled from false to true is an in-place update and does not force replacement of the server.To verify, terraform plan should show a single in-place change on this resource, with ssl_enforcement_enabled changing from false (or null) to true.
