Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
Lustre 2.14.0, Lustre 2.15.0
-
None
-
9223372036854775807
Description
It should be possible to use "lfs migrate" and "lfs mirror extend/resync" of encrypted files, even if the process does not have access to the key. There is no need for these operations to actually understand the file data, only to read the data in whole-chunk units and then write it to a new file copy/mirror before updating the file layout.
Barriers to handling this properly are:
- need to be able to open() the encrypted file without a key, since this currently returns -ENOKEY to callers, so that they don't accidentally try to read/write unintelligible data. This could be handled with a special open flag (e.g. something similar to O_LOV_DELAY_CREATE for tools that know what they are doing. This should be done with an llapi_file_open_fscrypt() helper to isolate the logic in case it needs to be changed in the future.
- data tools should always read/write the full 4KB chunk of encrypted data. IMHO, this should imply that the file size is always reported to userspace rounded up to the next 4KB chunk size. That shouldn't affect processes that have the key, and helps somewhat to avoid fingerprinting files based on their size.
For file backup/restore, the tools would also need to be able to read/save/restore the unique salt/nonce stored with the file so that the file can later be decrypted again. Special considerations are needed when restoring an encrypted file, since it is typically not possible to create "unencrypted" files in a directory with an encryption key, and similarly setting an encryption key on a non-empty directory is not possible. As such backup/restore of cyphertext files should be handled in a separate ticket. In the meantime, it would be possible to backup restore encrypted files in plaintext (presumably to a medium that is itself encrypted) if the backup tools have access to a master key added to each fscrypt directory key).
Attachments
Issue Links
- is related to
-
LU-16091 Set S_ENCRYPTED flag on OST objects for encrypted files
- Resolved
-
LU-12275 Client-side file data encryption
- Resolved
-
LU-13717 Client-side encryption - support file name encryption
- Resolved
-
LU-15790 Fix mirror read/write in Test Plan for File Name Encryption Feature
- Open
- is related to
-
LU-16374 Implement backup/restore of encrypted files
- Open