litefs icon indicating copy to clipboard operation
litefs copied to clipboard

Ability to disable import via file copy

Open ralferoo opened this issue 1 year ago • 3 comments

I was previously experimenting with litestream, and finally got a chance to experiment with litefs this afternoon. Was just trying out some basic configuration, and noticed the newly added import file functionality: https://github.com/superfly/litefs/issues/192

Whilst, this does seem incredibly useful for bootstrapping data onto a server, as it's currently implemented it seems incredibly dangerous. As I understand the model, previously a primary would be truly the only master, and non-primaries would only be limited to read-only, but now any client can destroy and invalidate any of the databases on the primary. This means if any client node is compromised, they can destroy the databases on the primary and any copies on all the other clients.

Ideally, the config file should be able to specify a list of databases that shouldn't be re-importable, but a quick fix would just be a config option to completely disable imports.

ralferoo avatar Jan 06 '23 17:01 ralferoo