Apigee Hybrid 管理層必須能夠在執行階段層中存取 MART 服務。因此,您必須向叢集外部的要求公開 MART 端點。MART 端點是安全的 TLS 連線。Hybrid 會使用 Istio 輸入閘道服務,將流量公開至這個端點。
本主題將說明公開 MART 端點的步驟。
新增 MART 服務帳戶
MART 需要 GCP 服務帳戶才能進行驗證。
- 在 GCP 設定步驟中,您在新增服務帳戶時,建立了沒有 MART 角色的服務帳戶。找出您為該服務帳戶下載的金鑰檔案。檔案的副檔名應為
.json
。 - 將金鑰檔案路徑新增至
mart.serviceAccountPath
屬性:... mart: sslCertPath: sslKeyPath: hostAlias: serviceAccountPath: "path to a file" ...
例如:
... mart: sslCertPath: sslKeyPath: hostAlias: serviceAccountPath: "your_keypath/mart-service-account.json ...
新增 TLS 憑證和主機別名
- 開啟覆寫檔案。
- 新增
mart.sslCertPath
、mart.sslKeyPath
和mart.hostAlias
屬性。下表說明這些屬性:屬性 值 mart.sslCertPath
mart.sslKeyPathMART 憑證/金鑰組必須經過憑證授權單位 (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 ...
- 儲存變更。