rage icon indicating copy to clipboard operation
rage copied to clipboard

rage-mount-dir: OverlayFS that transparently decrypts age-encrypted files

Open str4d opened this issue 3 years ago • 3 comments

Usage: rage-mount-dir -i IDENTITY [-i IDENTITY ..] DIRECTORY MOUNT_POINT

  • The caller provides a directory to be mounted, and some age identities.
  • The directory is transparently mounted at a provided destination.
  • Any *.age files inside the directory's subtree are checked for decryptability (by the given identities) on first interaction (when the directory containing the file is read).
    • If an age file can be decrypted, it is shown inside the mount point without its .age suffix, and with a filesize equivalent to the decrypted file.
    • If an age file cannot be decrypted, it is show unmodified inside the mount point.
  • On read, normal files and undecryptable age files are read as-normal, while decryptable age files are transparently decrypted.

Part of #188.

str4d avatar May 14 '21 22:05 str4d

Codecov Report

Merging #233 (6794269) into main (c028790) will decrease coverage by 2.19%. The diff coverage is 3.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   33.79%   31.59%   -2.20%     
==========================================
  Files          34       38       +4     
  Lines        3063     3307     +244     
==========================================
+ Hits         1035     1045      +10     
- Misses       2028     2262     +234     
Impacted Files Coverage Δ
age-core/src/format.rs 77.63% <ø> (+1.00%) :arrow_up:
age/src/cli_common.rs 18.18% <ø> (ø)
age/src/identity.rs 48.68% <ø> (ø)
rage/src/bin/rage-mount-dir/main.rs 0.00% <0.00%> (ø)
rage/src/bin/rage-mount-dir/overlay.rs 0.00% <0.00%> (ø)
rage/src/bin/rage-mount-dir/reader.rs 0.00% <0.00%> (ø)
rage/src/bin/rage-mount-dir/wrapper.rs 0.00% <0.00%> (ø)
rage/src/bin/rage-mount/main.rs 1.85% <ø> (ø)
rage/src/bin/rage/main.rs 100.00% <ø> (ø)
age/src/encrypted.rs 50.00% <55.55%> (+5.91%) :arrow_up:
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c028790...6794269. Read the comment docs.

codecov[bot] avatar May 14 '21 22:05 codecov[bot]

I think this looks awesome. What are your blockers? It looks like this is mainly stubs. Was it just lack of interest that stopped you from pursuing this change?

Also, I'm not sure why you have fuser and fuse_mt as deps; shouldn't one be sufficient?

dmadisetti avatar Mar 30 '24 00:03 dmadisetti

If I recall correctly (and I probably don't), I ran into UX issues that I didn't have time to figure out a solution for at the time. And as this was not motivated by any personal use case (someone else suggested the idea, and I wanted to see what it would look like in practice), I ended up putting it aside as I worked on other things.

As of the time of this PR, fuser was single-threaded; fuse_mt was a wrapper around it that provides multi threading support. I don't believe that has changed in the intervening time, but I haven't checked recently.

str4d avatar Mar 30 '24 02:03 str4d