last sync: 2021-Jan-25 16:07:05 UTC

Azure Policy definition

SQL servers should be configured with 90 days auditing retention or higher.

Name SQL servers should be configured with 90 days auditing retention or higher.
Azure Portal
Id 89099bee-89e0-4b26-a5f4-165451757743
Version 2.0.0
details on versioning
Category SQL
Microsoft docs
Description SQL servers should be configured with 90 days auditing retention or higher.
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
2020-12-11 15:42:52 change Major (1.0.0 > 2.0.0)
Used in Initiatives
Initiative DisplayName Initiative Id Initiative Category State
[Deprecated]: Azure Security Benchmark v1 42a694ed-f65e-42b2-aa9e-8052e9740a92 Regulatory Compliance Deprecated
[Preview]: Motion Picture Association of America (MPAA) 92646f03-e39d-47a9-9e24-58d60ef49af8 Regulatory Compliance Preview
CIS Microsoft Azure Foundations Benchmark 1.1.0 1a5bb27d-173f-493e-9568-eb56638dde4d Regulatory Compliance GA
Enable Monitoring in Azure Security Center 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 Security Center GA
JSON Changes

Json
{
  "properties": {
    "displayName": "SQL servers should be configured with 90 days auditing retention or higher.",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "SQL servers should be configured with 90 days auditing retention or higher.",
    "metadata": {
      "version": "2.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": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Sql/servers"
          },
          {
            "field": "kind",
            "notContains": "analytics"
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.Sql/servers/auditingSettings",
          "name": "default",
          "existenceCondition": {
            "anyOf": [
              {
                "field": "Microsoft.Sql/servers/auditingSettings/retentionDays",
                "equals": 0
              },
              {
                "field": "Microsoft.Sql/servers/auditingSettings/retentionDays",
                "greaterOrEquals": 90
              }
            ]
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/89099bee-89e0-4b26-a5f4-165451757743",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "89099bee-89e0-4b26-a5f4-165451757743"
}