在設定您的雲端帳號管理 Terraform 模板時,您可以根據掃瞄結果選擇掃瞄檔案的目的地。如果您未設定參數,掃瞄檔案將保留在其原始位置,並附有指示掃瞄結果的中繼標籤。
File Security Storage 支援三種類型的目的地儲存桶:
-
quarantine_bucket:指定 GCS 存儲桶路徑,將識別為惡意的文件隔離。當文件被檢測為惡意程式或包含威脅時,File Security Storage 會將其移至此存儲桶以進行隔離和進一步調查。 -
clean_bucket:指定通過安全掃描的檔案將被移動到的 GCS bucket 路徑。乾淨的檔案是指已驗證無惡意程式和其他安全威脅的檔案。 -
failure_bucket:指定無法掃描的檔案將被移動到的 GCS 存儲桶路徑。這包括遇到掃描錯誤、超過大小限制、損壞或格式不受支持的檔案。
您可以配置這些 GCS 存儲桶以使用自訂、區域和全域設定。請注意,由於這些參數是透過 CAM 主 Terraform 模組傳遞到 File Security Storage
的字串類型 Terraform 變數,您必須提供 JSON 作為轉義字串。內部的雙引號必須使用反斜線(\")進行轉義。
-
區域性 GCS 儲存桶:
-
quarantine_bucket = "{\"us-central1\": \"quarantine-files-usc1\", \"europe-west1\": \"quarantine-files-euw1\"}" -
clean_bucket = "{\"us-central1\": \"clean-files-usc1\", \"europe-west1\": \"clean-files-euw1\"}" -
failure_bucket = "{\"us-central1\": \"failure-files-usc1\", \"europe-west1\": \"failure-files-euw1\"}"
-
- 全域(備援)
-
quarantine_bucket = "{\"global\": \"central-quarantine-bucket\"}" -
clean_bucket = "{\"global\": \"central-clean-bucket\"}" -
failure_bucket = "{\"global\": \"central-failure-bucket\"}"
-
- 自訂(每個來源儲存桶)
-
quarantine_bucket = "{\"custom\": {\"source-bucket-name\": {\"destBucket\": \"destination-bucket-name\"}}}" -
clean_bucket = "{\"custom\": {\"source-bucket-name\": {\"destBucket\": \"destination-bucket-name\"}}}" -
failure_bucket = "{\"custom\": {\"source-bucket-name\": {\"destBucket\": \"destination-bucket-name\"}}}"
-
- 合併
-
quarantine_bucket = "{\"custom\": {\"finance-data-bucket\": {\"destBucket\": \"finance-quarantine\"}}, \"us-central1\": \"general-quarantine-usc1\", \"global\": \"general-quarantine-fallback\"}" -
clean_bucket = "{\"custom\": {\"finance-data-bucket\": {\"destBucket\": \"finance-clean\"}}, \"us-central1\": \"general-clean-usc1\", \"global\": \"general-clean-fallback\"}" -
failure_bucket = "{\"custom\": {\"finance-data-bucket\": {\"destBucket\": \"finance-failure\"}}, \"us-central1\": \"general-failure-usc1\", \"global\": \"general-failure-fallback\"}"
-
若要設定這些可選參數,請在部署 terraform 範本之前執行以下操作。如果您已經部署了範本,則需要重新部署範本。
-
在範本套件中,找到
main.tf檔案。 -
在檔案中,找到檔案儲存安全性部分。
module "file-storage-security" { source = "https://{fss template path}/gcp-templates.zip" business_id = module.cam.v1_account_id project_id = module.cam.project_id deploy_region = module.cam.cam_deployed_region bootstrap_token = "{token}" fss_api_endpoint = "https://{fss api endpoint}" xlogr_api_endpoint = "https://{v1 xlogr endpoint}" artifact_registry = "{fss artifact source}" quarantine_bucket = "" clean_bucket = "" failure_bucket = "" } -
使用所需的 GCP 儲存桶更新以下參數:
module "file-storage-security" { # ... other configuration ... quarantine_bucket = "" clean_bucket = "" failure_bucket = "" } -
執行
deploy.sh腳本。
