Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dmakarov
Copy link
Contributor

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?

@dmakarov dmakarov force-pushed the keyring branch 2 times, most recently from 1b47930 to 14792ff Compare April 23, 2025 01:39
@dmakarov
Copy link
Contributor Author

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.

@dmakarov dmakarov marked this pull request as ready for review April 23, 2025 11:27
@dmakarov dmakarov force-pushed the keyring branch 3 times, most recently from ef49881 to 5a2a5c3 Compare August 3, 2025 17:39
@mvines
Copy link
Owner

mvines commented Aug 12, 2025

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

The old exchange credentials database will be queried, but any new
credentials will be added to the keyring. Probably better not to mix
the two sets of credentials.  The assumption is that the user will add
existing credentials to keyring via the sys command line and remove
the old database, otherwise the old database will be used as long as
it exists.
@dmakarov
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants