More Info:

Ensure that “log_duration” server parameter is enabled for all PostgreSQL database servers created in your Microsoft Azure cloud account. Once enabled, the “log_duration” parameter allows recording the duration of each completed PostgreSQL statement. Only users with administrative privileges can change this setting within Azure PostgreSQL server configuration. For database clients using extended query protocol, the duration of the “Parse”, “Bind”, and “Execute” steps is logged independently.

Risk Level

Medium

Address

Security

Compliance Standards

HITRUST, SOC2, NISTCSF, PCIDSS

Triage and Remediation

Remediation

To remediate the “LOG_DURATION” parameter misconfiguration for PostgreSQL Servers in Azure, you can follow the below steps:

  1. Log in to the Azure portal (https://portal.azure.com/).
  2. Navigate to the PostgreSQL server for which you want to enable the “LOG_DURATION” parameter.
  3. Click on the “Configuration” tab from the left-hand side menu.
  4. Scroll down to the “Parameters” section and search for the “log_duration” parameter.
  5. If the “log_duration” parameter is not present, click on the ”+ Add parameter” button and add the parameter.
  6. Set the value of the “log_duration” parameter to “on” to enable it.
  7. Click on the “Save” button to save the changes.

After following the above steps, the “LOG_DURATION” parameter will be enabled for the PostgreSQL server in Azure.