在設定您的雲端帳號管理 Terraform 模板時,您可以選擇根據掃瞄結果設定掃瞄檔案的目的地。如果您未設定參數,掃瞄檔案將保留在其原始位置,並附有指示其掃瞄結果的元標籤。
File Security Storage 支援三種類型的目的地儲存帳戶:
-
quarantine_storage_account:指定 Azure Storage 帳戶路徑,將被識別為惡意的檔案隔離。當檔案被檢測為惡意程式或包含威脅時,File Security Storage 會將其移至此存儲帳戶進行隔離和進一步調查。 -
clean_storage_account:指定 Azure Storage 帳戶路徑,通過安全掃描的檔案將移至此處。已清理的檔案是指已確認無惡意程式和其他安全威脅的檔案。 -
failure_storage_account:指定無法掃描的檔案將被移動到的 Azure Storage 帳戶路徑。這包括遇到掃描錯誤、超過大小限制、損壞或格式不支援的檔案。
您可以配置這些儲存帳戶以使用自訂、區域和全域設定。使用 Terraform
jsonencode() 函數來設定這些參數。舊版的轉義字串格式(使用反斜線轉義內部雙引號)仍然受支持。單一訂閱
地區:
quarantine_storage_account = jsonencode({ eastus = "quarantinefileseusacct", westeurope = "quarantinefilesweuacct" })
clean_storage_account = jsonencode({ eastus = "cleanfileseusacct", westeurope = "cleanfilesweuacct" })
failure_storage_account = jsonencode({ eastus = "failurefileseusacct", westeurope = "failurefilesweuacct" })
全域(後備):
quarantine_storage_account = jsonencode({ global = "centralquarantineacct" })
clean_storage_account = jsonencode({ global = "centralcleanacct" })
failure_storage_account = jsonencode({ global = "centralfailureacct" })
})
Custom per source account
quarantine_storage_account = jsonencode({
custom = {
"source-storage-account-name" = { destAccount = "destination-account-name" }
}
})
clean_storage_account = jsonencode({
custom = {
"source-storage-account-name" = { destAccount = "destination-account-name" }
}
})
failure_storage_account = jsonencode({
custom = {
"source-storage-account-name" = { destAccount = "destination-account-name" }
}
})
Combined
quarantine_storage_account = jsonencode({
custom = { "finance-data-acct" = { destAccount = "finance-quarantine-acct" } }
eastus = "general-quarantine-eastus"
global = "general-quarantine-fallback"
})
clean_storage_account = jsonencode({
custom = { "finance-data-acct" = { destAccount = "finance-clean-acct" } }
eastus = "general-clean-eastus"
global = "general-clean-fallback"
})
failure_storage_account = jsonencode({
custom = { "finance-data-acct" = { destAccount = "finance-failure-acct" } }
eastus = "general-failure-eastus"
global = "general-failure-fallback"
})
設定單一訂閱的參數
若要設定這些可選參數,請在部署 Terraform 模板之前執行以下操作。如果您已經部署了模板,則需要重新部署模板。
-
在範本套件中,找到
main.tf檔案。 -
在檔案中,找到檔案儲存安全性部分。
module "file-storage-security" { source = "https://v1-file-security-storage.s3.amazonaws.com/latest/azureTemplates/azure-templates.zip" business_id = module.cam.v1_account_id subscription_id = module.cam.subscription_id resource_group_location = module.cam.cam_deployed_region bootstrap_token = "<bootstrap token>" fss_api_endpoint = "https://api.xdr.trendmicro.com/external/v2/direct/sfc/external/sfc/api" xlogr_api_endpoint = "https://xlogr-ue1.xdr.trendmicro.com" fss_bucket_name = "v1-file-security-storage" quarantine_storage_account = jsonencode({}) clean_storage_account = jsonencode({}) failure_storage_account = jsonencode({}) } -
使用所需的 Azure Storage 帳戶更新以下參數:
module "file-storage-security" { # ... other configuration ... quarantine_storage_account = jsonencode({}) clean_storage_account = jsonencode({}) failure_storage_account = jsonencode({}) } -
執行
deploy.sh腳本。
管理群組
使用 lookup() 來配置每個訂閱的路由。不在映射中的訂閱將被禁用路由:
quarantine_storage_account = jsonencode(lookup(
{
"11111111-2222-3333-4444-555555555555" = { global = "quarantine-sub-a" }
"22222222-3333-4444-5555-666666666666" = { global = "quarantine-sub-b" }
},
var.subscription_id,
{}
))
相同的模式適用於 clean_storage_account 和 failure_storage_account。在每個訂閱的配置中,也支援區域和自訂路由模式。
設定管理群組的參數
若要設定這些可選參數,請在部署 Terraform 範本之前執行以下操作。如果您已經部署了範本,則需要重新部署範本。
-
在範本套件中,找到
security_apps/main.tf檔案。 -
在檔案中,找到檔案儲存安全性部分。
module "file-storage-security" { source = "https://v1-file-security-storage.s3.amazonaws.com/latest/azureTemplates/azure-templates.zip" business_id = module.cam.v1_account_id subscription_id = module.cam.subscription_id resource_group_location = module.cam.cam_deployed_region bootstrap_token = "<bootstrap token>" fss_api_endpoint = "https://api.xdr.trendmicro.com/external/v2/direct/sfc/external/sfc/api" xlogr_api_endpoint = "https://xlogr-ue1.xdr.trendmicro.com" fss_bucket_name = "v1-file-security-storage" quarantine_storage_account = jsonencode({}) clean_storage_account = jsonencode({}) failure_storage_account = jsonencode({}) } -
使用所需的 Azure Storage 帳戶更新以下參數:
module "file-storage-security" { # ... other configuration ... quarantine_storage_account = jsonencode(lookup( { "11111111-2222-3333-4444-555555555555" = { global = "quarantine-sub-a" } "22222222-3333-4444-5555-666666666666" = { global = "quarantine-sub-b" } }, var.subscription_id, {} )) clean_storage_account = jsonencode(lookup( { "11111111-2222-3333-4444-555555555555" = { global = "clean-sub-a" } "22222222-3333-4444-5555-666666666666" = { global = "clean-sub-b" } }, var.subscription_id, {} )) failure_storage_account = jsonencode(lookup( { "11111111-2222-3333-4444-555555555555" = { global = "failure-sub-a" } "22222222-3333-4444-5555-666666666666" = { global = "failure-sub-b" } }, var.subscription_id, {} )) } -
執行
./mgmt_group_deploy.sh腳本。
每個訂閱的配置中也支援區域和自訂模式。不在地圖中的訂閱將停用路由
