配置以使用 Proxy 伺服器

WebSphere Automation 中的 CVE/PSIRT 監視器及修正程式管理程式會與 ibm.com 網站進行通訊,以下載最新的一般漏洞及公開 (CVE) 資料及修正程式。 如果您的環境需要 HTTP Proxy 來聯絡外部網站,請使用 Proxy 設定來配置 CVE/PSIRT 監視器及修正程式管理程式。

開始之前

請參閱 WebSphere Automation網路需求 完整清單。

關於此作業

您必須具有 WebSphere Automation 安裝所在 Red Hat® OpenShift® 名稱空間的管理者存取權。

程序

  1. 使用標準 Java™ 系統內容來配置 Proxy 設定,並將它們當作環境變數傳遞至 CVE/PSIRT 監視器及修正程式管理程式。 請參閱下列範例。
    kind: WebSphereSecure
    spec:
      cveMonitor:
        env:
          - name: JVM_ARGS
            value: -Dhttps.proxyHost=<host> -Dhttps.proxyPort=<port> -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port>
    kind: WebSphereSecure
    spec:
      fixManager:
        env:
          - name: JVM_ARGS
            value: -Dhttps.proxyHost=<host> -Dhttps.proxyPort=<post> -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port>
    1. 如果需要傳遞機密性資訊(例如 Proxy 認證),您可以使用 Proxy 認證來建立個別密碼,並傳遞個別變數。 若要使用 Proxy 認證來建立密碼:
      oc create secret generic proxy-credentials --from-literal=user=<user> --from-literal=password=<password>
    2. 將認證傳遞至 CVE/PSIRT 監視器。 請參閱下列範例。
      kind: WebSphereSecure
      spec:
        cveMonitor:
          env:
            - name: PROXY_USER
              valueFrom:
                secretKeyRef:
                  key: user
                  name: proxy-credentials
            - name: PROXY_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: password
                  name: proxy-credentials
            - name: JVM_ARGS
              value: -Dhttps.proxyHost=<host> -Dhttps.proxyPort=<port> -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port> -Dhttp.proxyUser=$(PROXY_USER) -Dhttp.proxyPassword=$(PROXY_PASSWORD)
      kind: WebSphereSecure
      spec:
        fixManager:
          env:
            - name: PROXY_USER
              valueFrom:
                secretKeyRef:
                  key: user
                  name: proxy-credentials
            - name: PROXY_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: password
                  name: proxy-credentials
            - name: JVM_ARGS
              value: -Dhttps.proxyHost=<host> -Dhttps.proxyPort=<port> -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port> -Dhttp.proxyUser=$(PROXY_USER) -Dhttp.proxyPassword=$(PROXY_PASSWORD)
  2. 如果您的 HTTP Proxy 會重新編寫 HTTP 端點的憑證,並使用自訂 CA 憑證,則必須配置 CVE/PSIRT 監視器和修正程式管理程式,以信任您的自訂 CA 憑證。 使用自訂 CA 憑證建立 wsa-custom-ca-cert 密鑰。 請參閱下列範例。
    oc create secret generic wsa-custom-ca-cert –from-file=ca.crt=/home/mycacerts.pem