You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/04 02:12:16 UTC

[GitHub] [rocketmq] zergduan commented on issue #4527: Some questions about TLS enable in Configuration_TLS.md

zergduan commented on issue #4527:
URL: https://github.com/apache/rocketmq/issues/4527#issuecomment-1173262690

   @lizhanhui  非常感谢您的关注
   
   应该是我前面没说清楚,我把我的需求和步骤明确以下,请您指点:
   
   我的需求是配置一个做client-verify-server's certificate的RocketMQ集群,且这个认证只发生在 Producer 或 Conmuser 与 Namsrv 或 Broker 交互时(Namesrv、Broker之间交互不做任何认证)
   
   按照我的理解,为了实现这个目标,需要做以下几点:
   
   a. 在服务端设置参数 tls.server.need.client.auth=none 来关闭 server-verify-client's certificate  # 此处是我不能确定的地方,有可能我理解错了,请指教
   即在服务端设置如下JVM参数:tls.server.mode=permissive tls.config.file=/opt/xxx,在xxx文件中配置如下参数:
       tls.test.mode.enable=false
       tls.server.need.client.auth=none
       tls.server.keyPath=/opt/server.key
       tls.server.keyPassword=123456
       tls.server.certPath=/opt/server.pem
   将服务器证书,中间根证书,根证书合并到 server.pem;用pkcs8将私钥打包加密为server.key;将2个文件复制到/opt目录下
   
   b. 在客户端设置 tls.enable=true 确保客户端发起TLS连接,设置 tls.client.authServer=true 确保客户端验证服务端服务器证书的有效性
   即在客户端设置参数:-Dtls.client.authServer=true -Dtls.enable=true -Dtls.test.mode.enable=false -Dtls.config.file=/opt/yyy,在yyy文件中配置如下参数:
      tls.client.trustCertPath=/opt/ca.pem
   将根证书ca.pem文件复制到/opt目录下
   
   梳理一下
   
   服务端(Broker、Namesrv)的设置:
   JVM Option:-Dtls.server.mode=permissive -Dtls.config.file=/opt/xxx
   xxx文件内容:
   >     tls.test.mode.enable=false
   >     tls.server.need.client.auth=none
   >     tls.server.keyPath=/opt/server.key
   >     tls.server.keyPassword=123456
   >     tls.server.certPath=/opt/server.pem
   
   客户端(Producer、Consumer)的设置:
   JVM Option:-Dtls.client.authServer=true -Dtls.enable=true -Dtls.test.mode.enable=false -Dtls.config.file=/opt/yyy
   yyy文件内容:
   >    tls.client.trustCertPath=/opt/ca.pem
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org