Skip to main content

More Info:

Configure the AuditActionGroups property to appropriate groups to capture all the critical activities on the SQL Server and all the SQL databases hosted on the SQL server.

Risk Level

Medium

Address

Reliability, Security

Compliance Standards

  • HITRUST CSF
  • NIST CSF
  • PCI
  • SOC2

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration related to AuditActionGroups in Azure, please follow the below steps:
  1. Login to the Azure portal (https://portal.azure.com/).
  2. Go to the Azure Active Directory service.
  3. Select the “Audit logs” option under the Monitoring section.
  4. In the Audit logs blade, click on the “Diagnostic settings” option.
  5. Select the diagnostic setting that needs to be remediated.
  6. In the “Diagnostic settings” blade, scroll down to the “Categories” section.
  7. In the “Categories” section, ensure that the “AuditLogs” option is selected.
  8. Under the “AuditLogs” option, select the “Select specific actions” radio button.
  9. In the “Select specific actions” section, ensure that all the required AuditActionGroups are selected.
  10. Click on the “Save” button to save the changes.
By following the above steps, the misconfiguration related to AuditActionGroups in Azure can be remediated.

To remediate the misconfiguration of AuditActionGroups in auditing for AZURE using AZURE CLI, follow these steps:
  1. Open the AZURE CLI on your local machine or use the AZURE Cloud Shell.
  2. Run the following command to get the current configuration of AuditActionGroups:
  3. Check the output of the above command to see if AuditActionGroups are set properly. If not, proceed to the next step.
  4. Run the following command to set the AuditActionGroups:
    Replace <comma separated list of action groups> with the appropriate list of action groups. For example, if you want to set the AuditActionGroups to “Write”, “Delete”, and “Action”, the command would be:
  5. Verify the configuration by running the first command again:
    The output should now show the updated list of AuditActionGroups.
By following these steps, you can remediate the misconfiguration of AuditActionGroups in auditing for AZURE using AZURE CLI.
To remediate the misconfiguration of AuditActionGroups in Azure using Python, follow the below steps:
  1. Import the necessary libraries:
  1. Set the credentials:
  1. Initialize the MonitorManagementClient:
  1. Get the existing AuditActionGroups:
  1. Update the AuditActionGroups:
  1. Verify the updated AuditActionGroups:
By following these steps, you can remediate the misconfiguration of AuditActionGroups in Azure using Python.
This change does not force replacement of the SQL database or server; it updates the database auditing policy in place.To verify, terraform plan should show an update to azurerm_mssql_database_extended_auditing_policy.sql_db_audit with the audit_actions_and_groups argument being added or changed to the list you configured.