MART 配置

Apigee Hybrid 管理层面通常通过 Apigee Connect 与运行时层面中的 MART 服务通信。这是推荐的配置。但是,如果要使用 MART Istio 入站流量网关服务而不是 Apigee Connect,则需要将 MART 端点公开给来自集群外部的请求。MART 端点是一种安全 TLS 连接。Hybrid 使用 Istio 入站流量网关服务向此端点公开流量。

本主题介绍公开 MART 端点所需的步骤。

添加 MART 服务帐号

MART 需要使用 GCP 服务帐号进行身份验证。

  1. 在 GCP 设置步骤添加服务帐号中,您将为 MART 创建无角色的服务帐号。找到您为该服务帐号下载的密钥文件。文件扩展名应为 .json
  2. 将密钥文件路径添加到 mart.serviceAccountPath 属性:
    ...
    mart:
      sslCertPath:
      sslKeyPath:
      hostAlias:
      serviceAccountPath: "path to a file"
    ...

    例如:

    ...
    mart:
      sslCertPath:
      sslKeyPath:
      hostAlias:
      serviceAccountPath: "your_keypath/mart-service-account.json
    ...

添加 TLS 凭据和主机别名

  1. 打开替换文件。
  2. 以及 mart.sslCertPathmart.sslKeyPathmart.hostAlias 属性。下表介绍了这些属性:
    属性
    mart.sslCertPath
    mart.sslKeyPath
    MART 证书/密钥对必须由证书授权机构 (CA) 授权。如果您之前未创建授权证书/密钥对,则必须立即创建并输入相应属性值的证书和密钥文件名。如果您需要有关生成授权证书/密钥对的帮助,请参阅获取 TLS 凭据:示例
    mart.hostAlias (必需)MART 服务器端点的限定 DNS 名称。例如,foo-mart.mydomain.com

    例如,当主机别名是限定域名时:

    ...
    
    mart:
      sslCertPath: path-to-file/mart-server.crt
      sslKeyPath: path-to-file/mart-server.key
      hostAlias: foo-mart.mydomain.com
      serviceAccountPath: "your_keypath/mart-service-account.json
    
    ...
    
  3. 保存更改。