borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
1.95k stars 130 forks source link

Password stored in clear on disk + clear passwords database file remains as a leftover file after Vorta uninstall #1361

Closed RoGeorge closed 2 years ago

RoGeorge commented 2 years ago

My setup is Kubuntu 20.04 LTS with latest updates, autologin is on, KDE Wallet subsystem is disabled Borg was installed with "sudo apt install borgbackup". Vorta was installed with "pip3 install vorta".

Steps to reproduce:

  1. Disable KDE Wallet from Kubuntu, by opening "KDE Wallet" GUI and uncheck the "Enable the KDE wallet subsystem" checkbox in the "Wallet Preferences" tab and apply the changes.
  2. Install 'sudo apt install borgbackup pip3 install vorta'
  3. Open Vorta, create a new backup repository, leave all GUI settings default
  4. Unlink the repository or delete the repository folder
  5. Uninstall Vorta 'pip3 uninstall vorta'
  6. Go to file ~/.local/share/Vorta/settings.db and browse the content of its database table called 'repopassword'. The password used at step 3 can be read in clear, as a record in that table

Issues:

m3nu commented 2 years ago

Passphrase storage in the database is a fallback, if no better option is available.

Settings are preserved, since you could just reinstall Vorta some other way.

The passphrase is preserved, since losing it will cut you off from your backups. I don’t see an issue with this for our system keychain integrations.

I do see why you take issue with it ending up in a settings DB (though Borgmatic also does this). So we would probably merge a simple PR that removes the passphrase IF the fallback to the settings DB is used.

RoGeorge commented 2 years ago

For issue 1, pass stored in clear, my guess is there are already ways to avoid that and still use SQLite as storage, but I've never tried.

Preserving the passphrase or else by losing it one will be cut off from all backups doesn't hold as an argument, since a failure of home disk will also render all the backups useless, therefore the end user must know the password for each borg repo.

This issue was open more as a FIY than as bug, its point is: storing passwords in clear should be avoided. Thank you for considering it.

m3nu commented 2 years ago

Agree that it should be avoided. That’s why we added support for most Linux and macOS system keychains.