last sync: 2020-Jul-13 14:14:30 UTC

Azure Policy

SQL servers should be configured with auditing retention days greater than 90 days.

Policy DisplayName SQL servers should be configured with auditing retention days greater than 90 days.
Policy Id 89099bee-89e0-4b26-a5f4-165451757743
Policy Category SQL
Policy Description Audit SQL servers configured with an auditing retention period of less than 90 days.
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
[Preview]: Motion Picture Association of America (MPAA) 92646f03-e39d-47a9-9e24-58d60ef49af8
Policy Rule
{
  "properties": {
    "displayName": "SQL servers should be configured with auditing retention days greater than 90 days.",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Audit SQL servers configured with an auditing retention period of less than 90 days.",
    "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": {
            "field": "Microsoft.Sql/servers/auditingSettings/retentionDays",
            "greater": 90
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/89099bee-89e0-4b26-a5f4-165451757743",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "89099bee-89e0-4b26-a5f4-165451757743"
}