Gallery › Mission › Azure built-in policies
Control the use of Event Grid 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. These guardrails reduce unintended network exposure and local-authentication risks for Azure Event Grid resources. Learn more at https://aka.ms/privateendpoints.
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONEventGridInitiative.json · 82 lines
{
"properties": {
"displayName": "Control the use of Event Grid in Mission Platforms",
"description": "This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. These guardrails reduce unintended network exposure and local-authentication risks for Azure Event Grid resources. Learn more at https://aka.ms/privateendpoints.",
"policyType": "BuiltIn",
"metadata": {
"version": "1.0.0",
"category": "Mission"
},
"version": "1.0.0",
"parameters": {
"restrictExternalPeEgdom_excludedSubIDs": {
"type": "Array",
"metadata": {
"displayName": "Event Grid Domain excluded subscription IDs",
"description": "List of subscription IDs excluded from the Event Grid Domain external private endpoint restriction"
},
"defaultValue": []
},
"restrictExternalPeEgtop_excludedSubIDs": {
"type": "Array",
"metadata": {
"displayName": "Event Grid Topic excluded subscription IDs",
"description": "List of subscription IDs excluded from the Event Grid Topic external private endpoint restriction"
},
"defaultValue": []
}
},
"policyDefinitions": [
{
"policyDefinitionReferenceId": "restrictExternalPeEgdom",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/3c2b2a2f-630f-44c5-bea3-b8f094412ea3",
"definitionVersion": "1.*.*",
"parameters": {
"excludedSubIDs": {
"value": "[parameters('restrictExternalPeEgdom_excludedSubIDs')]"
}
}
},
{
"policyDefinitionReferenceId": "restrictExternalPeEgtop",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/648d76a0-e52b-474b-a6a5-930a82afda30",
"definitionVersion": "1.*.*",
"parameters": {
"excludedSubIDs": {
"value": "[parameters('restrictExternalPeEgtop_excludedSubIDs')]"
}
}
},
{
"policyDefinitionReferenceId": "egdomDisableLocalAuth",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/8bfadddb-ee1c-4639-8911-a38cb8e0b3bd",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionReferenceId": "egpartnernsDisableLocalAuth",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/8632b003-3545-4b29-85e6-b2b96773df1e",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionReferenceId": "egtopicDisableLocalAuth",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ae9fb87f-8a17-4428-94a4-8135d431055c",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionReferenceId": "egdomDisablePublicNetworkAccess",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f8f774be-6aee-492a-9e29-486ef81f3a68",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionReferenceId": "egtopDisablePublicNetworkAccess",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1adadefe-5f21-44f7-b931-a59b54ccdb45",
"definitionVersion": "1.*.*"
}
],
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/24665578-506e-4c90-bb62-702323fdea76",
"name": "24665578-506e-4c90-bb62-702323fdea76"
}Bylaw24665578-506e-4c90-bb62-702323fdea76.bylaw.ps1 · 60 lines
# Converted from EventGridInitiative.json by ConvertTo-Bylaw.
Initiative '24665578-506e-4c90-bb62-702323fdea76' {
Properties @{
DisplayName = 'Control the use of Event Grid in Mission Platforms'
Description = 'This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. These guardrails reduce unintended network exposure and local-authentication risks for Azure Event Grid resources. Learn more at https://aka.ms/privateendpoints.'
Version = '1.0.0'
Category = 'Mission'
PolicyVersion = '1.0.0'
}
Parameter RestrictExternalPeEgdom_excludedSubIDs @{
Type = 'Array'
Default = @()
DisplayName = 'Event Grid Domain excluded subscription IDs'
Description = 'List of subscription IDs excluded from the Event Grid Domain external private endpoint restriction'
}
Parameter RestrictExternalPeEgtop_excludedSubIDs @{
Type = 'Array'
Default = @()
DisplayName = 'Event Grid Topic excluded subscription IDs'
Description = 'List of subscription IDs excluded from the Event Grid Topic external private endpoint restriction'
}
PolicyDefinition @{
Id = '3c2b2a2f-630f-44c5-bea3-b8f094412ea3'
ReferenceId = 'restrictExternalPeEgdom'
Version = '1.*.*'
Parameters = @{
excludedSubIDs = (Param RestrictExternalPeEgdom_excludedSubIDs)
}
}
PolicyDefinition @{
Id = '648d76a0-e52b-474b-a6a5-930a82afda30'
ReferenceId = 'restrictExternalPeEgtop'
Version = '1.*.*'
Parameters = @{
excludedSubIDs = (Param RestrictExternalPeEgtop_excludedSubIDs)
}
}
PolicyDefinition -Id '8bfadddb-ee1c-4639-8911-a38cb8e0b3bd' -ReferenceId 'egdomDisableLocalAuth' -Version '1.*.*'
PolicyDefinition -Id '8632b003-3545-4b29-85e6-b2b96773df1e' -ReferenceId 'egpartnernsDisableLocalAuth' -Version '1.*.*'
PolicyDefinition -Id 'ae9fb87f-8a17-4428-94a4-8135d431055c' -ReferenceId 'egtopicDisableLocalAuth' -Version '1.*.*'
PolicyDefinition @{
Id = 'f8f774be-6aee-492a-9e29-486ef81f3a68'
ReferenceId = 'egdomDisablePublicNetworkAccess'
Version = '1.*.*'
}
PolicyDefinition @{
Id = '1adadefe-5f21-44f7-b931-a59b54ccdb45'
ReferenceId = 'egtopDisablePublicNetworkAccess'
Version = '1.*.*'
}
}Members (7)
- Event Grid Domain should restrict external private endpoints
- Event Grid Topic should restrict external private endpoints
- Azure Event Grid domains should have local authentication methods disabled
- Azure Event Grid partner namespaces should have local authentication methods disabled
- Azure Event Grid topics should have local authentication methods disabled
- Azure Event Grid domains should disable public network access
- Azure Event Grid topics should disable public network access
Source: built-in-policies/policySetDefinitions/Mission/EventGridInitiative.json in Azure/azure-policy, under the MIT licence.
Bylaw