last sync: 2021-Sep-24 16:09:49 UTC

Azure Policy definition

[Deprecated]: Audit enabling of diagnostic logs in App Services

Name [Deprecated]: Audit enabling of diagnostic logs in App Services
Azure Portal
Id 752c6934-9bcc-4749-b004-655e676ae2ac
Version 1.0.0-deprecated
details on versioning
Category App Service
Microsoft docs
Description Audit enabling of diagnostic logs on the app. This enables you to recreate activity trails for investigation purposes if a security incident occurs or your network is compromised
Mode All
Type BuiltIn
Preview FALSE
Deprecated True
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History none
Used in Initiatives none
JSON
{
  "displayName": "[Deprecated]: Audit enabling of diagnostic logs in App Services",
  "policyType": "BuiltIn",
  "mode": "All",
  "description": "Audit enabling of diagnostic logs on the app. This enables you to recreate activity trails for investigation purposes if a security incident occurs or your network is compromised",
  "metadata": {
    "version": "1.0.0-deprecated",
    "category": "App Service",
    "deprecated": true
  },
  "parameters": {
    "effect": {
      "type": "String",
      "metadata": {
        "displayName": "Effect",
        "description": "Enable or disable the execution of the policy"
      },
      "allowedValues": [
        "Audit",
        "Disabled"
      ],
      "defaultValue": "Audit"
    }
  },
  "policyRule": {
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.Web/sites/config"
        },
        {
          "field": "name",
          "equals": "web"
        },
        {
          "anyOf": [
            {
              "field": "Microsoft.Web/sites/config/detailedErrorLoggingEnabled",
              "notEquals": "true"
            },
            {
              "field": "Microsoft.Web/sites/config/httpLoggingEnabled",
              "notEquals": "true"
            },
            {
              "field": "Microsoft.Web/sites/config/requestTracingEnabled",
              "notEquals": "true"
            }
          ]
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]"
    }
  }
}