last sync: 2020-Jul-10 14:05:01 UTC

Azure Policy

SQL Auditing settings should have Action-Groups configured to capture critical activities

Policy DisplayName SQL Auditing settings should have Action-Groups configured to capture critical activities
Policy Id 7ff426e2-515f-405a-91c8-4f2333442eb5
Policy Category SQL
Policy Description The AuditActionsAndGroups property should contain at least SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP, BATCH_COMPLETED_GROUP to ensure a thorough audit logging
Policy Mode Indexed
Policy Type BuiltIn
Policy in Preview FALSE
Policy Deprecated FALSE
Policy Effect Default: AuditIfNotExists
Allowed: (AuditIfNotExists,Disabled)
Roles used none
Policy Changes no changes
Used in Policy Initiative(s)
Initiative DisplayName Initiative Id
CIS Microsoft Azure Foundations Benchmark 1.1.0 1a5bb27d-173f-493e-9568-eb56638dde4d
Enable Monitoring in Azure Security Center 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
[Preview]: Azure Security Benchmark 42a694ed-f65e-42b2-aa9e-8052e9740a92
Policy Rule
{
  "properties": {
    "displayName": "SQL Auditing settings should have Action-Groups configured to capture critical activities",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "The AuditActionsAndGroups property should contain at least SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP, BATCH_COMPLETED_GROUP to ensure a thorough audit logging",
    "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.Sql/servers"
      },
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.Sql/servers/auditingSettings",
          "name": "default",
          "existenceCondition": {
            "allOf": [
              {
                "not": {
                "field": "Microsoft.Sql/servers/auditingSettings/auditActionsAndGroups[*]",
                  "notEquals": "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"
                }
              },
              {
                "not": {
                "field": "Microsoft.Sql/servers/auditingSettings/auditActionsAndGroups[*]",
                  "notEquals": "FAILED_DATABASE_AUTHENTICATION_GROUP"
                }
              },
              {
                "not": {
                "field": "Microsoft.Sql/servers/auditingSettings/auditActionsAndGroups[*]",
                  "notEquals": "BATCH_COMPLETED_GROUP"
                }
              }
            ]
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/7ff426e2-515f-405a-91c8-4f2333442eb5",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "7ff426e2-515f-405a-91c8-4f2333442eb5"
}