本页面介绍了如何在 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
- 重启 Management Server:
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- 在所有 Management Server 节点上逐个重复上述步骤。
- 使用以下属性创建(或更新现有)虚拟主机。请注意,协议以空格分隔,并且区分大小写。
"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