Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TLS support for redis #1834

Closed
toriath opened this issue Jun 26, 2023 · 2 comments · Fixed by #1932
Closed

TLS support for redis #1834

toriath opened this issue Jun 26, 2023 · 2 comments · Fixed by #1932
Labels
Milestone

Comments

@toriath
Copy link

toriath commented Jun 26, 2023

Summary

As discussed in #1833 we'd like to connect shlink to redis using tls.

Passing the REDIS_SERVERS variable as tls://<host>:<port> does not seem to be sufficient for this.

@acelaya acelaya added this to the 3.7.0 milestone Nov 4, 2023
@acelaya acelaya moved this to Todo in Shlink Nov 4, 2023
@acelaya acelaya moved this from Todo to In Progress in Shlink Nov 24, 2023
@acelaya
Copy link
Member

acelaya commented Nov 24, 2023

Hey @toriath, I have been testing this, and connecting to a redis server through TLS works for me by just using tls or rediss for the server schema.

I have tried it creating a redis server in Digital Ocean, because they are exposed to the internet by default and they use encryption by default.

If I set tcp as the schema, the connection fails, so I assume it is working.

I had the intention to test with an AWS instance, but they do not seem to allow exposing ElasticCache clusters to the internet anymore, which makes debugging a bit harder for me, as I would have to set-up an EC2 instance on the VPC, SSH to it, and build all the reproduction steps there.

But I suppose there's something different on AWS side that needs extra config. Perhaps they use self-signed certificates or something like that.

Could you try running latest Shlink connecting to your redis cluster via tls, but passing the env var SHELL_VERBOSITY=3? That should print more detailed information on why the connection to redis fails.

@acelaya acelaya moved this from In Progress to In review in Shlink Nov 25, 2023
@github-project-automation github-project-automation bot moved this from In review to Done in Shlink Nov 25, 2023
@acelaya
Copy link
Member

acelaya commented Nov 25, 2023

Ok, no worries. I set-up a VPC + Elasticache server with in-transit encryption + a Shlink docker container, and verified it does not work with v3.6.4, but it works with v3.7.0-beta.1, which includes some extra changes for TLS connections 🙂

Later today or tomorrow, I'll release v3.7.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants