配置以使用代理服务器

WebSphere Automation 中的 CVE/PSIRT 监视器和修订管理器与 ibm.com 站点通信,以下载最新的公共漏洞和暴露 (CVE) 数据和修订。 如果您的环境需要HTTP来访问外部站点,请使用您的代理设置配置 CVE/PSIRT 监控器和修复管理器。

准备工作

请参阅完整的网络要求列表。 WebSphere Automation

关于本任务

您必须具有对安装了 WebSphere AutomationRed Hat® OpenShift® 名称空间的管理员访问权。

过程

  1. 使用标准 Java™ 系统属性来配置代理设置,并将其作为环境变量传递到 CVE/PSIRT 监视器和修订管理器。 请参阅以下示例。
    kind: WebSphereSecure
    spec:
      cveMonitor:
        env:
          - name: JVM_ARGS
            value: -Dhttps.proxyHost=<https://proxy-host> -Dhttps.proxyPort=<port> 
    kind: WebSphereSecure
    spec:
      fixManager:
        env:
          - name: JVM_ARGS
            value: -Dhttps.proxyHost=<https://proxy-host> -Dhttps.proxyPort=<port>

    在这些示例中, URL 是一个代理 <http://proxy-host> ,用于在集群外部创建 HTTPS 连接,例如在《 网络要求 》中指定的外部网络要求。 URL必须为http或https。 为URL的代理指定URL。 例如,如果大多数代理配置为使用 https ,但仅支持 http ,那么它们会报告错误。 此故障消息可能不会传播到日志中,并且可能显示为网络连接故障。 如果使用侦听来自集群的 https 连接的代理,那么可能需要配置集群以接受代理所使用的认证中心和证书。

    注:JVM_ARGS中配置代理服务器时,将在 CVE 监视器 cron 作业中添加 JVM_ARGS 环境变量两次。 这将导致代理设置不生效。 有关 JVM_ARGS 中的代理配置以及变通方法的更多信息,请参阅 代理配置未生效
    1. 如果您需要传递敏感信息(例如,代理凭证),您可以使用代理凭据创建单独的机密并将它们传递给单独的变量。 要使用代理凭证创建私钥,请执行以下操作:
      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=<https://proxy-host> -Dhttps.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=<https://proxy-host> -Dhttps.proxyPort=<port> -Dhttp.proxyUser=$(PROXY_USER) -Dhttp.proxyPassword=$(PROXY_PASSWORD)
  2. 如果您的 HTTP HTTPS 端点重写了证书并使用了自定义CA证书,则必须配置CVE/PSIRT监控和修复管理器,以信任您的自定义CA证书。 使用定制 CA 证书创建 wsa-custom-ca-cert 私钥。 请参阅以下示例。
    oc create secret generic wsa-custom-ca-cert –from-file=ca.crt=/home/mycacerts.pem