简体   繁体   English

如何使用Cassandra的Node.js驱动程序配置sslOptions?

[英]How to configure sslOptions using Node.js driver for Cassandra?

I'm running Cassandra 3.9. 我正在运行Cassandra 3.9。

I refered to Connect to Cassandra Apache with SSL using cassandra-driver in Node.js before I created this post, but I couldn't solve my problem. 在创建本文之前,我曾在Node.js中使用Cassandra-driver提到了使用SSL连接到Cassandra Apache ,但是我无法解决问题。

I followed along this datastax documentaion to enable SSL encryption for node-to-node and client-to-node. 我遵循了此datastax文档,以对节点到节点和客户端到节点启用SSL加密。

I don't have .pem files that are assigned to key , cert , and ca as described in the referred post. 我没有如引用的文章所述分配给keycertca .pem文件。

All files I got after following the datastax documentation were gen_rootCa_cert.conf , rootCa.crt , rootCa.key , rootCa.srl , 54.112.38.22.csr , 54.112.38.22.crt_signed , 54.112.38.22.jks , server-keystore.jks , and server-truststore.jks . 我遵循datastax文档后得到的所有文件都是gen_rootCa_cert.confrootCa.crtrootCa.keyrootCa.srl54.112.38.22.csr54.112.38.22.crt_signed54.112.38.22.jksserver-keystore.jks ,和server-truststore.jks

Do I need to create other files such as those .pem files for sslOptions to work? 我是否需要创建其他文件(例如那些.pem文件)才能使sslOptions正常工作?

If the existent files are all I need, which file should be assigned to which option? 如果我只需要现有的文件,应该将哪个文件分配给哪个选项?

Do this. 做这个。

var fs = require("fs");
var sslOptions = {
  key : fs.readFileSync("./rootCa.key"),
  cert : fs.readFileSync("./rootCa.crt")
};

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

相关问题 如何使用node.js驱动程序在Cassandra中设置一致性级别? - How to set the consistency level in Cassandra using node.js driver? 使用用于node.js的cassandra驱动程序将映射插入到cassandra中 - insert map into cassandra using cassandra-driver for node.js 查询参数格式为SELECT ... IN与Cassandra使用Node.js驱动程序 - Query Parameter Format for SELECT … IN with Cassandra using Node.js Driver 如何使用 Node.js Cassandra 驱动程序运行连续查询? - How to run consecutive queries with Node.js Cassandra driver? Cassandra目前的Node.js驱动程序是什么? - What is the current Node.js driver for Cassandra? 是否有 Cassandra node.js 驱动程序的替代品? - Are there alternatives to the Cassandra node.js driver? 使用Node.js中的cassandra-driver通过SSL连接到Cassandra Apache - Connect to Cassandra Apache with SSL using cassandra-driver in Node.js 有没有办法使用 Cassandra Node.js 驱动程序的内置映射器来获取带有分页的文档? - Is there any way to fetch documents with pagination using the Cassandra Node.js driver's built-in mapper? Cassandra Node.js 驱动程序 - 可以切换允许过滤吗? - Cassandra Node.js driver - possible to toggle ALLOW FILTERING? 在 Cassandra node.js 驱动程序中使用中等大小的 fetchSize 时出现帧流错误 - Frame stream error when using medium-sized fetchSize in Cassandra node.js driver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM