-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
More borg serve restrictions for key control #1164
Comments
Makes sense
(--read-only): simple, allow no commits (or just fail on PUT/DELETE etc.) |
A question about chunk refcounting - is that managed by the server (hopefully)? Or at the very least, the writes can only make the count go up, not down, right (so disallowing prunes/deletes with --write-only is fine). |
No, that's not in the repository, but in the local cache of each client.
edited my comment above, the chunk cache sync needs data access (at least the metadata chunks, but the server can't technically tell these apart). So --wo wouldn't really work out |
I think chunk cache sync is ok? It does not rellly transfer entire chunk content to the client, just some hash (and a refcount?) - so that does not give the attacker much. |
Also if metadata chunks cannot be really told apart - cannot we force operation with no cache? After all we believe local client already has cache and does not need rebuild - this might be an ok design constraint for the usecase? |
Yes, but that's just the file metadata cache, not the refcount cache. borg-create can't work without a cache, although it could be made to cope, which would solve that part of the issue. This may actually be desirable performance-wise in a typical multi-client workload (many creates, few restores). |
I think small steps is the way? step 1: Require client to already have the chunk cache (meaning 1:1 mapping of client to repo) - for such write only mode clients only! Security requires sacrifices after all ;) |
Moved the easy part to #1168 (following the rule to not mix different stuff into 1 ticket). |
The design of borg is done around a rather simple server that doesn’t know anything about the internal structure, in encrypted mode it can’t even see any of that structure. So i think a more natural approch would be to go via encryption to keep clients from reading the data. I think the information needed for deduplication (if enabled) and the metadata needs to be readable by a client doing a backup. But if the client could store the non metadata with a session key that is asymmetrically encrypted and it does not have the key to later decrypt it, than the server can concentrate on blocking deletes and doesn’t need to care about reads. I’m not sure if the directory structure of a backup still needs to be counted as metadata here or can be seen as non-metadata. I think realistically the backup only key would still be able to get the HMAC of all chunks stored in the backup so it could still do finger printing of backuped data. |
Another relatively easy mode might be the "no-delete mode" in #1772. |
There's already borg serve path restriction.
There's some value in adding more:
--append-only (currently only option in manifest)
--write-only / --restore-only - there are some limitation about this now, but still should be possible to do something here I think.
The idea is to use ssh force-command with borg serve.
So I have a trusted key that can do everything and a key that's for regular backups - no ability (or very limited) to read stuff, no ability to delete (--write-only is not only about not reading, but delete prevention, like prune and stuff).
And possibly yet another key just for restores that cannot modify anything at all.
The text was updated successfully, but these errors were encountered: