django-websocket-redis icon indicating copy to clipboard operation
django-websocket-redis copied to clipboard

Handle ssl connections

Open gtnx opened this issue 7 years ago • 4 comments

As far as i understand, it looks impossible to use this library with SSL redis connections.

The reason is that settings.WS4REDIS_CONNECTION is used to instantiate:

The reason is that those two objects does not have the same signature for handling ssl connections:

I propose to use one of the two conventions (the ssl flag for instance which is easier to understand) and adapt code in wsgi_server.py.

What do you think?

gtnx avatar Dec 17 '18 20:12 gtnx

from my point of view, I never saw the need to connect Redis through SSL, since it typically runs on the same host as the application server. How is your use-case / architecture?

jrief avatar Dec 17 '18 21:12 jrief

In our usecase, we use a managed Redis on Azure platform. By default Azure, only opens the 6380 port (dedicated to SSL connections. We don't want to use non-ssl port (6379) as we don't have a private network in this usecase.

gtnx avatar Dec 18 '18 08:12 gtnx

OK. This is a really valid use-case. I would have to dig into this topic. Do you have time to create a pull-request?

jrief avatar Dec 19 '18 09:12 jrief

Yes i'll do it today

gtnx avatar Dec 19 '18 09:12 gtnx