last sync: 2020-Oct-30 14:31:57 UTC

Azure Policy definition

Disconnections should be logged for PostgreSQL database servers.

Name Disconnections should be logged for PostgreSQL database servers.
Azure Portal
Id eb6f77b9-bd53-4e35-a23d-7f65d5f0e446
Version 1.0.0
details on versioning
Category SQL
Microsoft docs
Description This policy helps audit any PostgreSQL databases in your environment without log_disconnections enabled.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: AuditIfNotExists
Allowed: (AuditIfNotExists, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2019-10-03 22:58:00 add eb6f77b9-bd53-4e35-a23d-7f65d5f0e446
Used in Initiatives
Initiative DisplayName Initiative Id Initiative Category State
CIS Microsoft Azure Foundations Benchmark 1.1.0 1a5bb27d-173f-493e-9568-eb56638dde4d Regulatory Compliance GA
Json
{
  "properties": {
    "displayName": "Disconnections should be logged for PostgreSQL database servers.",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "This policy helps audit any PostgreSQL databases in your environment without log_disconnections enabled.",
    "metadata": {
      "version": "1.0.0",
      "category": "SQL"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "AuditIfNotExists",
          "Disabled"
        ],
        "defaultValue": "AuditIfNotExists"
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "equals": "Microsoft.DBforPostgreSQL/servers"
      },
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.DBforPostgreSQL/servers/configurations",
          "name": "log_disconnections",
          "existenceCondition": {
            "field": "Microsoft.DBforPostgreSQL/servers/configurations/value",
            "equals": "ON"
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/eb6f77b9-bd53-4e35-a23d-7f65d5f0e446",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "eb6f77b9-bd53-4e35-a23d-7f65d5f0e446"
}