quirrel-dev / quirrel

The Task Queueing Solution for Serverless.
https://quirrel.dev
MIT License
896 stars 66 forks source link

Use Redis with TLS #1031

Closed ghost closed 2 years ago

ghost commented 2 years ago

Feature Request

Is your feature request related to a problem? Please describe.

The redis SaaS offering I am using requires tls connections. Afaik there currently is no option to pass a ca certificate to be used in ioredis.

Describe the solution you'd like

The optimal solution for me would be if one could set an environment variable REDIS_TLS_CA_FILE, that is being picked up by ioredis.

Describe alternatives you've considered

Not using redis with tls, or setting NODE_TLS_REJECT_UNAUTHORIZED to ioredis doesn't complain about a self signed certificate.

Teachability, Documentation, Adoption, Migration Strategy

https://github.com/luin/ioredis#tls-options

Skn0tt commented 2 years ago

Hi @boredland-ioki! Sounds like a good addition, would you like to contribute a PR for it? I think this is the code that would need to be extended:

https://github.com/quirrel-dev/quirrel/blob/2feba926bc3836a4f0cb40f63b3ffe65aa9ee2eb/src/api/shared/create-redis.ts#L20

I can also make a PR for it, just let me know :)

boredland commented 2 years ago

Sure, will do!