Edge for Private Cloud v. 4.17.05
默认情况下,Management API 的 TLS 处于停用状态,您可以使用管理服务器节点的 IP 地址和端口 8080 通过 HTTP 访问 Edge Management API。例如:
http://ms_IP:8080
或者,您也可以配置对 Management API 的 TLS 访问,以便通过以下方式对其进行访问:
https://ms_IP:8443
在此示例中,配置 TLS 访问以使用端口 8443。但是,边缘不需要该端口号,您可以将管理服务器配置为使用其他端口值。唯一的要求是您的防火墙允许通过指定端口传输流量。
为确保传入和传出 Management API 的流量加密,请在 /opt/apigee/customer/application/management-server.properties 文件中配置设置。
除了 TLS 配置之外,您还可以通过修改 management-server.properties 文件来控制密码验证(密码长度和强度)。
确保您的 TLS 端口已打开
本部分的过程将 TLS 配置为使用管理服务器上的端口 8443。 无论您使用哪个端口,都必须确保该端口在管理服务器上是开放的。例如,您可以使用以下命令将其打开:
$ iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT --verbose
配置 TLS
修改 /opt/apigee/customer/application/management-server.properties 文件,控制进出管理 API 的流量的 TLS 使用情况。如果此文件不存在,请创建一个。
请按照以下步骤配置对 Management API 的 TLS 访问权限:
- 生成包含 TLS 证书和私钥的密钥库 JKS 文件。如需了解详情,请参阅为边缘本地配置 TLS/SSL。
- 将密钥库 JKS 文件复制到管理服务器节点上的目录,例如 /opt/apigee/customer/application。
- 将 JKS 文件的所有权更改为 apigee:
$ chown apigee:apigee keystore.jks
,其中 keystore.jks 是密钥库文件的名称。 - 修改 /opt/apigee/customer/application/management-server.properties,设置以下属性。如果该文件不存在,请创建它:
conf_webserver_ssl.enabled=true
# 将 conf_webserver_http.turn.off 设置为 false
# 因为许多 Edge 内部调用都使用 HTTP。
conf_webserver_http.turn.off=false
conf_webserver_ssl.port=8443
conf_webserver_keystore.path=/opt/apigee/customer/application/keystore.jks
# 请在下面输入经过混淆处理的密钥库密码。
conf_webserver_keystore.password=OBF:obfuscatedPassword
conf_webserver_cert.alias=apigee-devtest
其中 keyStore.jks 是您的密钥库文件,obfuscatedPassword 是经过混淆处理的密钥库密码。如需了解如何生成混淆密码,请参阅为 Edge On Premises 配置 TLS/SSL。 - 使用以下命令重启边缘管理服务器:
$ /opt/apigee/apigee-service/bin/apigee-serviceedge-management-server restart
Management API 现在支持通过 TLS 进行访问。
在确保 TLS 正常运行(包括确保它适用于 Edge 界面)后,您可以按照下一部分中的说明停用对 Management API 的 HTTP 访问权限。
将 Edge 界面配置为使用 TLS 访问 Edge API
在上述过程中,Apigee 建议保留 conf_webserver_http.turn.off=false,以便 Edge 界面可以继续通过 HTTP 进行 Edge API 调用。
请按以下步骤将 Edge 界面配置为仅通过 HTTPS 进行这些调用:
- 按照上述方法配置对 Management API 的 TLS 访问权限。
- 确认 Management API 的 TLS 能正常运行后,请修改 /opt/apigee/customer/application/management-server.properties,以设置以下属性:
conf_webserver_http.turn.off=true - 使用以下命令重启边缘管理服务器:
$ /opt/apigee/apigee-service/bin/apigee-serviceedge-management-server restart - 修改 /opt/apigee/customer/application/ui.properties,为 Edge 界面设置以下属性。如果该文件不存在,请创建:
conf_apigee_apigee.mgmt.baseurl="https://FQDN:8443/v1"
其中 FQDN 是完整域名(根据管理服务器的证书地址),而端口号是上面通过 conf_webserver_ssl 指定的端口。 - 只有在配置对上述 Management API 的 TLS 访问权限时,如果您使用的是自签名证书(不建议在生产环境中使用),请将以下属性添加到 ui.properties:
conf/application.conf+play.ws.ssl.loose.acceptAnyCertificate=true
否则,Edge 界面会拒绝自签名证书。 - 使用以下命令重启 Edge 界面:
$ /opt/apigee/apigee-service/bin/apigee-serviceedge-ui restart
管理服务器的 TLS 属性
下表列出了您可以在 management-server.properties 中设置的所有 TLS/SSL 属性:
媒体资源 |
说明 |
---|---|
conf_webserver_http.port=8080 |
默认值为 8080。 |
conf_webserver_ssl.enabled=false |
启用/停用 TLS/SSL。启用 TLS/SSL (true) 后,您还必须设置 ssl.port 和 keystore.path 属性。 |
conf_webserver_http.turn.off=true |
启用/停用 http 和 https。如果您只想使用 HTTPS,请保留默认值 true。 |
conf_webserver_ssl.port=8443 |
TLS/SSL 端口。 启用 TLS/SSL 后需要 (conf_webserver_ssl.enabled=true)。 |
conf_webserver_keystore.path=<path> |
密钥库文件的路径。 启用 TLS/SSL 后需要 (conf_webserver_ssl.enabled=true)。 |
conf_webserver_keystore.password= |
请使用以下格式的混淆密码:OBF:xxxxxxxxxx |
conf_webserver_cert.alias= |
可选的密钥库证书别名 |
conf_webserver_keymanager.password= |
如果您的密钥管理器设有密码,请按以下格式输入经过混淆处理的密码版本:OBF:xxxxxxxxxx |
conf_webserver_trust.all= <false | true> conf_webserver_trust.store.path=<path> conf_webserver_trust.store.password= |
为您的可信存储区配置设置。确定是否要接受所有 TLS/SSL 证书(例如,接受非标准类型)。默认值为 false。提供信任存储区的路径,并按此格式输入经过混淆处理的信任库密码:OBF:xxxxxxxxxx |
conf_webserver_excluded.crypto.suites=<CIPHER_SUITE_1CIPHER_SUITE_2> conf_webserver_include.cipher.suites= |
指明要包含或排除的任何加密套件。例如,如果您在密码中发现漏洞,可以在此处将其排除。请使用空格分隔多个密码。 如需了解加密套件和加密架构,请参阅:
http://docs.oracle.com/javase/8/docs/technotes/ |
conf_webserver_ssl.session.cache.size= conf_webserver_ssl.session.timeout= |
用于确定以下内容的整数:
|