-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request] encrypted send of unencrypted datasets #10484
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Pipe the output of zfs send through openssl. There is no particular way for zfs send, itself, to encrypt an unencrypted dataset (although it would be possible, I suppose, to have the output of zfs send be encrypted, but this would essentially be the same as piping through openssl). |
well, no, because piping it into openssl doesn't make it an encrypted filesystem on the receiving end. it's just an encrypted file, that will decrypt into a plaintext filesystem. the user is asking for a way to make an encrypted ZFS dataset from an unencrypted one on-the-fly on the sending side, so that the receiver is blind to it. it would be more like i imagine this wouldn't be very maintainable long term, and probably not very useful. if you encrypt data as it sends, do you provide the key every time so the incrementals work? is it just for a full send and not supported by incrementals? it seems like a mess. maybe just abandon LUKS and use native encryption the whole way through. |
@kithrup Well, you got it. "There is no particular way for zfs send, itself, to encrypt an unencrypted dataset" <- Thus, this feature request. So what is unclear? @misterbigstuff
Exactly!
This is not a solution, when FDE is explicitely wanted. Correct me if I'm wrong, but AFAICT ZFS does not encrypt metadata and does not protect from modification (adding, removing volumes) but just encrypts volumes.
That would be a requirement, yes. A wrong key would have to be rejected.
If designed carefully, it's not a mess at all. Just because it is impossible to fulfill any wishable use-case, it's not a mess. There are always limitations. |
well, then you can use FDE under ZFS encryption with the associated performance penalty, for the benefit of a much simpler system. |
@misterbigstuff I don't get what you mean by "FDE under ZFS encryption" Edit: got it... still not really awake today ;) Yeah, ofc that would be possible but adds the mentioned performance penalty |
well encrypting things on the fly isn't going to be free from a performance standpoint either.. it's definitely not free from a code maintenance perspective. |
Yes, that is right. At least it's better to have the performance "problem" only when doing the send instead of at runtime. irt maintenance I can't tell tbh. I had a short look on the |
This comment has been minimized.
This comment has been minimized.
From my understanding of the openzfs crypto scheme, there is a UX problem with this: [edit: wrong and unrelated stuff removed] Edit: Ah, your OP mentions it:
So I assume you'll want to incrementally send your backup dataset multiple times. How/where should ZFS store the encryption keys on the sending side? BTW:
This is a symptom of a user who requested Github to delete all their posts (apparently/allegedly after getting suspended), the 404ing user mention and dialogues turned monologues are a good hint :) |
This comment has been minimized.
This comment has been minimized.
I would second this request. As I am also in the same situation right now. I want an offsite backup on an untrusted location and can't shift around my datasets as they are too big. Even if I would be willing to accept the double performance hit of LUKS + ZFS enc. Can't the "how to store the keys" be solved by maybe also specifying a seed for this use case? |
I also need this feature. To avoid polluting the existing tools, a new tool e.g. zfspipe could be created. e.g. So for example:
(with the appropriate selection of the usual creation options from zfs create) then, anytime the unencrypted data needs to be sent encrypted:
In terms of implementation, zfspipe would take then stream, receive it as recv would, (and so add encryption) but instead of writing it out to real blocks, it would repackage it into another send stream. Initial thoughts with regard to maintaining it; main question;
I've not looked in full details of the implementation as to how feasible this is, so looking for feedback from someone who knows the codebase well. But thoughts/comments? If it looks feasible, and sensible I'll put the time into working exact details/implementing. |
I like the idea of having a separate tool. Maybe this can be added to zstream? https://openzfs.github.io/openzfs-docs/man/master/8/zstream.8.html |
It would be great to be able to locally encrypt plaintext datasets on the sending side, so that the receiving side does not have to know the secrets. This is mainly useful for sending backups from LUKS-encrypted systems (ZFS on LUKS) to lesser-trusted systems.
This feature was requested before in #7966 but is closed for unknown reasons (not even the "closed" message is there and posts seem to be missing o.O).
The text was updated successfully, but these errors were encountered: