Framework/Configurations/SVT/Services/Batch.json

{
    "FeatureName": "Batch",
    "Reference": "aka.ms/azsdkosstcp",
    "IsManintenanceMode": false,
    "controls": [
        {
            "ControlID": "Azure_Batch_AuthZ_Grant_Min_RBAC_Access",
            "Description": "All users/identities must be granted minimum required permissions using Role Based Access Control (RBAC)",
            "Id": "Batch110",
            "ControlSeverity": "Medium",
            "Automated": "Yes",
            "MethodName": "CheckRBACAccess",
            "Recommendation": "Remove any excessive privileges granted on the Batch service. Run command Remove-AzureRmRoleAssignment -SignInName '{signInName}' -Scope '{scope}' -RoleDefinitionName '{role definition name}'. Run 'Get-Help Remove-AzureRmRoleAssignment -full' for more help. Refer: https://docs.microsoft.com/en-us/azure/active-directory/role-based-access-control-manage-access-powershell",
            "Tags": [
                        "SDL",
                        "TCP",
                        "Automated",
                        "AuthZ",
                        "RBAC"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_DP_Encrypt_Linked_Storage",
            "Description": "Storage Account, linked with Batch account, must be protected using Storage Service Encryption (SSE)",
            "Id": "Batch120",
                               "ControlSeverity": "High",
            "Automated": "Yes",
            "MethodName": "CheckBatchStorageSSE",
            "Recommendation": "Enable Storage Service Encryption for the storage account linked to the Batch account, Run command Set-AzureRmStorageAccount -ResourceGroupName '{ResourceGroupName}' -Name '{StorageName}' -EnableEncryptionService 'Blob' ",
            "Tags": [
                "SDL",
                "TCP",
                "Automated",
                "DP"
            ],
            "Enabled": true
      },
      {
            "ControlID": "Azure_Batch_DP_Protect_Secrets_On_Compute_Nodes",
            "Description": "Secrets must be protected on Batch account compute nodes",
            "Id": "Batch130",
                               "ControlSeverity": "High",
            "Automated": "No",
            "MethodName": "",
            "Recommendation": "Certificates need to be installed on the compute nodes used by Batch in order to protect sensitive information. Run command New-AzureBatchCertificate -FilePath '{FilePath}' -BatchContext '{BatchContext}' -Password '{Password}'. Please refer https://docs.microsoft.com/en-us/powershell/module/azurerm.batch/New-AzureBatchCertificate?view=azurermps-3.8.0",
            "Tags": [
                        "SDL",
                        "TCP",
                        "Manual",
                        "DP"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_DP_Rotate_Access_Keys",
            "Description": "Batch account access keys must be rotated periodically",
            "Id": "Batch140",
            "ControlSeverity": "Medium",
            "Automated": "No",
            "MethodName": "",
            "Recommendation": "Rotate Batch account access keys at regular intervals as per business requirement. Run command New-AzureRmBatchAccountKey -AccountName '{AccountName}' -KeyType '{KeyType}' -ResourceGroupName '{ResourceGroupName}' Refer: https://docs.microsoft.com/en-us/powershell/module/azurerm.batch/new-azurermbatchaccountkey?view=azurermps-3.7.0",
            "Tags": [
                        "SDL",
                        "TCP",
                        "Manual",
                        "DP"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_NetSec_Disable_RDP_Connection",
            "Description": "Remote desktop connection should be disabled on Batch account compute nodes",
            "Id": "Batch150",
                               "ControlSeverity": "High",
            "Automated": "No",
            "MethodName": "",
            "Recommendation": "Remote desktop connection should be disabled. Refer: https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-role-enable-remote-desktop-powershell",
            "Tags": [
                        "SDL",
                        "Best Practice",
                        "Manual",
                        "NetSec"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_BCDR_Persist_Output_To_Storage",
            "Description": "Batch account tasks and jobs should be configured to persist output to Azure Blob Storage",
            "Id": "Batch160",
            "ControlSeverity": "Medium",
            "Automated": "No",
            "MethodName": "",
            "Recommendation": "Use Azure blob storage to persist Batch account tasks and jobs. Refer: https://docs.microsoft.com/en-us/azure/batch/batch-task-output",
            "Tags": [
                        "SDL",
                        "Best Practice",
                        "Manual",
                        "BCDR"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_Audit_Enable_Diagnostics_Log",
            "Description": "Diagnostics logs must be enabled with a retention period of at least $($this.ControlSettings.Diagnostics_RetentionPeriod_Min) days",
            "Id": "Batch170",
            "ControlSeverity": "Medium",
            "Automated": "Yes",
            "MethodName": "CheckDiagnosticsSettings",
            "Recommendation": "Run command Set-AzureRmDiagnosticSetting -ResourceId {'ResourceId'} -Enable $true -StorageAccountId '{StorageAccountId}' -RetentionInDays 365 -RetentionEnabled $true Refer: https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-azure-key-vault",
            "Tags": [
                        "SDL",
                        "TCP",
                        "Automated",
                        "Audit",
                        "Diagnostics"
                    ],
            "Enabled": true
        },
        {
            "ControlID": "Azure_Batch_Audit_Enable_Metric_Alert",
            "Description": "Metric alert rules must be configured on Batch account",
            "Id": "Batch180",
            "ControlSeverity": "Low",
            "Automated": "Yes",
            "MethodName": "CheckBatchMetricAlert",
            "Recommendation": "Add or update a metric-based alert rule by using command Add-AzureRmMetricAlertRule -Location '{Location}'-MetricName 'PoolDeleteCompleteEvent' -Name '{alertName}' -Operator 'GreaterThan' -ResourceGroup '{ResourceGroupName}' -TargetResourceId '{TargetResourceId}' -Threshold 0 -TimeAggregationOperator 'Total' -WindowSize '01:00:00' -Actions '{Actions}'",
            "Tags": [
                        "SDL",
                        "Best Practice",
                        "Automated",
                        "Audit"
                    ],
            "Enabled": true
        }
    ]
}