superfly / litefs

FUSE-based file system for replicating SQLite databases across a cluster of machines
Apache License 2.0
3.92k stars 95 forks source link

password protected replication #290

Open mildred opened 1 year ago

mildred commented 1 year ago

Hi, first this seems an amazing piece of code that I just discovered. Thank you a lot.

Then, looking around, it seems that the replication HTTP endpoint is not protected. This is fine in a controlled infrastructure, but I have a use case where I would need to replicate a database over the internet and having a password protected replication endpoint is just required.

To my understanding that's just a secret token shared on all replicas, and it could be as simple as Authorization: bearer TOKEN over HTTPS.

mildred commented 1 year ago

I can suggest a PR for this if this idea is accepted.

benbjohnson commented 1 year ago

I'm open to that idea. I'd request that you make it two separate PRs though:

  1. HTTPS support
  2. Bearer Token support