-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New feature] Client/Server model and pull backup #69
Comments
That's funny, because before stepping over resticprofile, I was thinking that it would be nice to have a server to manage restic configuration and clients that securely connect to the server to apply it on endpoints. Combined with a management web UI (for admins) to control auth, clients and settings, and a self-service UI (for endpoints) to restore data from snapshots. Some thoughts:
Design considerations:
|
While it is a side effect when backup schedules are controlled by a central unit, I'd like to add that push based scheduling allows to use backup queues per repository that control backup concurrency and limit load. E.g. a profile with a schedule of "Every day at 12:00" could run on a larger amount of endpoints when only some endpoints may run the backup concurrently. This can even make sense with a hand-full of endpoints when the repo is something like a consumer NAS. |
It looks like we do have similar ideas 😄
This one is tricky though:
|
I'd not strip down security just because someone could have the impression that it can be used securely without VPN. Personally I do not trust my own network since any desktop (or server) could get infected and attack others to some extent. If it can be done in a secure way and still work quite simple (e.g. public key exchange using a key that is not too long when string encoded), I'd use that but still mention that it is not a good idea to use it without VPN or similar. |
Winter is coming so I'll have a bit more time at the week-ends: I'll start preparing a design document 😄 |
Same here (regarding time :)). Wanted to create a quick prototype on HTTP(S)+Websockets+SSH (SSH via Websockets for identification, commands & logs, HTTP/S for everything else). Was thinking about the communication part a bit and while client-certs can be a solution to identify agents uniquely, using HTTPS only means that middle boxes or proxies may create issues (technical and data protection). Embedding SSH with websockets allows to use something proven that is secure even when outer transfer is only HTTP. Nevertheless my aim is just to test whether this works well without heavy externals dependencies. It should not mean that this has to be the way to go. |
Funny enough I was doing a quick PoC the other day: transparent AES encryption over HTTP. I'm not sure how usable it actually is, but it's very simple: https://github.com/creativeprojects/encryption |
Randomly, I just found this discussion 🤔 restic/restic#299 |
Thanks a lot for reference. My (somewhat biased) takeaways are: There is a demand for a pull based system and it may be sufficient to use a remote shell for this. While both client and backup-server must be protected its important that a client has minimal access to the backup so that malicious software cannot easily do harm. For the same reasons the repository should not require to be reachable in the same (e.g. public) network as where the client sits. I'd add that it is also very crucial that the client has to be protected to avoid take over or dataloss so a too permissive remote shell or even a homegrown remote-fs doesn't sound like a good plan. While it seems there is something going on @ restic/restic with regards to pulling from remote sources, I think for |
As a quick wrap-up this is what I think would be required when we choose to support remote shells: General
Security
Usability
Under the assumption that the best match for a remote shell is SSH to begin with, the only disadvantages I see is supporting Windows and Desktops as in both cases SSH is uncommon. |
I think I like this version better than the original idea: With this, no need to create a separate service, install it on a client and wait for requests. All we need is allowing SSH to the machine. There's openSSH included in Windows 10 now (maybe starting with pro I don't know, but I had it on my Windows laptop at my previous job) We could also implement ephemeral keys: the server creates a new repository key before sending it to the client and destroys it after the backup is finished. Although if the attacker already has access to the client, it could potentially intercept the backup request and steal the key. Still, that's another level of protection to go through. |
Quick ideas: https://github.com/creativeprojects/resticprofile/wiki/Design Are you able to update the wiki? (I never used that feature before) |
I've not used it either. Looks like I can clone it but not push. Also have no buttons for editing. |
Today, all the backup operations are initiated by the client (push).
What if you would want a backup server asking for files from the clients? (pull).
I'm opening this issue as a discussion around the client/server model: a resticprofile server could wait for commands to trigger a backup, via a simple REST API.
Is it a good idea?
The text was updated successfully, but these errors were encountered: