Bylaw

Gallery › Logic Apps › Azure built-in policies

Logic Apps Integration Service Environment should be encrypted with customer-managed keys

Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0

Deploy into Integration Service Environment to manage encryption at rest of Logic Apps data using customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.

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

Azure Policy JSONISEWithCustomerManagedKey_AuditDeny.json · 50 lines
{
  "properties": {
    "displayName": "Logic Apps Integration Service Environment should be encrypted with customer-managed keys",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Deploy into Integration Service Environment to manage encryption at rest of Logic Apps data using customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.",
    "metadata": {
      "version": "1.0.0",
      "category": "Logic Apps"
    },
    "version": "1.0.0",
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Logic/integrationServiceEnvironments"
          },
          {
            "field": "Microsoft.Logic/integrationServiceEnvironments/encryptionConfiguration",
            "exists": "false"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/1fafeaf6-7927-4059-a50a-8eb2a7a6f2b5",
  "name": "1fafeaf6-7927-4059-a50a-8eb2a7a6f2b5"
}
Bylaw1fafeaf6-7927-4059-a50a-8eb2a7a6f2b5.bylaw.ps1 · 28 lines
# Converted from ISEWithCustomerManagedKey_AuditDeny.json by ConvertTo-Bylaw.
Policy '1fafeaf6-7927-4059-a50a-8eb2a7a6f2b5' {

    Properties @{
        DisplayName   = 'Logic Apps Integration Service Environment should be encrypted with customer-managed keys'
        Description   = 'Deploy into Integration Service Environment to manage encryption at rest of Logic Apps data using customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.'
        Version       = '1.0.0'
        Category      = 'Logic Apps'
        PolicyVersion = '1.0.0'
        Mode          = 'Indexed'
    }

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

    Resource 'Microsoft.Logic/integrationServiceEnvironments' {

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

    Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Logic Apps/ISEWithCustomerManagedKey_AuditDeny.json in Azure/azure-policy, under the MIT licence.