PostgreSQL servers must have the server parameter log_connections set to ON so connection events are recorded for auditing and intrusion detection. Without this logging, connection attempts and session activity can go unnoticed, hampering incident investigation and compliance.
In Ansible, tasks using the azure.azcollection.azure_rm_postgresqlconfiguration or azure_rm_postgresqlconfiguration modules must set the name property to log_connections and the value property to ON. This rule flags tasks where name equals log_connections (case-insensitive) and value is missing or not ON (case-insensitive). Secure configuration example:
- name:Update PostgreSQL Server settingazure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:on- name:Update PostgreSQL Server setting2azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:On- name:Update PostgreSQL Server setting3azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:ON- name:Update PostgreSQL Server setting4azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:on- name:Update PostgreSQL Server setting5azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:On- name:Update PostgreSQL Server setting6azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:ON
Non-Compliant Code Examples
---- name:Update PostgreSQL Server settingazure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:off- name:Update PostgreSQL Server setting2azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:Off- name:Update PostgreSQL Server setting3azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:OFF- name:Update PostgreSQL Server setting4azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:"off"- name:Update PostgreSQL Server setting5azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:"Off"- name:Update PostgreSQL Server setting6azure.azcollection.azure_rm_postgresqlconfiguration:resource_group:myResourceGroupserver_name:myServername:log_connectionsvalue:"OFF"
1
2
rulesets:- Ansible / Azure # Rules to enforce / Azure.
個別デモのリクエスト
Datadogを開始
Ask AI
AI-generated responses may be inaccurate. Verify important info.