PostgreSQL Server Without Connection Throttling
- Query id: a9becca7-892a-4af7-b9e1-44bf20a4cd9a
- Query name: PostgreSQL Server Without Connection Throttling
- Platform: Ansible
- Severity: Medium
- Category: Observability
- CWE: 770
- URL: Github
Description¶
Ensure that Connection Throttling is set for the PostgreSQL server
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - yaml file
---
- name: Update PostgreSQL Server setting
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: off
- name: Update PostgreSQL Server setting2
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: Off
- name: Update PostgreSQL Server setting3
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: OFF
- name: Update PostgreSQL Server setting4
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: "off"
- name: Update PostgreSQL Server setting5
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: "Off"
- name: Update PostgreSQL Server setting6
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: "OFF"
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
- name: Update PostgreSQL Server setting
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: on
- name: Update PostgreSQL Server setting2
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: On
- name: Update PostgreSQL Server setting3
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: ON
- name: Update PostgreSQL Server setting4
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: on
- name: Update PostgreSQL Server setting5
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: On
- name: Update PostgreSQL Server setting6
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: connection_throttling
value: ON