pglombardo / PasswordPusher

🔐 Securely share sensitive information with automatic expiration & deletion after a set number of views or duration. Track who, what and when with full audit logs.
https://docs.pwpush.com
Apache License 2.0
1.99k stars 343 forks source link

Redis backend planned? #241

Open neuroserve opened 2 years ago

neuroserve commented 2 years ago

Hi *,

I was wondering whether it would be possible to have a redis backend for pwpush. Redis seems to be more suited for cloud environments and high-available setups. Obviously every replicating backend, which is "easy" to setup and operate would be nice. Is there something like that or is an SQL-backend required?

pglombardo commented 2 years ago

Hi @neuroserve - this is the first request for this honestly.

I'd be open to adding support for this but with a few quick google searches, it doesn't seem easy to just swap out the backend transparently. If that's the case, we would have to add conditional Redis driver calls throughout the app which is less than ideal. Also, since I'm the only maintainer I try to limit feature creep so the project remains maintainable.

With all of that said, I'll look into this a bit more.

On the other side, we provide a postgres setup with Docker compose. Is that problematic for you to use or is it just a preference?

neuroserve commented 2 years ago

Well, I try to deploy pwpush in a container/cloud environment, where I need a resilient, distributed backend which can tolerate node failures. It would be easy to deploy two frontends for tls-handling, two pwpush-containers and use a redis cluster as a backend.

With postgres you'd have to configure replication and in case of a node failure automatic failover could only be provided by using something like patroni (https://github.com/zalando/patroni).

I haven't looked into it and I cannot fathom the amount of work - but I'd thought, that the request should have come up earlier :-)