Use keyring to store exchange secrets in system store
It seems better to use encrypted storage for exchange sensitive data. Here’s an attempt to use keyring crate to interface with keychain on macos and secret-service on Linux.
What do you think?
These changes store each ExchangeCredentials field as a separate keyring entry. Alternatively it may be better to serialize entire instance of ExchangeCredentials instance as a single byte array and store it in one keyring entry.
I like the idea, and also would prefer to keep the existing filesystem-based storage around too so that users (me!!) can voluntarily migrate to using encrypted storage when it's convenient to do so
I added a commit that preserves and queries the old credential database, if it exists. However all new set credentials commands will add the credentials to the keyring, even if the old database exists. The assumption is that the user will add the existing credentials to the keyring via the sys command line and remove the old database.