本頁面說明如何在 Apigee 路由器中,針對北向流量 (用戶端與路由器之間的流量) 設定 TLS 1.3。
如要進一步瞭解虛擬主機,請參閱「虛擬主機」一文。
為路由器中的所有 TLS 型虛擬主機啟用 TLS 1.3
請依照下列程序,為路由器中的所有 TLS 型虛擬主機啟用 TLS 1.3:
- 在路由器上,在編輯器中開啟下列屬性檔案。
/opt/apigee/customer/application/router.properties
如果檔案不存在,請建立檔案。
- 在屬性檔案中新增下列程式碼:
conf_load_balancing_load.balancing.driver.server.ssl.protocols=TLSv1 TLSv1.1 TLSv1.2 TLSv1.3
新增要支援的所有傳輸層安全標準 (TLS) 通訊協定。請注意,通訊協定以空格分隔,並區分大小寫。
- 儲存檔案。
- 確保此檔案的擁有者為 Apigee 使用者:
chown apigee:apigee /opt/apigee/customer/application/router.properties
- 重新啟動路由器:
/opt/apigee/apigee-service/bin/apigee-service edge-router restart
- 針對所有路由器節點逐一重複執行上述步驟。
僅針對特定虛擬主機啟用 TLS 1.3
本節說明如何針對特定虛擬主機啟用 TLS 1.3。如要啟用 TLS 1.3,請在管理伺服器節點中執行下列步驟:
- 在每個管理伺服器節點上,編輯
/opt/apigee/customer/application/management-server.properties
檔案並新增下列程式碼。(如果檔案不存在,請建立檔案)。conf_virtualhost_virtual.host.allowed.protocol.list=TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
這個檔案的通訊協定會以半形逗號分隔 (區分大小寫)。
- 儲存檔案。
- 確保此檔案的擁有者為 Apigee 使用者:
chown apigee:apigee /opt/apigee/customer/application/management-server.properties
- 重新啟動管理伺服器:
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- 針對所有管理伺服器節點,逐一重複執行上述步驟。
- 使用以下屬性建立 (或更新現有的) 虛擬主機。請注意,通訊協定須以空格分隔,並區分大小寫。
"properties": { "property": [ { "name": "ssl_protocols", "value": "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3" } ] }
設定此屬性的 Vhost 範例如下:
{ "hostAliases": [ "api.myCompany,com", ], "interfaces": [], "listenOptions": [], "name": "secure", "port": "443", "retryOptions": [], "properties": { "property": [ { "name": "ssl_protocols", "value": "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3" } ] }, "sSLInfo": { "ciphers": [], "clientAuthEnabled": "false", "enabled": "true", "ignoreValidationErrors": false, "keyAlias": "myCompanyKeyAlias", "keyStore": "ref://myCompanyKeystoreref", "protocols": [] }, "useBuiltInFreeTrialCert": false }
測試 TLS 1.3
如要測試 TLS 1.3,請輸入下列指令:
curl -v --tlsv1.3 "https://api.myCompany,com/testproxy"
請注意,您只能在支援這項通訊協定的用戶端上測試 TLS 1.3。如果未啟用 TLS 1.3,系統會顯示下列錯誤訊息:
sslv3 alert handshake failure