Bylaw

Gallery › Azure Data Explorer › Azure built-in policies

Double encryption should be enabled on Azure Data Explorer

Converted Policy Audit Deny Disabled Mode Indexed Version 2.0.0

Enabling double encryption helps protect and safeguard your data to meet your organizational security and compliance commitments. When double encryption has been enabled, data in the storage account is encrypted twice, once at the service level and once at the infrastructure level, using two different encryption algorithms and two different keys.

ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.

Azure Policy JSONADX_doubleEncryption.json · 58 lines
{
  "properties": {
    "policyType": "BuiltIn",
    "displayName": "Double encryption should be enabled on Azure Data Explorer",
    "description": "Enabling double encryption helps protect and safeguard your data to meet your organizational security and compliance commitments. When double encryption has been enabled, data in the storage account is encrypted twice, once at the service level and once at the infrastructure level, using two different encryption algorithms and two different keys.",
    "metadata": {
      "version": "2.0.0",
      "category": "Azure Data Explorer"
    },
    "version": "2.0.0",
    "mode": "Indexed",
    "parameters": {
      "effect": {
        "type": "string",
        "defaultValue": "Audit",
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Kusto/Clusters"
          },
          {
            "anyOf": [
              {
                "field": "Microsoft.Kusto/clusters/enableDoubleEncryption",
                "exists": false
              },
              {
                "field": "Microsoft.Kusto/clusters/enableDoubleEncryption",
                "equals": false
              }
            ]
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "2.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/ec068d99-e9c7-401f-8cef-5bdde4e6ccf1",
  "name": "ec068d99-e9c7-401f-8cef-5bdde4e6ccf1"
}
Bylawec068d99-e9c7-401f-8cef-5bdde4e6ccf1.bylaw.ps1 · 33 lines
# Converted from ADX_doubleEncryption.json by ConvertTo-Bylaw.
Policy 'ec068d99-e9c7-401f-8cef-5bdde4e6ccf1' {

    Properties @{
        DisplayName   = 'Double encryption should be enabled on Azure Data Explorer'
        Description   = 'Enabling double encryption helps protect and safeguard your data to meet your organizational security and compliance commitments. When double encryption has been enabled, data in the storage account is encrypted twice, once at the service level and once at the infrastructure level, using two different encryption algorithms and two different keys.'
        Version       = '2.0.0'
        Category      = 'Azure Data Explorer'
        PolicyVersion = '2.0.0'
        Mode          = 'Indexed'
    }

    Parameter Effect @{
        Type          = 'string'
        AllowedValues = @('Audit', 'Deny', 'Disabled')
        Default       = 'Audit'
        DisplayName   = 'Effect'
        Description   = 'Enable or disable the execution of the policy'
    }

    Resource 'Microsoft.Kusto/Clusters' {

        Require 'enableDoubleEncryption exists' {
            Field enableDoubleEncryption | Must -Exist
        }

        Require 'enableDoubleEncryption is not false' {
            Field enableDoubleEncryption | Must -Not -Be $false -IfPresent
        }
    }

    Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Azure Data Explorer/ADX_doubleEncryption.json in Azure/azure-policy, under the MIT licence.