{
  "properties": {
    "displayName": "Function apps should have 'Client Certificates (Incoming client certificates)' enabled",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Client certificates allow for the app to request a certificate for incoming requests. Only clients with valid certificates will be able to reach the app.",
    "metadata": {
      "version": "1.0.1",
      "category": "App Service"
    },
    "parameters": {
      "effect": {
        "type": "string",
        "defaultValue": "Audit",
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Web/sites"
          },
          {
            "field": "kind",
            "like": "functionapp*"
          },
          {
            "field": "Microsoft.Web/sites/clientCertEnabled",
            "equals": "false"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/eaebaea7-8013-4ceb-9d14-7eb32271373c",
  "name": "eaebaea7-8013-4ceb-9d14-7eb32271373c"
}