|
1 | 1 | { |
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#", |
3 | 3 | "contentVersion": "1.0.0.0", |
4 | 4 | "parameters": { |
5 | 5 | "FunctionName": { |
|
8 | 8 | "maxLength": 11, |
9 | 9 | "type": "string" |
10 | 10 | }, |
11 | | - "Anomalies_table_name":{ |
| 11 | + "Anomalies_table_name": { |
12 | 12 | "type": "string", |
13 | 13 | "defaultValue": "Rubrik_Anomaly_Data_CL" |
14 | 14 | }, |
15 | 15 | "RansomwareAnalysis_table_name": { |
16 | 16 | "type": "string", |
17 | 17 | "defaultValue": "Rubrik_Ransomware_Data_CL" |
18 | 18 | }, |
19 | | - "ThreatHunts_table_name":{ |
| 19 | + "ThreatHunts_table_name": { |
20 | 20 | "type": "string", |
21 | 21 | "defaultValue": "Rubrik_ThreatHunt_Data_CL" |
22 | 22 | }, |
|
37 | 37 | "LogLevel": { |
38 | 38 | "type": "string", |
39 | 39 | "allowedValues": [ |
40 | | - "Debug", |
41 | | - "Info", |
42 | | - "Error", |
43 | | - "Warning" |
| 40 | + "Debug", |
| 41 | + "Info", |
| 42 | + "Error", |
| 43 | + "Warning" |
44 | 44 | ], |
45 | 45 | "defaultValue": "Info", |
46 | 46 | "metadata": { |
|
56 | 56 | }, |
57 | 57 | "variables": { |
58 | 58 | "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" |
61 | 63 | }, |
62 | 64 | "resources": [ |
63 | 65 | { |
|
90 | 92 | "defaultAction": "Allow" |
91 | 93 | }, |
92 | 94 | "supportsHttpsTrafficOnly": true, |
| 95 | + "allowBlobPublicAccess": false, |
| 96 | + "allowCrossTenantReplication": false, |
93 | 97 | "encryption": { |
94 | 98 | "services": { |
95 | 99 | "file": { |
|
105 | 109 | } |
106 | 110 | } |
107 | 111 | }, |
| 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 | + }, |
108 | 152 | { |
109 | 153 | "type": "Microsoft.Storage/storageAccounts/blobServices", |
110 | 154 | "apiVersion": "2019-06-01", |
|
0 commit comments