简体   繁体   English

使用TLS / SSL保护Cassandra通信

[英]Securing Cassandra communication with TLS/SSL

We would like to protect the Cassandra against man-in-the-middle attacks. 我们想保护卡桑德拉免受中间人攻击。 Is there any way to configure Cassandra in a way that the client-server and server-server (replication) communications are SSL encrypted? 有没有办法以客户端 - 服务器和服务器 - 服务器(复制)通信进行SSL加密的方式配置Cassandra?

thank you 谢谢

short answer: no :) 简答:没有:)

For client - server : THRIFT-151 对于客户端 - 服务器: THRIFT-151

Edit: You might want to follow this thread on the ML 编辑:您可能想在ML上关注线程

Encrypted server server communication seems to be available now: 加密的服务器服务器通信现在似乎可用:

https://issues.apache.org/jira/browse/CASSANDRA-1567 https://issues.apache.org/jira/browse/CASSANDRA-1567
Provide configurable encryption support for internode communication 为节点间通信提供可配置的加密支持

Resolution: Fixed 解决方案:固定
Fix Version/s: 0.8 beta 1 修复版本:0.8 beta 1
Resolved: 19/Jan/11 18:11 决议:19 / Jan / 11 18:11

The strategy I employ is to have Apache Cassandra nodes communicate through a site to site VPN tunnel. 我采用的策略是让Apache Cassandra节点通过站点到站点VPN隧道进行通信。

Specific configurations for the cassandra.yaml file: cassandra.yaml文件的特定配置:

 listen_address: 10.x.x.x # vpn network ip
 rpc_address: 172.16.x.x. # non-vpn network for client access although, I leave it blank so that it listens on all interfaces

The benefits to this approach is that you can deploy Apache Cassandra to many different environments and you become provider agnostic. 这种方法的好处是您可以将Apache Cassandra部署到许多不同的环境中,并且您可以成为提供者无关的。 For example, hosting nodes in various Amazon EC2 environments and hosting nodes in your own physical data center and hosting a few others under your desk! 例如,托管各种Amazon EC2环境中的节点,并在您自己的物理数据中心托管节点,并在您的桌面下托管其他几个节点!

Cost an issue preventing you from looking into this approach? 成本是一个阻碍您研究这种方法的问题? Check out Vyatta ... 看看Vyatta ......

As KajMagnus pointed out, there is a JIRA ticket resolved and available in the stable version of Apache Cassandra: https://issues.apache.org/jira/browse/CASSANDRA-1567 which enables you to accomplish what you would like via TLS/SSL .. but there are a few ways to accomplish what you would like. 正如KajMagnus指出的那样,有一个JIRA票证已经解决,并且可以在Apache Cassandra的稳定版本中使用: https ://issues.apache.org/jira/browse/CASSANDRA-1567,它可以让您通过TLS /达到您想要的效果SSL ..但有几种方法可以实现您想要的。

Finally, if you want to host your instance on Amazon EC2, region to region can be problematic and although there is a patch available in 1.xx, is it really the right approach? 最后,如果您在Amazon EC2上托管您的实例,则区域到区域可能会出现问题,尽管1.xx中有可用的补丁,但它真的是正确的方法吗? I have found the VPN approach reduces latency between nodes in different regions and still maintains the necessary level of security. 我发现VPN方法可以减少不同区域中节点之间的延迟,并且仍然保持必要的安全级别。

Finally -- part 2 -- 最后 - 第2部分 -

If you want to secure client to server communications, have your clients (web servers) communicate through the same VPN .. The configuration I have: 如果您想保护客户端到服务器的通信,请让您的客户端(Web服务器)通过相同的VPN进行通信。我的配置如下:

  • Front end webservers communicate via internal network to application servers 前端Web服务器通过内部网络与应用程序服务器通信
  • Application servers sit on their own internal network and VPN network and communicate to the Data Layer via the VPN tunnel and between each other on the internal network 应用程序服务器位于其自己的内部网络和VPN网络上,并通过VPN隧道与内部网络之间的数据层进行通信
  • Data Layer exists on it's own network per Data Centre / Rack and receives requests via the VPN network 数据层存在于每个数据中心/机架的自己的网络上,并通过VPN网络接收请求

Node to Node (gossip) communication can be secured per the issue above. 根据上述问题,可以保护节点到节点(八卦)通信。 Client and server will both soon support Kerberos (In Hector master as of commit: https://github.com/rantav/hector/commit/08149a03c81b559cba5680d115943dbf334f58fa should hit Cassandra side shortly). 客户端和服务器都将很快支持Kerberos(在提交时为Hector主服务器: https//github.com/rantav/hector/commit/08149a03c81b559cba5680d115943dbf334f58fa应该很快就会遇到Cassandra方面)。

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

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