简体   繁体   English

是否可以在deepstream.io中使用双向TLS?

[英]Is it possible to use mutual TLS with deepstream.io?

I'd be interested in using mutual TLS between deepstream.io server and deepstream.io-client-js clients. 我会对在deepstream.io服务器和deepstream.io-client-js客户端之间使用双向TLS感兴趣。 I know deepstream.io's tutorials mention leaving SSL termination to a load balancer like Nginx or HAproxy, but how do I use deepstream.io client to give the appropriate client certificate? 我知道deepstream.io的教程提到将SSL终止留给Nginx或HAproxy等负载均衡器,但是如何使用deepstream.io客户端提供适当的客户端证书?

After some research I found that you can construct the client with options and one of the options is called nodeSocketOptions . 经过研究,我发现您可以使用选项构造客户端,其中一个选项称为nodeSocketOptions This object is used when constructing the underlying websocket, so here you can give it the cert, ca and key, thus enabling mutual tls from client side. 在构造基础Websocket时使用此对象,因此在这里可以给它提供cert,ca和key,从而从客户端启用相互tls。

const deepstream = require('deepstream.io-client-js'); 
const client = deepstream('localhost:6020', options).login();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM