【问题标题】:Connect to AWS ElastiCache with In-Transit Encryption使用传输中加密连接到 AWS ElastiCache
【发布时间】:2018-05-18 00:23:09
【问题描述】:

具有加密功能的 ElastiCache 使用 TLS 与 redis 客户端通信,但正如我所见,所有语言(ioredis、predis、go-redis)的 redis 客户端在将客户端配置为我们的 TLS 时都需要一个 pem 文件。

如何在不提供 TLS 证书的情况下通过传输中加密连接到 Elasticache?

【问题讨论】:

  • 我对 elasticache 或 redis 一无所知,但不知何故,客户端必须对自己进行身份验证,否则任何人都可以连接到您的 elasticache 实例。
  • 受限于具有特定 vpc 子网的安全组
  • 我也有这个问题。该文档没有提及任何有关传输中加密证书的信息...docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/…
  • 答案在以下链接中提供:stackoverflow.com/questions/51660056/…
  • @JoseMiguelColella 是同样的答案,我在二月份回答了这个问题

标签: amazon-web-services encryption redis amazon-elasticache


【解决方案1】:

这是我使用 Predis 的工作演示代码。

$servers = ['tls://master.my-test-redis.8juowe.euw2.cache.amazonaws.com:6379']; // your endpoint
$options = ['parameters' => ['password' =>   $password ]]; // put your password here
$redis   = new Predis\Client($servers, $options ); // Instance your client

【讨论】:

  • 我有一个疑问,我们如何单独使用 enpoint 进行连接,是否需要指定访问 aws 的密钥和密钥
【解决方案2】:

解决方案 - 不需要证书,只是为了在客户端启用 TLS(例如,ioredis 只是拥有tls: {}

【讨论】:

  • 这个答案对于启用了传输中加密的 AWS ElasticCache 是否仍然有效?我正在尝试通过 Ruby 或 NodeJS 客户端(ioredis 和 redis 包)连接到我的集群,并且不断从服务器获取 ECONNRESET。当我将 stunnel 与 redis-cli 一起使用时,一切都可以连接并且工作正常......
  • 我使用过中途和中途。两者都有效。带有空白 tls 的 ioredis 开箱即用。我还询问了亚马逊的支持,他们就是这么说的
猜你喜欢
  • 2019-01-10
  • 2018-12-29
  • 2019-02-09
  • 2015-12-22
  • 2021-03-16
  • 2020-08-13
  • 2019-09-12
  • 2018-12-04
  • 2020-10-26
相关资源
最近更新 更多