-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clients’ keys are world-readable #3716
Comments
I'm a fan of https://github.com/99designs/keyring for key storage. |
That looks compelling. Do you know if it's been subjected to third-party review (or has some major users)? |
Would we use the Filesystem backend? I doubt we want to leverage a local client/server model here, right? |
I'd suggest using the OSX keyring and Windows credential store and then falling back to encrypted file if neither are available |
Started playing with keyring in the SDK -- seems very straightforward. One thing that came to my attention is we'll now probably need some sort of Or were we thinking of another flow? |
I think we can ditch bcrypt if we're using a keyring which is already encrypted. This seems like a large-magnitude change for prelaunch though, for now I suggest just the permissions fix. |
FYI Iqlusion/ @poldsam is working on adding keyring support for the client key storage |
Cool! You mean to Keybase @zmanian? Is there any code you can share? Will a PR be made? |
https://github.com/iqlusioninc/cosmos-sdk/tree/kristi/keyringKeybase Here is the WIP branch. Yep there will be a PR |
Awesome. Look forward to reviewing the contribution. |
Client keys are stored on the filesystem via LevelDB for multiple operations. These include use by validators, client wallets, and other functions. The keys themselves are stored within the
.gaiacli
directory of the user’s home directory by default.However, the permissions on this directory and subdirectories is
0755
(RWX for user and RX for group/world), with file permissions of 0644
(RW for user and R for group/world).While the contents of the LevelDB files are in plain text, they are protected via Bcrypt.
Proposal
Short Term (prior to or at launch):
At the very least, the file and directory permissions should be updated to
0700
(RWX for user only).Long Term: (post launch):
Use an audited key/secret local vault.
/cc @cwgoes @zmanian
For Admin Use
The text was updated successfully, but these errors were encountered: