Skip to content

Commit cd82d2a

Browse files
author
niralishah-crest
committed
Updated azuredeploy template to prevent public access and cross tenant replicaion in storage account
1 parent 9b540e2 commit cd82d2a

File tree

1 file changed

+53
-9
lines changed

1 file changed

+53
-9
lines changed

Solutions/RubrikSecurityCloud/Data Connectors/RubrikWebhookEvents/azuredeploy_Connector_RubrikWebhookEvents_AzureFunction.json

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
2+
"$schema": "http://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"FunctionName": {
@@ -8,15 +8,15 @@
88
"maxLength": 11,
99
"type": "string"
1010
},
11-
"Anomalies_table_name":{
11+
"Anomalies_table_name": {
1212
"type": "string",
1313
"defaultValue": "Rubrik_Anomaly_Data_CL"
1414
},
1515
"RansomwareAnalysis_table_name": {
1616
"type": "string",
1717
"defaultValue": "Rubrik_Ransomware_Data_CL"
1818
},
19-
"ThreatHunts_table_name":{
19+
"ThreatHunts_table_name": {
2020
"type": "string",
2121
"defaultValue": "Rubrik_ThreatHunt_Data_CL"
2222
},
@@ -37,10 +37,10 @@
3737
"LogLevel": {
3838
"type": "string",
3939
"allowedValues": [
40-
"Debug",
41-
"Info",
42-
"Error",
43-
"Warning"
40+
"Debug",
41+
"Info",
42+
"Error",
43+
"Warning"
4444
],
4545
"defaultValue": "Info",
4646
"metadata": {
@@ -56,8 +56,10 @@
5656
},
5757
"variables": {
5858
"FunctionName": "[concat(toLower(parameters('FunctionName')), uniqueString(resourceGroup().id))]",
59-
"StorageSuffix": "[environment().suffixes.storage]",
60-
"LogAnaltyicsUri": "[replace(environment().portal, 'https://portal', concat('https://', toLower(parameters('WorkspaceID')), '.ods.opinsights'))]"
59+
"StorageSuffix": "[environment().suffixes.storage]",
60+
"LogAnaltyicsUri": "[replace(environment().portal, 'https://portal', concat('https://', toLower(parameters('WorkspaceID')), '.ods.opinsights'))]",
61+
"policyDefinitionId1": "92a89a79-6c52-4a7e-a03f-61306fc49312",
62+
"policyDefinitionId2": "4fa4b6c0-31ca-4c0d-b10d-24b96f62a751"
6163
},
6264
"resources": [
6365
{
@@ -90,6 +92,8 @@
9092
"defaultAction": "Allow"
9193
},
9294
"supportsHttpsTrafficOnly": true,
95+
"allowBlobPublicAccess": false,
96+
"allowCrossTenantReplication": false,
9397
"encryption": {
9498
"services": {
9599
"file": {
@@ -105,6 +109,46 @@
105109
}
106110
}
107111
},
112+
{
113+
"type": "Microsoft.Authorization/policyAssignments",
114+
"apiVersion": "2023-04-01",
115+
"name": "Prevent cross tenant object replication storage accounts",
116+
"dependsOn": [
117+
"[resourceId('Microsoft.Storage/storageAccounts', tolower(variables('FunctionName')))]"
118+
],
119+
"scope": "[concat('Microsoft.Storage/storageAccounts', '/', tolower(variables('FunctionName')))]",
120+
"properties": {
121+
"policyDefinitionId": "[concat('/providers/Microsoft.Authorization/policyDefinitions/', variables('policyDefinitionId1'))]",
122+
"description": "Storage accounts should prevent cross tenant object replication",
123+
"displayName": "Storage accounts should prevent cross tenant object replication",
124+
"enforcementMode": "Default",
125+
"parameters": {
126+
"effect": {
127+
"value": "Deny"
128+
}
129+
}
130+
}
131+
},
132+
{
133+
"type": "Microsoft.Authorization/policyAssignments",
134+
"apiVersion": "2023-04-01",
135+
"name": "Prevent anonymous public read access to Azure Storage account",
136+
"dependsOn": [
137+
"[resourceId('Microsoft.Storage/storageAccounts', tolower(variables('FunctionName')))]"
138+
],
139+
"scope": "[concat('Microsoft.Storage/storageAccounts', '/', tolower(variables('FunctionName')))]",
140+
"properties": {
141+
"policyDefinitionId": "[concat('/providers/Microsoft.Authorization/policyDefinitions/', variables('policyDefinitionId2'))]",
142+
"description": "Prevent anonymous public read access to containers and blobs in Azure Storage accounts",
143+
"displayName": "Prevent anonymous public read access to containers and blobs in Azure Storage accounts",
144+
"enforcementMode": "Default",
145+
"parameters": {
146+
"effect": {
147+
"value": "Deny"
148+
}
149+
}
150+
}
151+
},
108152
{
109153
"type": "Microsoft.Storage/storageAccounts/blobServices",
110154
"apiVersion": "2019-06-01",

0 commit comments

Comments
 (0)