Gallery › VirtualEnclaves › Azure built-in policies
[Preview]: Control the use of Container Registry in a Virtual Enclave
Converted Initiative Version 1.0.0-preview Preview
This initiative deploys Azure policies for Container Registry 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 JSONContainerRegistryInitiative.json · 60 lines
{
"properties": {
"displayName": "[Preview]: Control the use of Container Registry in a Virtual Enclave",
"policyType": "BuiltIn",
"description": "This initiative deploys Azure policies for Container Registry 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/a3701552-92ea-433e-9d17-33b7f1208fc9",
"policyDefinitionReferenceId": "ContainerRegistryDisablePublicNetworkAccess",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/d0793b48-0edc-4296-a390-4c75d1bdfd71",
"policyDefinitionReferenceId": "ContainerRegistryShouldNotAllowUnrestrictedNetworkAccess",
"definitionVersion": "2.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9f2dea28-e834-476c-99c5-3507b4728395",
"policyDefinitionReferenceId": "ContainerRegistryAnonymousAuthenticationDisabled",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/cced2946-b08a-44fe-9fd9-e4ed8a779897",
"policyDefinitionReferenceId": "ContainerRegistryConfiguredAnonymousAuthenticationDisabled",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bd560fc0-3c69-498a-ae9f-aa8eb7de0e13",
"policyDefinitionReferenceId": "ContainerRegistryShouldHaveSkuSupportForPrivateLinks",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e8eef0a8-67cf-4eb4-9386-14b0e78733d4",
"policyDefinitionReferenceId": "ContainerRegistryShouldHavePrivateLink",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0fdf0491-d080-4575-b627-ad0e843cba0f",
"policyDefinitionReferenceId": "ContainerRegistryShouldHavePublicNetworkAccessDisabled",
"definitionVersion": "1.*.*"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5b9159ae-1701-4a6f-9a7a-aa9c8ddd0580",
"policyDefinitionReferenceId": "ContainerRegistryShouldUseCmkForEncryption",
"definitionVersion": "1.*.*"
}
],
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/b3fe25eb-cdc6-475f-96a5-04ac270f630d",
"name": "b3fe25eb-cdc6-475f-96a5-04ac270f630d"
}Bylawb3fe25eb-cdc6-475f-96a5-04ac270f630d.bylaw.ps1 · 60 lines
# Converted from ContainerRegistryInitiative.json by ConvertTo-Bylaw.
Initiative 'b3fe25eb-cdc6-475f-96a5-04ac270f630d' {
Properties @{
DisplayName = '[Preview]: Control the use of Container Registry in a Virtual Enclave'
Description = 'This initiative deploys Azure policies for Container Registry 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 = 'a3701552-92ea-433e-9d17-33b7f1208fc9'
ReferenceId = 'ContainerRegistryDisablePublicNetworkAccess'
Version = '1.*.*'
}
PolicyDefinition @{
Id = 'd0793b48-0edc-4296-a390-4c75d1bdfd71'
ReferenceId = 'ContainerRegistryShouldNotAllowUnrestrictedNetworkAccess'
Version = '2.*.*'
}
PolicyDefinition @{
Id = '9f2dea28-e834-476c-99c5-3507b4728395'
ReferenceId = 'ContainerRegistryAnonymousAuthenticationDisabled'
Version = '1.*.*'
}
PolicyDefinition @{
Id = 'cced2946-b08a-44fe-9fd9-e4ed8a779897'
ReferenceId = 'ContainerRegistryConfiguredAnonymousAuthenticationDisabled'
Version = '1.*.*'
}
PolicyDefinition @{
Id = 'bd560fc0-3c69-498a-ae9f-aa8eb7de0e13'
ReferenceId = 'ContainerRegistryShouldHaveSkuSupportForPrivateLinks'
Version = '1.*.*'
}
PolicyDefinition @{
Id = 'e8eef0a8-67cf-4eb4-9386-14b0e78733d4'
ReferenceId = 'ContainerRegistryShouldHavePrivateLink'
Version = '1.*.*'
}
PolicyDefinition @{
Id = '0fdf0491-d080-4575-b627-ad0e843cba0f'
ReferenceId = 'ContainerRegistryShouldHavePublicNetworkAccessDisabled'
Version = '1.*.*'
}
PolicyDefinition @{
Id = '5b9159ae-1701-4a6f-9a7a-aa9c8ddd0580'
ReferenceId = 'ContainerRegistryShouldUseCmkForEncryption'
Version = '1.*.*'
}
}Members (8)
- Configure Container registries to disable public network access
- Container registries should not allow unrestricted network access
- Container registries should have anonymous authentication disabled.
- Configure container registries to disable anonymous authentication.
- Container registries should have SKUs that support Private Links
- Container registries should use private link
- Public network access should be disabled for Container registries
- Container registries should be encrypted with a customer-managed key
Source: built-in-policies/policySetDefinitions/VirtualEnclaves/ContainerRegistryInitiative.json in Azure/azure-policy, under the MIT licence.
Bylaw