Conectando ao Elasticache Redis com TLS habilitado (criptografia em trânsito)

Nosso Discourse utiliza um cluster Redis criado no Amazon ElastiCache, o que permite ativar a criptografia em trânsito (TLS). No entanto, assim que ativamos o TLS no ElastiCache, o Discourse deixa de conseguir conectar ao Redis.

Parece que o Discourse não oferece suporte a isso, embora o cliente redis-rb ofereça, conforme mencionado em uma questão semelhante aqui: Redis::ConnectionError: Connection lost (ECONNRESET) when using ElastiCache with TLS enabled · Issue #771 · redis/redis-rb · GitHub

2 curtidas

I’m adding pr-welcome on that. Feel free to submit one @Yevhenii_Baraniuk :wink:

3 curtidas

Update: I started implementing this feature but faced the problem that hiredis driver which Discourse uses doesn’t support SSL at the moment (as for Jul 2019), though redis-rb client does. I’ll come back to the PR once the new version of hiredis is released which is going to support SSL :slight_smile:

4 curtidas

Como o hiredis está há muito tempo inativo graças ao @sam, criei esta PR que adiciona capacidades TLS às nossas conexões Redis:

Estou testando agora mesmo e está funcionando.

4 curtidas