Gallery › VirtualEnclaves › Azure built-in policies
[Preview]: Control the use of PostgreSql in a Virtual Enclave
Converted Initiative Version 1.0.0-preview Preview
This initiative deploys Azure policies for PostgreSql ensuring boundary protection of this resource while it operates within the logically separated structure of Azure Virtual Enclaves. https://aka.ms/VirtualEnclaves
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONPostgreSqlInitiative.json · 70 lines
{
"properties": {
"displayName": "[Preview]: Control the use of PostgreSql in a Virtual Enclave",
"policyType": "BuiltIn",
"description": "This initiative deploys Azure policies for PostgreSql ensuring boundary protection of this resource while it operates within the logically separated structure of Azure Virtual Enclaves. https://aka.ms/VirtualEnclaves",
"metadata": {
"version": "1.0.0-preview",
"category": "VirtualEnclaves",
"preview": true
},
"version": "1.0.0-preview",
"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.*.*"
}
],
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/5eaa16b4-81f2-4354-aef3-2d77288e396e",
"name": "5eaa16b4-81f2-4354-aef3-2d77288e396e"
}Bylaw5eaa16b4-81f2-4354-aef3-2d77288e396e.bylaw.ps1 · 72 lines
# Converted from PostgreSqlInitiative.json by ConvertTo-Bylaw.
Initiative '5eaa16b4-81f2-4354-aef3-2d77288e396e' {
Properties @{
DisplayName = '[Preview]: Control the use of PostgreSql in a Virtual Enclave'
Description = 'This initiative deploys Azure policies for PostgreSql ensuring boundary protection of this resource while it operates within the logically separated structure of Azure Virtual Enclaves. https://aka.ms/VirtualEnclaves'
Version = '1.0.0-preview'
Category = 'VirtualEnclaves'
Preview = $true
PolicyVersion = '1.0.0-preview'
}
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.*.*'
}
}Members (10)
- Enforce SSL connection should be enabled for PostgreSQL database servers
- Public network access should be disabled for PostgreSQL servers
- Log duration should be enabled for PostgreSQL database servers
- Log checkpoints should be enabled for PostgreSQL database servers
- Log connections should be enabled for PostgreSQL database servers
- Connection throttling should be enabled for PostgreSQL database servers
- Disconnections should be logged for PostgreSQL database servers.
- PostgreSQL servers should use customer-managed keys to encrypt data at rest
- Infrastructure encryption should be enabled for Azure Database for PostgreSQL servers
- Configure Advanced Threat Protection to be enabled on Azure database for PostgreSQL servers
Source: built-in-policies/policySetDefinitions/VirtualEnclaves/PostgreSqlInitiative.json in Azure/azure-policy, under the MIT licence.
Bylaw