Review connection throttling for Azure PostgreSQL

Limit repeated connection attempts that use incorrect passwords in Azure PostgreSQL.

Description

On Azure PostgreSQL Flexible Server, enabling connection_throttle.enable temporarily blocks new connections from an IP address after repeated invalid-password attempts.

Potential impact

When throttling is off, repeated failed logins can continue and add authentication load.

Remediation

If your Flexible Server lists connection_throttle.enable as a parameter, set it to on. Check firewall and authentication policies, correct clients that use stale credentials and verify legitimate connections from shared IPs. Tune connection pools separately for normal traffic.

Examples

The first excerpt uses retired Single Server. In the second, servers1 must refer to an existing Flexible Server that supports connection_throttle.enable. Provisioning the server and migrating data are separate steps.

Before

bicep
resource servers1_connection_throttling 'Microsoft.DBforPostgreSQL/servers/configurations@2017-12-01' = {
  parent: servers1
  name: 'connection_throttling'
  properties: {
    value: 'Off'
  }
}

After

bicep
resource servers1_connection_throttling 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2024-08-01' = {
  parent: servers1
  name: 'connection_throttle.enable'
  properties: {
    source: 'user-override'
    value: 'on'
  }
}

References