Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Policy development updates Dec 2021 #22

Merged
merged 1 commit into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bicep/modules/initiatives/mg_data_protection.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ resource data_protection_initiative 'Microsoft.Authorization/policySetDefinition
}
{
policyDefinitionId: builtinPolicies2.AuditVirtualMachinesWithoutDisasterRecoveryConfigured
policyDefinitionReferenceId: 'Compute_AuditVirtualMachinesWithoutDisasterRecoveryConfigured'
policyDefinitionReferenceId: 'AuditVirtualMachinesWithoutDisasterRecoveryConfigured'
}
]
}
Expand Down
7 changes: 1 addition & 6 deletions Bicep/modules/initiatives/sub_data_protection.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,7 @@ resource data_protection_initiative 'Microsoft.Authorization/policySetDefinition
}
{
policyDefinitionId: builtinPolicies2.AuditVirtualMachinesWithoutDisasterRecoveryConfigured
policyDefinitionReferenceId: 'Compute_AuditVirtualMachinesWithoutDisasterRecoveryConfigured'
parameters: {
effect: {
value: '[parameters(\'effect\')]'
}
}
policyDefinitionReferenceId: 'AuditVirtualMachinesWithoutDisasterRecoveryConfigured'
}
]
}
Expand Down
110 changes: 18 additions & 92 deletions Bicep/modules/mg_main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "5362082578999936764"
"templateHash": "7061226618769398454"
}
},
"parameters": {
Expand Down Expand Up @@ -492,7 +492,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "11703135732979206801"
"templateHash": "3365208818394019522"
}
},
"parameters": {
Expand Down Expand Up @@ -544,7 +544,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "285290408301758528"
"templateHash": "7128745795499507190"
}
},
"parameters": {
Expand Down Expand Up @@ -572,7 +572,7 @@
"properties": {
"policyType": "Custom",
"displayName": "Tagging Governance Initiative - MG Scope",
"description": "[format('Tagging Governance Initiative MG Scope via {0}', parameters('policySource'))]",
"description": "[format('Tagging Governance Initiative - MG Scope via {0}', parameters('policySource'))]",
"metadata": {
"category": "[parameters('policyCategory')]",
"source": "[parameters('policySource')]",
Expand Down Expand Up @@ -804,7 +804,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "12792410055961027900"
"templateHash": "10157773319254455088"
}
},
"parameters": {
Expand Down Expand Up @@ -836,7 +836,7 @@
"properties": {
"policyType": "Custom",
"displayName": "IAM Governance Initiative - MG Scope",
"description": "[format('Identity & Access Management Governance Initiative MG Scope via {0}', parameters('policySource'))]",
"description": "[format('Identity & Access Management Governance Initiative - MG Scope via {0}', parameters('policySource'))]",
"metadata": {
"category": "[parameters('policyCategory')]",
"source": "[parameters('policySource')]",
Expand Down Expand Up @@ -1351,7 +1351,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "4025402885616590425"
"templateHash": "780618848636069472"
}
},
"parameters": {
Expand Down Expand Up @@ -1382,7 +1382,7 @@
"properties": {
"policyType": "Custom",
"displayName": "KeyVault Governance Initiative - MG Scope",
"description": "[format('KeyVault Governance Initiative MG Scope via {0}', parameters('policySource'))]",
"description": "[format('KeyVault Governance Initiative - MG Scope via {0}', parameters('policySource'))]",
"metadata": {
"category": "[parameters('policyCategory')]",
"source": "[parameters('policySource')]",
Expand Down Expand Up @@ -1477,19 +1477,6 @@
4096
],
"defaultValue": 2048
},
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyDefinitions": [
Expand All @@ -1504,31 +1491,18 @@
},
{
"policyDefinitionId": "[variables('builtinPolicies1').KeyVaultsShouldHavePurgeProtectionEnabled]",
"policyDefinitionReferenceId": "KeyVaultsShouldHavePurgeProtectionEnabled",
"parameters": {
"effect": {
"value": "[[parameters('effect')]"
}
}
"policyDefinitionReferenceId": "KeyVaultsShouldHavePurgeProtectionEnabled"
},
{
"policyDefinitionId": "[variables('builtinPolicies1').KeyVaultsShouldHaveSoftDeleteEnabled]",
"policyDefinitionReferenceId": "KeyVaultsShouldHaveSoftDeleteEnabled",
"parameters": {
"effect": {
"value": "[[parameters('effect')]"
}
}
"policyDefinitionReferenceId": "KeyVaultsShouldHaveSoftDeleteEnabled"
},
{
"policyDefinitionId": "[variables('builtinPolicies1').CertificatesShouldBeIssuedByTheSpecifiedIntegratedCertificateAuthority]",
"policyDefinitionReferenceId": "CertificatesShouldBeIssuedByTheSpecifiedIntegratedCertificateAuthority",
"parameters": {
"allowedCAs": {
"value": "[[parameters('allowedCAs')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1538,9 +1512,6 @@
"parameters": {
"allowedKeyTypes": {
"value": "[[parameters('allowedKeyTypesCertificates')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1550,9 +1521,6 @@
"parameters": {
"minimumRSAKeySize": {
"value": "[[parameters('minimumRSAKeySize')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1562,30 +1530,19 @@
"parameters": {
"allowedKeyTypes": {
"value": "[[parameters('allowedKeyTypes')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
{
"policyDefinitionId": "[variables('builtinPolicies1').KeyVaultKeysShouldHaveAnExpirationDate]",
"policyDefinitionReferenceId": "KeyVaultKeysShouldHaveAnExpirationDate",
"parameters": {
"effect": {
"value": "[[parameters('effect')]"
}
}
"policyDefinitionReferenceId": "KeyVaultKeysShouldHaveAnExpirationDate"
},
{
"policyDefinitionId": "[variables('builtinPolicies1').KeysShouldHaveMoreThanTheSpecifiedNumberOfDaysBeforeExpiration]",
"policyDefinitionReferenceId": "KeysShouldHaveMoreThanTheSpecifiedNumberOfDaysBeforeExpiration",
"parameters": {
"minimumDaysBeforeExpiration": {
"value": "[[parameters('minimumDaysBeforeExpiration')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1595,9 +1552,6 @@
"parameters": {
"maximumValidityInDays": {
"value": "[[parameters('maximumValidityInDays')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1607,9 +1561,6 @@
"parameters": {
"maximumValidityInDays": {
"value": "[[parameters('maximumValidityInDays')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1619,39 +1570,23 @@
"parameters": {
"minimumRSAKeySize": {
"value": "[[parameters('minimumRSAKeySize')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
{
"policyDefinitionId": "[variables('builtinPolicies1').SecretsShouldHaveContentTypeSet]",
"policyDefinitionReferenceId": "SecretsShouldHaveContentTypeSet",
"parameters": {
"effect": {
"value": "[[parameters('effect')]"
}
}
"policyDefinitionReferenceId": "SecretsShouldHaveContentTypeSet"
},
{
"policyDefinitionId": "[variables('builtinPolicies1').KeyVaultSecretsShouldHaveAnExpirationDate]",
"policyDefinitionReferenceId": "KeyVaultSecretsShouldHaveAnExpirationDate",
"parameters": {
"effect": {
"value": "[[parameters('effect')]"
}
}
"policyDefinitionReferenceId": "KeyVaultSecretsShouldHaveAnExpirationDate"
},
{
"policyDefinitionId": "[variables('builtinPolicies1').SecretsShouldHaveMoreThanTheSpecifiedNumberOfDaysBeforeExpiration]",
"policyDefinitionReferenceId": "SecretsShouldHaveMoreThanTheSpecifiedNumberOfDaysBeforeExpiration",
"parameters": {
"minimumDaysBeforeExpiration": {
"value": "[[parameters('minimumDaysBeforeExpiration')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1661,9 +1596,6 @@
"parameters": {
"maximumValidityInDays": {
"value": "[[parameters('maximumValidityInDays')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
},
Expand All @@ -1673,9 +1605,6 @@
"parameters": {
"maximumValidityInDays": {
"value": "[[parameters('maximumValidityInDays')]"
},
"effect": {
"value": "[[parameters('effect')]"
}
}
}
Expand Down Expand Up @@ -1717,7 +1646,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "7680065884635525777"
"templateHash": "12828685647059043002"
}
},
"parameters": {
Expand All @@ -1742,8 +1671,8 @@
"name": "data_protection_initiative",
"properties": {
"policyType": "Custom",
"displayName": "Data Protection Governance Initiative",
"description": "[format('Data Protection Governance Initiative via {0}', parameters('policySource'))]",
"displayName": "Data Protection Governance Initiative - MG Scope",
"description": "[format('Data Protection Governance Initiative - MG Scope via {0}', parameters('policySource'))]",
"metadata": {
"category": "[parameters('policyCategory')]",
"source": "[parameters('policySource')]",
Expand Down Expand Up @@ -1840,7 +1769,7 @@
},
{
"policyDefinitionId": "[variables('builtinPolicies2').AuditVirtualMachinesWithoutDisasterRecoveryConfigured]",
"policyDefinitionReferenceId": "Compute_AuditVirtualMachinesWithoutDisasterRecoveryConfigured"
"policyDefinitionReferenceId": "AuditVirtualMachinesWithoutDisasterRecoveryConfigured"
}
]
}
Expand Down Expand Up @@ -1926,7 +1855,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.1008.15138",
"templateHash": "18122507162919410059"
"templateHash": "3812708395648602123"
}
},
"parameters": {
Expand Down Expand Up @@ -2087,9 +2016,6 @@
"parameters": {
"logAnalytics": {
"value": "[parameters('logAnalytics')]"
},
"effect": {
"value": "Audit"
}
}
}
Expand Down
Loading