# TLS（転送中暗号化）を有効にした Elasticache Redis への接続

**URL:** https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031
**Category:** Feature
**Tags:** pr-welcome
**Created:** [2019 年 7 月 3 日午後 6:52 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031 "2019-07-03T18:52:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Yevhenii\_Baraniuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yevhenii_baraniuk/32/148388_2.png) [@Yevhenii\_Baraniuk](https://meta.discourse.org/u/Yevhenii_Baraniuk)
#### Post date: [2019 年 7 月 3 日午後 6:52 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031/1 "2019-07-03T18:52:41Z")

</div>

当社の Discourse は、Amazon ElastiCache で作成された Redis クラスターを使用しており、転送中の暗号化（TLS）を有効にできます。しかし、ElastiCache で TLS を有効にすると、Discourse は Redis に接続できなくなります。

redis-rb クライアントは対応しているようですが（類似のIssue [Redis::ConnectionError: Connection lost (ECONNRESET) when using ElastiCache with TLS enabled · Issue #771 · redis/redis-rb · GitHub](https://github.com/redis/redis-rb/issues/771#issuecomment-411542148) を参照）、Discourse 自体はこの機能に対応していないようです。

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2019 年 7 月 10 日午後 9:01 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031/4 "2019-07-10T21:01:30Z")

</div>

#pr-welcome を追加しました。@Yevhenii_Baraniuk さん、ぜひ提出してくださいね 😉

---

<div class="post-metadata">

### Author: ![Yevhenii\_Baraniuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yevhenii_baraniuk/32/148388_2.png) [@Yevhenii\_Baraniuk](https://meta.discourse.org/u/Yevhenii_Baraniuk)
#### Post date: [2019 年 7 月 14 日午前 10:33 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031/5 "2019-07-14T10:33:44Z")

</div>

更新：この機能の実装に取り掛かりましたが、Discourse が使用している hiredis ドライバーは現時点（2019 年 7 月現在）では SSL をサポートしていないという問題に直面しました（redis-rb クライアントはサポートしています）。SSL をサポートする hiredis の新バージョンがリリースされ次第、PR に戻ります 🙂

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020 年 3 月 5 日午後 10:29 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031/6 "2020-03-05T22:29:38Z")

</div>

@sam 氏のおかげで hiredis が長らく機能しなくなったため、Redis 接続に TLS 機能を追加するこの PR を作成しました。

> <https://github.com/discourse/discourse/pull/9119>

現在テスト中ですが、正常に動作しています。

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2023 年 1 月 4 日午後 8:55 UTC](https://meta.discourse.org/t/connecting-to-elasticache-redis-with-tls-enabled-in-transit-encryption/122031/8 "2023-01-04T20:55:04Z")

</div>


