PostgreSQL Database configuration ‘connection_throttling’ should be on

Description

Enabling connection_throttling helps the PostgreSQL Database to Set the verbosity of logged messages which in turn generates query and error logs with respect to concurrent connections, that could lead to a successful Denial of Service (DoS) attack by exhausting connection resources.

Remediation Steps

Azure Portal

Azure CLI

  • To enable connection_throttling:

az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name connection_throttling --value on

Terraform

Example Configuration

resource "azurerm_postgresql_configuration" "example" {
  name  = "connection_throttling"
  value = "on"

  # other required fields here
}