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

Built-in Policy Release 2d6b82a4 #1213

Merged
merged 1 commit into from
Sep 18, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"mode": "Indexed",
"description": "Microsoft Defender for Containers provides cloud-native Kubernetes security capabilities including environment hardening, workload protection, and run-time protection. When you enable the SecurityProfile.Defender on your Azure Kubernetes Service cluster, an agent is deployed to your cluster to collect security event data. Learn more about Microsoft Defender for Containers: https://docs.microsoft.com/azure/defender-for-cloud/defender-for-containers-introduction?tabs=defender-for-container-arch-aks.",
"metadata": {
"version": "4.0.4",
"version": "4.1.0",
"category": "Kubernetes"
},
"version": "4.0.4",
"version": "4.1.0",
"parameters": {
"effect": {
"type": "String",
Expand Down Expand Up @@ -90,56 +90,14 @@
},
"variables": {
"locationLongNameToShortMap": {
"australiacentral": "CAU",
"australiacentral2": "CBR2",
"australiaeast": "EAU",
"australiasoutheast": "SEAU",
"brazilsouth": "CQ",
"brazilsoutheast": "BRSE",
"canadacentral": "CCA",
"canadaeast": "YQ",
"centralindia": "CIN",
"centralus": "CUS",
"eastasia": "EA",
"eastus": "EUS",
"eastus2": "EUS2",
"eastus2euap": "eus2p",
"germanywestcentral": "DEWC",
"francecentral": "PAR",
"francesouth": "MRS",
"japaneast": "EJP",
"japanwest": "OS",
"jioindiacentral": "JINC",
"jioindiawest": "JINW",
"koreacentral": "SE",
"koreasouth": "PS",
"northcentralus": "NCUS",
"northeurope": "NEU",
"norwayeast": "NOE",
"norwaywest": "NOW",
"southafricanorth": "JNB",
"southcentralus": "SCUS",
"southeastasia": "SEA",
"southindia": "MA",
"swedencentral": "SEC",
"switzerlandnorth": "CHN",
"switzerlandwest": "CHW",
"uaecentral": "AUH",
"uaenorth": "DXB",
"uksouth": "SUK",
"ukwest": "WUK",
"westcentralus": "WCUS",
"westeurope": "WEU",
"westus": "WUS",
"westus2": "WUS2",
"westus3": "USW3",
"usgovvirginia": "USGV",
"usgovarizona": "USGA",
"chinaeast3": "NE3",
"chinanorth3": "NN3",
"chinaeast2": "E2"
"usgovarizona": "USGA"
},
"locationCode": "[variables('locationLongNameToShortMap')[parameters('clusterRegion')]]",
"alternativeLocation": {
"usgovtexas": "usgovarizona"
},
"actualLogAResourceLocation": "[if(contains(variables('locationLongNameToShortMap'), parameters('clusterRegion')), parameters('clusterRegion'), variables('alternativeLocation')[parameters('clusterRegion')])]",
"locationCode": "[variables('locationLongNameToShortMap')[variables('actualLogAResourceLocation')]]",
"subscriptionId": "[subscription().subscriptionId]",
"shouldProvisionDefaultWorkspace": "[empty(parameters('logAnalyticsWorkspaceResourceId'))]",
"defaultRGName": "[concat('DefaultResourceGroup-', variables('locationCode'))]",
Expand All @@ -152,7 +110,7 @@
"type": "Microsoft.Resources/resourceGroups",
"name": "[variables('defaultRGName')]",
"apiVersion": "2019-05-01",
"location": "[parameters('clusterRegion')]"
"location": "[variables('actualLogAResourceLocation')]"
},
{
"condition": "[variables('shouldProvisionDefaultWorkspace')]",
Expand All @@ -166,8 +124,8 @@
"scope": "inner"
},
"parameters": {
"clusterRegion": {
"value": "[parameters('clusterRegion')]"
"resourceLocation": {
"value": "[variables('actualLogAResourceLocation')]"
},
"workspaceName": {
"value": "[variables('workspaceName')]"
Expand All @@ -177,7 +135,7 @@
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterRegion": {
"resourceLocation": {
"type": "string"
},
"workspaceName": {
Expand All @@ -190,7 +148,7 @@
"type": "Microsoft.OperationalInsights/workspaces",
"name": "[parameters('workspaceName')]",
"apiVersion": "2021-06-01",
"location": "[parameters('clusterRegion')]",
"location": "[parameters('resourceLocation')]",
"properties": {
"sku": {
"name": "pernode"
Expand Down Expand Up @@ -230,7 +188,7 @@
"value": "[parameters('clusterRegion')]"
},
"aksClusterContent": {
"value": "[reference(parameters('clusterResourceId'), '2022-06-01', 'Full')]"
"value": "[reference(parameters('clusterResourceId'), '2023-05-01', 'Full')]"
}
},
"template": {
Expand All @@ -254,7 +212,7 @@
{
"type": "Microsoft.ContainerService/ManagedClusters",
"name": "[parameters('clusterName')]",
"apiVersion": "2022-06-01",
"apiVersion": "2023-05-01",
"location": "[parameters('clusterRegion')]",
"properties": {
"securityProfile": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"properties": {
"displayName": "[Preview]: Configure Windows Arc machines to create the default Microsoft Defender for SQL pipeline using Azure Monitor Agent",
"displayName": "[Preview]: Configure Arc-enabled SQL Servers to automatically install Microsoft Defender for SQL and DCR with a Log Analytics workspace",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Configure Windows Arc machines to create the default Microsoft Defender for SQL pipeline using Azure Monitor Agent. Microsoft Defender for SQL collects events from the agent and uses them to provide security alerts and tailored hardening tasks (recommendations). Create a resource group, a Data Collection Rule and Log Analytics workspace in the same region as the machine to store audit records.",
"version": "1.0.0-preview",
"description": "Microsoft Defender for SQL collects events from the agent and uses them to provide security alerts and tailored hardening tasks (recommendations). Create a resource group, a Data Collection Rule and Log Analytics workspace in the same region as the machine.",
"version": "1.0.1-preview",
"metadata": {
"category": "Security Center",
"version": "1.0.0-preview",
"version": "1.0.1-preview",
"preview": true
},
"parameters": {
Expand Down Expand Up @@ -316,7 +316,7 @@
"name": "[parameters('dcraName')]",
"apiVersion": "2021-04-01",
"properties": {
"description": "Association of data collection rule for Microsoft Defender for SQL. Deleting this association will break the detection of security vulnerabilities for this Arc machine.",
"description": "Configure association between Arc-enabled SQL Server and the Microsoft Defender for SQL DCR. Deleting this association will break the detection of security vulnerabilities for this Arc-enabled SQL Server.",
"dataCollectionRuleId": "[parameters('dcrId')]"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"properties": {
"displayName": "[Preview]: Configure Windows SQL virtual machines to create the default Microsoft Defender for SQL pipeline using Azure Monitor Agent",
"displayName": "[Preview]: Configure SQL Virtual Machines to automatically install Microsoft Defender for SQL and DCR with a Log Analytics workspace",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Configure Windows SQL virtual machines to create the default Microsoft Defender for SQL pipeline using Azure Monitor Agent. Microsoft Defender for SQL collects events from the agent and uses them to provide security alerts and tailored hardening tasks (recommendations). Create a resource group, a Data Collection Rule and Log Analytics workspace in the same region as the machine to store audit records.",
"version": "1.0.0-preview",
"description": "Microsoft Defender for SQL collects events from the agent and uses them to provide security alerts and tailored hardening tasks (recommendations). Create a resource group, a Data Collection Rule and Log Analytics workspace in the same region as the machine.",
"version": "1.1.0-preview",
"metadata": {
"version": "1.0.0-preview",
"version": "1.1.0-preview",
"category": "Security Center",
"preview": true
},
Expand Down Expand Up @@ -119,7 +119,8 @@
"dcrId": "[concat('/subscriptions/', variables('subscriptionId'), '/resourceGroups/', variables('defaultRGName'), '/providers/Microsoft.Insights/dataCollectionRules/', variables('dcrName'))]",
"dcraName": "[concat(parameters('vmName'),'/Microsoft.Insights/MicrosoftDefenderForSQL-RulesAssociation')]",
"deployDataCollectionRules": "[concat('deployDataCollectionRules-', uniqueString(deployment().name))]",
"deployDataCollectionRulesAssociation": "[concat('deployDataCollectionRulesAssociation-', uniqueString(deployment().name))]"
"deployDataCollectionRulesAssociation": "[concat('deployDataCollectionRulesAssociation-', uniqueString(deployment().name))]",
"deployDefenderForSQL": "[concat('deployDefenderForSQL-', uniqueString(deployment().name))]"
},
"resources": [
{
Expand All @@ -128,6 +129,54 @@
"apiVersion": "2022-09-01",
"location": "[variables('defaultRGLocation')]"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[variables('deployDefenderForSQL')]",
"apiVersion": "2022-09-01",
"resourceGroup": "[parameters('resourceGroup')]",
"properties": {
"mode": "Incremental",
"expressionEvaluationOptions": {
"scope": "inner"
},
"parameters": {
"location": {
"value": "[parameters('location')]"
},
"vmName": {
"value": "[parameters('vmName')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"vmName": {
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'), '/', 'MicrosoftDefenderForSQL')]",
"apiVersion": "2023-03-01",
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.Azure.AzureDefenderForSQL",
"type": "AdvancedThreatProtection.Windows",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true
}
}
]
}
}
},
{
"type": "Microsoft.Resources/deployments",
"name": "[variables('deployDataCollectionRules')]",
Expand Down Expand Up @@ -304,7 +353,7 @@
"name": "[parameters('dcraName')]",
"apiVersion": "2021-04-01",
"properties": {
"description": "Association of data collection rule for Microsoft Defender for SQL. Deleting this association will break the detection of security vulnerabilities for this virtual machine.",
"description": "Configure association between SQL Virtual Machine and the Microsoft Defender for SQL DCR. Deleting this association will break the detection of security vulnerabilities for this SQL Virtual Machine.",
"dataCollectionRuleId": "[parameters('dcrId')]"
}
}
Expand Down
Loading