在單一虛擬機器上自訂安裝 AppScan 360°

自訂安裝可讓您以完整配置測試 AppScan 360°。您可以在離線或線上模式中安裝單一 VM。

註: 以管理員身分在目標系統上執行所有安裝與配置活動。
若要在單一虛擬機器上安裝 AppScan 360°
  1. AppScan 360° 單一 VM 安裝指令碼會詢問一系列問題,來配置您的環境。請在設定單一 VM 環境檢閱設定資訊,並收集完成安裝所需的資訊。

  2. MyHCLSoftware 入口網站,將 AppScan 360° 安一 VM 指令碼和 AppScan 360° 安裝檔案下載至 /home/username 下的單一目錄位置。例如 /home/username/AppScan360_singleVM
    目錄中包含的檔案應為:
    • 其中之一:
      • AppScan360_SingleVMsetup_v2.0.0_Online.run
      • AppScan360_SingleVMsetup_v2.0.0_Offline.run
    • AppScan360_v2.0.0.run
    • AppScan360_ASRA_v2.0.0.run
    • AppScan360_SCA_v2.0.0.run(選用)
  3. 按照下列方式重新命名已下載的檔案:
    mv AppScan360_v2.0.0.run ascp-AppScan360_v2.0.0.run
    mv AppScan360_v2.0.0.run asra-AppScan360_ASRA_v2.0.0.run
    mv AppScan360_SCA_v2.0.0.run sca-AppScan360_SCA_v2.0.0.run # (Optional)
  4. 建立安裝的目錄,並將所有檔案移至該處。所有安裝套件檔案必須位於同一個目錄。
    mkdir -p ~/aio-setup
    mv *.run ~/aio-setup/
  5. 在安裝資料夾中執行下列步驟,為安裝程式提供可執行的許可權:
    cd ~/aio-setup
    chmod +x *.run
  6. 如果您使用自訂或自我簽署憑證來提供 SSO(LDAP、OIDC)或 SMTP 服務,請準備憑證資料夾。
    註: 這是快速安裝的選用步驟,對於自訂安裝則是必要步驟。
    ./AppScan360_SingleVMsetup_v2.0.0_Online.gz.run -- $PWD prepareCertsFolders
    指令會建立下列資料夾結構:
    資料夾 功能
    ~/aio-setup/certs/ 主憑證資料夾
    ~/aio-setup/certs/docker/ Docker 登錄服務憑證(POC 模式不需要)
    ~/aio-setup/certs/ldap/ LDAP 憑證(支援 LDAPS)
    ~/aio-setup/certs/smtp/ SMTP 憑證(支援 SMPM)
    ~/aio-setup/certs/oidc/ OIDC 憑證(支援 OIDCS)
    ~/aio-setup/certs/ingress/ 輸入憑證(選用,如果未提供,則會產生自我簽署)
    重要: 建立資料夾結構後,請先將憑證放置在適當的資料夾中,然後再繼續。
  7. 執行安裝指令碼:
    註: 指定檔案的資料夾位置,即使您從資料夾位置進行安裝也是如此。
    cd ~/aio-setup
    ./AppScan360_SingleVMsetup_v2.0.0_Online.gz.run -- $PWD
    註:
    • 若因任何原因要停止安裝,請按下 CTRL+C,然後執行
      cd aioWorkspace
      ./disengageAS360-AIO.sh
    • 安裝日誌檔位於 ./aioWorkspace/logs
  8. 出現提示時,輸入 2 以指定自訂安裝。按下 Enter 鍵。
  9. 安裝程序會詢問一系列問題,並要求您確認每個答案。根據要求回答問題和提示:
    1. > Will this production deployment include Software Composition Analysis (SCA)? This requires license. (y/n) [Default: n]:
      預設值為 n
      • y:在您的安裝中納入軟體組成分析 (SCA) 元件。SCA 能讓您分析應用程式的開放原始碼元件漏洞。
      • n:請勿在安裝時納入軟體組成分析 (SCA) 元件。
    2. > To ensure system stability, we strongly recommend validating your server's hardware against your expected workload. This helps prevent scan failures and performance issues after installation. Do you want to perform this resource check now? (y/n) [Default: y]:
      預設值為 y
      • y:根據預期的掃描工作負載來驗證硬體資源。建議在生產環境中使用此選項。
        指出並行掃描的預期數量:
        🖥️ *** Production Workload & Resource Planning ***
        📊 To calculate hardware requirements, please specify the maximum number of scans you expect to run at the same time (concurrently).
        💡 You can enter 0 if a scan type will not be used.
        
        > Enter desired number of concurrent STATIC (SAST) scans [Default: 1]:
        > Enter desired number of concurrent DYNAMIC (DAST) scans [Default: 1]:
        > Enter desired number of concurrent INTERACTIVE (IAST) scans [Default: 1]:
        如果您選擇啟用 SCA,請指出並行 SCA 掃描的預期數量:
        Enter desired number of concurrent SCA scans [Default: 1]:
      • n:略過資源驗證。
    3. 正式版安裝必須配置外部 MSSQL 資料庫。在提示出現時回應。
      • 🛢️ *** Database Configuration ***
        > Enter Database Hostname or IP:
      • > Enter Database Port [Default: 1433]:
      • > Enter Database User for AppScan:
      • > Enter Database User Password:
      • > Enter the name for the main AppScan database [Default: AppScan360DB]:
    4. 如果您選擇在安裝中加入軟體組成分析 (SCA):
      • 輸入 SCA 資料庫名稱:
        > Please provide a name for the new SCA database [Default: AppScan360_SCA_DB]:
      • 輸入 SCA 聚集資料庫名稱:
        > Please provide a name for the new SCA Aggregation database [Default: > AppScan360_SCA_Aggregation_DB]:
      • 輸入 SCA 更新的登錄資訊,或在適用的情況下接受預設值:

        > SCA Registry Address [Default: hclcr.io]:
        > SCA Registry Path [Default: appscan360/as360-k8s-docker-images]:
        > SCA Registry Username (typically your HCL ID):
        > SCA Registry Password/Token:
    5. > Please enter the primary domain name for this installation. This will be used to create the access URL (e.g., yourcompany.com):

      這是沒有預設值的必填欄位。指定的網域名稱是用來建立 AppScan 360° 實例的存取 URL。例如,如果輸入 appscan-test.local,您的 AppScan 360° URL 會是 https://hostname.appscan-test.local

      網域名稱應便於記憶,且在您的網路環境中是唯一的名稱,不與現有網域衝突。

    6. > Please enter the external domain(s) or IP(s) that this instance will need to access for external services(such as SSO, SMTP, etc.). Separate multiple entries with commas:

      輸入 AppScan 360° 實例需要連線的任何網域或 IP 位址,例如:

      • 用於電子郵件通知的 SMTP 伺服器

      • SSO 鑑別提供者(LDAP、OIDC)

      • 外部 CI/CD 工具

      使用逗點隔開多個項目。如果不需要任何外部服務,請留空。

    7. > Is the VM connected with the local DNS server (y/n)? 

      預設值為 n

      • y:您的 VM 已連線至 DNS 伺服器。系統使用主機名稱進行網路相關配置。
      • n:您的 VM 未連接至 DNS 伺服器。系統直接使用 IP 位址進行網路相關配置。
    8. > To plan for long-term storage costs, estimate the number of scan results you plan to retain. > Specify the shared storage capacity in GB [Default: 200]:
      此儲存空間用於元件之間共用的日誌、配置檔、持續性資料和掃描日誌。預設值為 200GB
      • 請按 Enter 鍵,接受預設值;或
      • 輸入不同的數字以指定自訂儲存值,然後按下 Enter 鍵。
    9. > Do you want to connect with your SMTP Mail Relay (SMR)(y/n)? 

      預設值為 n

      SMTP 郵件中繼是中介伺服器,可接受來自您系統的送出電子郵件,並將其轉寄至收件者的電子郵件伺服器。中繼功能有助於確保電子郵件遞送,且可套用垃圾郵件過濾等特定規則。在 AppScan 360° 中,設定中繼,以在掃描完成、排程的掃描啟動等情況下接收通知電子郵件。

      • y:將 AppScan 360° 與 SMTP 郵件中繼整合,以從部署傳送電子郵件。選擇 y 時,在出現 SMR 提示時輸入適當的主機、埠、認證和加密詳細資料,以完成連線:
        • > Please enter the SMTP host:
        • > Please enter the SMTP port:

          埠號通常是 25、465 或 587。

        • > Please enter the SMTP username:

          如果需要鑑別。

        • Please enter the SMTP password:

          如果需要鑑別。

        • > Does your SMTP server use SSL/TLS? If yes, a certificate is required to be present in certs/smtp folder (y/n)?
      • n:未設定 SMTP 伺服器;使用者無法收到任何相關電子郵件通知。
  10. 註明 Docker 登錄配置:
    • > What is the external Docker Private Registry (DPR) address (FQDN:PORT)?
    • > What is the external Docker Private Registry (DPR) username?

      如果需要鑑別

    • > What is the external Docker Private Registry (DPR) password?

      如果需要鑑別

    • 🐳 Docker registry and Helm repository context names are used to set the context for docker images and helm charts.
      💡 To set these to an empty string(root repository), type EMPTY
      ------------------------------------------------------------------------------------------------
      > What is the docker registry context/repository name [Default: as360-k8s-docker-images]:
    • > What is the helm repository context/repository name [Default: as360-k8s-helm-packages]:
  11. Do you want to use a proxy service? (y/n) [Default: n]:
    預設值為 n
    • y:配置 Proxy 服務。
      • > What is the proxy host?
      • > What is the proxy port?
      • > Does the proxy require user/password credentials? (y/n):
      • > What is the proxy username?:
      • > What is the proxy password?:
    • n:略過 Proxy 配置。
  12. 安裝會顯示您的選擇摘要,並詢問是否要繼續安裝。
    ✅ Summary of your choices:
      Installation Mode: Custom (Production)
      Install SCA Kit: [y/n]
      Domain: [your domain]
      Connected to Local DNS: [y/n]
      Storage Size: [size]GB
      Use SMTP Mail Relay: [y/n]
      Docker Private Registry Address: [address]
      Scan Concurrency: SAST=[n], DAST=[n], IAST=[n], SCA=[n]
      MSSQL Host: [host], Port: [port], DB: [database]
      [Additional configuration details...]
    > Continue with installation? (y/n) [Default: y]:

    確認資訊正確無誤,然後輸入 y

    安裝程序會繼續執行安裝與配置:
    • Kubernetes 叢集 (K0S)
    • AppScan 360° 中央平台和元件。
    • AppScan 補救諮詢 (ASRA)
    • 軟體組合分析 (SCA) 測試(如選取)
    • 外部資料庫和 Docker 登錄的連線
    視您的系統和網路速度,安裝可能需要一些時間。完成時,安裝會顯示完成訊息:
    The AS360 Single VM was installed, to access it do the following:
      1. Add to your 'hosts' file the following line: [IP_ADDRESS] [HOSTNAME].[DOMAIN]
      2. Access https://[HOSTNAME].[DOMAIN] in your browser
  13. 新增提供給主機檔案的 IP 位址和主機名稱。
    作業系統 主機檔案位置
    Linux、MacOS /etc/hosts
    Windows C:\Windows\System32\drivers\etc\hosts
    例如:
    192.168.1.100 appscan.appscan-test.local

登入與啟動 AppScan 360°

若要登入並啟動 AppScan 360°
  1. 使用指定的 URL (https://[HOSTNAME].[DOMAIN]) 存取 AppScan 360° 介面
  2. 以預設認證登入:
    • 使用者名稱:Admin
    • 密碼:Admin123!
  3. 上傳您的 AppScan 360° 授權檔案以啟動產品。
註: 建議您定期備份,包括:
  • 資料庫。
  • 安裝目錄中的配置檔。
  • 授權資訊。

變更安裝方法

如果在安裝和使用 AppScan 360° 快速單一 VM 安裝後,您決定要在分散式環境中安裝 AppScan 360°AppScan 360° 的正式單一 VM 版本:

常見的安裝問題

問題 解決方案
資料庫連線失敗 確認資料庫認證和網路連線
磁碟空間不足 確保 VM 具有符合要求的足夠儲存空間
憑證錯誤 檢查憑證資料夾中的憑證格式和檔案名稱
Docker 登錄連線 確認登錄認證和網路連線