cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
94 stars 35 forks source link

Add DirectoryCheck result indicating the dirId file is missing #128

Closed infeo closed 2 years ago

infeo commented 2 years ago

With #127 merged, it is benefical for a cipher directory to have a dirid file increasing the overall resiliency of the vault structure against data loss.

But in the preceding #118, we decided to not automatically migrate already existing directories in a vault. To allow the user to still benefit from the change, we can add a directory check result MissingDirIdFile with INFO error level and the fix to add such file.

overheadhunter commented 2 years ago

INFO error level and the fix to add such file

not sure, if this is possible right now. I believe we decided that "INFO" doesn't need any fix, "WARN" has a fix, and "ERROR" is unfixable

infeo commented 2 years ago

I hesitate elevating it ot WARN since the dirId file is an "optional feature" and a vault works fine without it.

overheadhunter commented 2 years ago

I'm totally with you, however I'm wondering if our application logic is built around these severity levels and changing it will make things more complicated.

infeo commented 2 years ago

How about the following perspective?

Creating a dirId backup is an optional feature for a cryptofs implementation. But then also the health check looking for the file is an optional feature (or better, it is the same feature). From this point of view, it it totally legit creating warnings, because this cryptofs impl implements the feature.