Bylaw

Gallery › Mission › Azure built-in policies

Control the use of PostgreSQL in Mission Platforms

Converted Initiative Version 1.0.0

This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. This initiative enforces PostgreSQL boundary protections to maintain security and compliance requirements. For more information, visit https://aka.ms/mission-platforms

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

Azure Policy JSONPostgreSqlInitiative.json · 74 lines
{
  "properties": {
    "displayName": "Control the use of PostgreSQL in Mission Platforms",
    "policyType": "BuiltIn",
    "description": "This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. This initiative enforces PostgreSQL boundary protections to maintain security and compliance requirements. For more information, visit https://aka.ms/mission-platforms",
    "metadata": {
      "version": "1.0.0",
      "category": "Mission"
    },
    "version": "1.0.0",
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/d158790f-bfb0-486c-8631-2dc6b4e8e6af",
        "policyDefinitionReferenceId": "PostgreSQLServersShouldHaveTransparentDataEncryptionEnabled",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b52376f7-9612-48a1-81cd-1ffe4b61032c",
        "policyDefinitionReferenceId": "PostgreSQLShouldDisablePublicNetworkAccess",
        "definitionVersion": "2.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/eb6f77b9-bd53-4e35-a23d-7f65d5f0e8f3",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledLogDuration",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/eb6f77b9-bd53-4e35-a23d-7f65d5f0e43d",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledLogCheckpoint",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/eb6f77b9-bd53-4e35-a23d-7f65d5f0e442",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledLogConnections",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5345bb39-67dc-4960-a1bf-427e16b9a0bd",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledConnectionThrottling",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/eb6f77b9-bd53-4e35-a23d-7f65d5f0e446",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledDisconnections",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/18adea5e-f416-4d0f-8aa8-d24321e3e274",
        "policyDefinitionReferenceId": "PostgreSQLShouldCustomerManagedKeysEncryptDataAtRest",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/24fba194-95d6-48c0-aea7-f65bf859c598",
        "policyDefinitionReferenceId": "PostgreSQLShouldEnabledInfrastructureEncryption",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/db048e65-913c-49f9-bb5f-1084184671d3",
        "policyDefinitionReferenceId": "PostgreSQLEnabledConfigureAdvancedThreatProtection",
        "definitionVersion": "1.*.*"
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0564d078-92f5-4f97-8398-b9f58a51f70b",
        "policyDefinitionReferenceId": "privateEndpointShouldBeEnabledForPostgresqlServers",
        "definitionVersion": "1.*.*"
      }
    ],
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/3c28c64f-9636-46e3-8ae6-8e585b85870e",
  "name": "3c28c64f-9636-46e3-8ae6-8e585b85870e"
}
Bylaw3c28c64f-9636-46e3-8ae6-8e585b85870e.bylaw.ps1 · 77 lines
# Converted from PostgreSqlInitiative.json by ConvertTo-Bylaw.
Initiative '3c28c64f-9636-46e3-8ae6-8e585b85870e' {

    Properties @{
        DisplayName   = 'Control the use of PostgreSQL in Mission Platforms'
        Description   = 'This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. This initiative enforces PostgreSQL boundary protections to maintain security and compliance requirements. For more information, visit https://aka.ms/mission-platforms'
        Version       = '1.0.0'
        Category      = 'Mission'
        PolicyVersion = '1.0.0'
    }

    PolicyDefinition @{
        Id          = 'd158790f-bfb0-486c-8631-2dc6b4e8e6af'
        ReferenceId = 'PostgreSQLServersShouldHaveTransparentDataEncryptionEnabled'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = 'b52376f7-9612-48a1-81cd-1ffe4b61032c'
        ReferenceId = 'PostgreSQLShouldDisablePublicNetworkAccess'
        Version     = '2.*.*'
    }

    PolicyDefinition @{
        Id          = 'eb6f77b9-bd53-4e35-a23d-7f65d5f0e8f3'
        ReferenceId = 'PostgreSQLShouldEnabledLogDuration'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = 'eb6f77b9-bd53-4e35-a23d-7f65d5f0e43d'
        ReferenceId = 'PostgreSQLShouldEnabledLogCheckpoint'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = 'eb6f77b9-bd53-4e35-a23d-7f65d5f0e442'
        ReferenceId = 'PostgreSQLShouldEnabledLogConnections'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = '5345bb39-67dc-4960-a1bf-427e16b9a0bd'
        ReferenceId = 'PostgreSQLShouldEnabledConnectionThrottling'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = 'eb6f77b9-bd53-4e35-a23d-7f65d5f0e446'
        ReferenceId = 'PostgreSQLShouldEnabledDisconnections'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = '18adea5e-f416-4d0f-8aa8-d24321e3e274'
        ReferenceId = 'PostgreSQLShouldCustomerManagedKeysEncryptDataAtRest'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = '24fba194-95d6-48c0-aea7-f65bf859c598'
        ReferenceId = 'PostgreSQLShouldEnabledInfrastructureEncryption'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = 'db048e65-913c-49f9-bb5f-1084184671d3'
        ReferenceId = 'PostgreSQLEnabledConfigureAdvancedThreatProtection'
        Version     = '1.*.*'
    }

    PolicyDefinition @{
        Id          = '0564d078-92f5-4f97-8398-b9f58a51f70b'
        ReferenceId = 'privateEndpointShouldBeEnabledForPostgresqlServers'
        Version     = '1.*.*'
    }
}

Members (11)

Source: built-in-policies/policySetDefinitions/Mission/PostgreSqlInitiative.json in Azure/azure-policy, under the MIT licence.