Bylaw

Gallery › Health Deidentification Service › Azure built-in policies

Azure Health Data Services de-identification service should disable public network access

Converted Policy Audit Disabled Mode Indexed Version 1.0.0

Disabling public network access improves security by ensuring that the resource isn't exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead.

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

Azure Policy JSONHealthDeidentification_PublicNetworkAccess_Audit.json · 49 lines
{
  "properties": {
    "displayName": "Azure Health Data Services de-identification service should disable public network access",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Disabling public network access improves security by ensuring that the resource isn't exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead.",
    "metadata": {
      "version": "1.0.0",
      "category": "Health Deidentification Service"
    },
    "version": "1.0.0",
    "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.HealthDataAIServices/deidServices"
          },
          {
            "field": "Microsoft.HealthDataAIServices/deidServices/publicNetworkAccess",
            "notEquals": "Disabled"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/c5f34731-7ab9-42ff-922d-ef4920068b74",
  "name": "c5f34731-7ab9-42ff-922d-ef4920068b74"
}
Bylawc5f34731-7ab9-42ff-922d-ef4920068b74.bylaw.ps1 · 28 lines
# Converted from HealthDeidentification_PublicNetworkAccess_Audit.json by ConvertTo-Bylaw.
Policy 'c5f34731-7ab9-42ff-922d-ef4920068b74' {

    Properties @{
        DisplayName   = 'Azure Health Data Services de-identification service should disable public network access'
        Description   = 'Disabling public network access improves security by ensuring that the resource isn''t exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead.'
        Version       = '1.0.0'
        Category      = 'Health Deidentification Service'
        PolicyVersion = '1.0.0'
        Mode          = 'Indexed'
    }

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

    Resource 'Microsoft.HealthDataAIServices/deidServices' {

        Require 'publicNetworkAccess is Disabled' {
            Field publicNetworkAccess | Must -Be 'Disabled'
        }
    }

    Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Health Deidentification Service/HealthDeidentification_PublicNetworkAccess_Audit.json in Azure/azure-policy, under the MIT licence.