檢視次數:

如何使用 OCI 雲端 Shell 代替本地 Shell 進行 無代理弱點與安全威脅偵測 部署?

為了解決不同本地 Shell 配置中可能存在的網路連接限制和不一致性,TrendAI 建議使用 OCI 雲端 Shell 來提供標準化、預配置的部署環境。
在部署之前,請完成以下先決條件:
  1. 將雲端 Shell 網路設定設為「Public」
  2. 配置 OCI CLI 配置檔。步驟與本地端 shell 部署相同。詳細說明請參閱 使用 LocalShell 連接 OCI 隔間
  3. 安裝或驗證 Terraform。要驗證您已安裝的 Terraform 版本,請輸入
    terraform version
    • 需要 Terraform 版本 1.13 或更高版本。如果您的版本較舊,請從 HashiCorp 發行頁面下載較新版本,並確保該版本在您的PATH上。
  4. 為 Docker 相容性建立 Podman 別名。OCI 雲端 Shell 使用 Podman 而非 Docker,因此別名可確保部署程式檔正確執行。
    • # Alias podman to docker
      echo 'alias docker=podman' >> ~/.bashrc
      
      # Reload your shell configuration
      source ~/.bashrc
      
      # Verify docker is available
      docker --version
完成先決條件後,使用雲端 Shell 部署 無代理弱點與安全威脅偵測
  1. TrendAI Vision One™中,點擊「Download the Terraform Template」,然後在雲端 Shell 中儲存並解壓縮範本。
  2. TrendAI Vision One™ 複製部署資料夾命令並貼到 shell 中。
  3. TrendAI Vision One™ 複製部署程式檔指令,然後將它們貼到 Shell 中。雲端 Shell 開始 Terraform 程序以部署安全資源。
  4. TrendAI Vision One™中,於「Add Oracle Compartment」畫面,點擊「完成」
    連線過程可能需要一些時間才能完成。請刷新 Cloud Accounts 畫面以檢查您新增的隔間狀態。

如何在使用 無代理弱點與安全威脅偵測 Terraform 部署 OCI 時解決 OCI KMS 金鑰創建錯誤?

當使用 Terraform 腳本將 無代理弱點與安全威脅偵測 部署到您的 OCI 區隔時,您可能會收到如下所示的 KMS 金鑰創建錯誤。
Error: Post "[URL]": dial tcp: lookup [URL] on [IPAddress]:53: no such host
  with module.cloud-sentry.module.primary-region.module.primary-common.module.secrets-management.oci_kms_key.common_key[0],
  on .terraform/modules/cloud-sentry/feature-modules/common/primary-region/secrets-management/secrets.tf line 14, in resource "oci_kms_key" "common_key"
金鑰建立錯誤是與 OCI 相關的間歇性網路問題。為了解決此問題,請重新執行命令 terraform apply 以再次部署 Terraform 模板。

如何在 macOS 上進行 無代理弱點與安全威脅偵測 Terraform 部署 OCI 時解決「不允許操作」錯誤?

在 macOS 上執行 get_topic_ocid.sh shell 腳本以部署 無代理弱點與安全威脅偵測 Terraform 模板到 OCI 時,您可能會收到類似以下的錯誤訊息:
│ Error: External Program Execution Failed
│ 
│   with module.cloud-sentry.module.ca-toronto-1[0].module.common[0].module.telemetry.module.telemetry_topic.data.external.topic_ocid,
│   on .terraform/modules/cloud-sentry/templates/topic/topic.tf line 88, in data "external" "topic_ocid":
│   88:   program    = ["${path.module}/get_topic_ocid.sh"]
│ 
│ The data source received an unexpected error while attempting to execute the
│ program.
│ 
│ The program was executed, however it returned no additional error messaging.
│ 
│ Program: .terraform/modules/cloud-sentry/templates/topic/get_topic_ocid.sh
│ State: fork/exec
│ .terraform/modules/cloud-sentry/templates/topic/get_topic_ocid.sh: operation
│ not permitted
如果您收到錯誤訊息,macOS Gatekeeper 已封鎖該腳本。要修正此錯誤,請執行以下步驟以移除 macOS Gatekeeper 添加到該腳本的 com.apple.quarantine 屬性。
  1. 開啟終端機。
  2. 使用以下命令導航到腳本目錄:
    • cd /path/Vision-One-Cloud-Account-Management/.terraform/modules/cloud-sentry/templates/topic/
      
  3. 使用以下命令來移除隔離屬性:
    • xattr -d com.apple.quarantine get_topic_ocid.sh

在 OCI 中移除 無代理弱點與安全威脅偵測 Terraform 堆疊時,如何解決與日誌群組移除相關的 EOF 錯誤?

如果您使用 terraform destroy 命令從您的 OCI 分區中移除 無代理弱點與安全威脅偵測 的 Terraform 堆疊,您可能會收到類似於以下與日誌群組移除相關的錯誤:
Error: Delete "https://logging.ap-singapore-1.oci.oraclecloud.com/20200531/logGroups/ocid1.loggroup.oc1.ap-singapore-1.amaaaaaags553pqaq4hd262mmevb24cmbcttm6mfogldj6lvdjsmkkm3idla/logs/ocid1.log.oc1.ap-singapore-1.amaaaaaags553pqaj7wjzerzf5rvnad66gezhvanmoflayldqq5wcdxooq3a": EOF
錯誤是與 OCI 相關的間歇性網路問題。重新執行 terraform destroy 命令以重試移除 Terraform 堆疊。