在路由器和消息处理器之间配置 TLS

Edge for Private Cloud v4.18.01

默认情况下,路由器和消息处理器之间的 TLS 处于停用状态。

请按照以下步骤在路由器和消息处理器之间启用 TLS 加密:

  1. 确保路由器可以访问消息处理器上的端口 8082。
  2. 生成包含 TLS 认证和私钥的密钥库 JKS 文件。如需了解详情,请参阅为边缘本地配置 TLS/SSL
  3. 将密钥库 JKS 文件复制到消息处理器服务器上的目录,例如 /opt/apigee/customer/application
  4. 更改 JKS 文件的权限和所有权:
    > chown apigee:apigee /opt/apigee/customer/application/keystore.jks
    > chmod 600 /opt/apigee/customer/application/keystore.jks


    其中,keystore.jks 是密钥库文件的名称。
  5. 修改文件 /opt/apigee/customer/application/message-processor.properties。 如果该文件不存在,请创建该文件。
  6. 显示奖励。






    conf/message-processor-communication.properties+local.http.ssl.keystore.password=OBF:obsPword


    其中,keyStore.jks 是您的密钥库文件,obsPword 是您的经过混淆处理的密钥库和密钥别名密码。如需了解如何生成经过混淆处理的密码,请参阅为 Edge On Premises 配置 TLS/SSL
  7. 确保 message-processor.properties 文件归“apigee”用户所有:
    > chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  8. 停止消息处理器和路由器:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
    /opt/apigee/apigee-service/bin/apigee-service edge-router stop
  9. 在路由器上,删除 /opt/nginx/conf.d 中的任何文件:
    > rm -f /opt/nginx/conf.d/*
  10. 启动消息处理器和路由器:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
    /opt/apigee/apigee-service/bin/apigee-service edge-router start
  11. 对任何其他消息处理器重复上述步骤。

在路由器和消息处理器之间启用 TLS 后,消息处理器日志文件包含以下 INFO 消息:

MessageProcessorHttpSkeletonFactory.configureSSL() : Instantiating Keystore of type: jks

此 INFO 语句将确认 TLS 是否在路由器和消息处理器之间正常工作。

下表列出了 message-processor.properties 中的所有可用属性:

媒体资源

说明

conf_message-processor-communication_local.http.host=<localhost or IP address>

可选。要监听路由器连接的主机名。这会覆盖注册时配置的主机名。

conf/message-processor-communication.properties+local.http.port=8998

可选。供路由器连接监听的端口。默认值为 8998。

conf_message-processor-communication_local.http.ssl=<false | true>

将此值设为 true 可启用 TLS/SSL。默认值为 false。启用 TLS/SSL 后,您必须设置 local.http.ssl.keystore.pathlocal.http.ssl.keyalias

conf/message-processor-communication.properties+local.http.ssl.keystore.path=

密钥库的本地文件系统路径(JKS 或 PKCS12)。local.http.ssl=true 时必须指定。

conf/message-processor-communication.properties+local.http.ssl.keyalias=

密钥库中的密钥别名,将用于 TLS/SSL 连接。local.http.ssl=true 时必须指定。

conf/message-processor-communication.properties+local.http.ssl.keyalias.password=

用于加密密钥库中密钥的密码。请使用经过混淆处理的密码,格式如下:OBF:xxxxxxxxxx

conf/message-processor-communication.properties+local.http.ssl.keystore.type=jks

密钥库类型。目前仅支持 JKS 和 PKCS12。默认值为 JKS。

conf/message-processor-communication.properties+local.http.ssl.keystore.password=

可选。密钥库的经过混淆处理的密码。请使用经过混淆处理的密码,格式如下:OBF:xxxxxxxxxx

conf_message-processor-communication_local.http.ssl.cryptos=<crypto1,crypto2>

可选。配置后,只能使用列出的加密方式。如果省略,请使用 JDK 支持的所有加密方式。