rrss2imap icon indicating copy to clipboard operation
rrss2imap copied to clipboard

Securely store the password using the keyring crate

Open rudi opened this issue 5 years ago • 7 comments

NOTE: In order to compile on (Ubuntu) Linux, I had to install libdbus-1-dev. Tested on macOS, Windows, Ubuntu Linux.

  • Store a plain-text placeholder in config.json, with instructions on how to overwrite the stored password.

  • In case config.json contains a password value other than the placeholder, use that value, store it in the keyring at the end, and store the placeholder in config.json.

  • In case storing the password in keyring fails, store it in config.json as before.

rudi avatar May 31 '20 20:05 rudi

The Linux build is failing because libdbus-1-3 is not installed (see https://github.com/diwic/dbus-rs#requirements); I'll see if I can google a solution to that one.

rudi avatar May 31 '20 21:05 rudi

With the latest commit, the build fails only on the raspberry pi, where -ldbus-1 doesn't find the dbus library even though it should be installed according to the build log. Since I don't have such a system available, it's hard to debug this right now.

rudi avatar May 31 '20 22:05 rudi

WOW This one is awesome! I didn't know such a secure storage existed in a "portable" way. As I use rrss2imap on my raspberry on a daily basis, I'll also take a look in order to have it working, because I find that really interesting.

Riduidel avatar Oct 08 '20 17:10 Riduidel

Damn, there are conflicts! Can you please do the merge sacrifice ? Anyway, I'm taking a look at docs regarding keyring, DBus, secrets service and all that stuff. This article (https://rtfm.co.ua/en/what-is-linux-keyring-gnome-keyring-secret-service-and-d-bus/) is rather complete on that subject, and I hope it will drive me to a solution that may work on Raspbian.

Riduidel avatar Oct 12 '20 16:10 Riduidel

ok, all this relies upon the presence of libdbus, as far as I understand. Hopefully, it is possible to instal it : https://raspberrypi.stackexchange.com/a/100460 Can you update the github action script to install these dependencies on raspbian ?

Riduidel avatar Oct 12 '20 16:10 Riduidel

ok, all this relies upon the presence of libdbus, as far as I understand. Hopefully, it is possible to instal it : https://raspberrypi.stackexchange.com/a/100460 Can you update the github action script to install these dependencies on raspbian ?

libdbus-1-3 and libdbus-1-dev should already be installed on all Linux test systems, as per the changes in .github/workflows/on_push.yml.

Sadly, the linker still fails on raspberry pi with the message note: /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldbus-1

rudi avatar Oct 16 '20 16:10 rudi

Can you add a apt list | grep libdbus-1 step to the linux targets ? We will be able to make sure the libdbus-1-dev library is correctly installed. Thanks anyway for your commitment to make my poor script better.

Riduidel avatar Oct 18 '20 15:10 Riduidel