-
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
LCD communication process (security) #382
Comments
I strongly agree that ckeystore should be a separate binary to reduce the attack surface.
Agreed.
Strong agreement! Monax realized this and put its key management into a separate binary called
Agreed. It's a good idea to have the private key as close to the user as possible.
Agreed.
Yes. Regarding the UX, here is my idea: The ideal is to use an HSM. For people who aren't using an HSM, the UX and architectural design should be the equivalent, i.e., we should provide a software HSM. We can call the software HSM |
Does the SDK support authentication on the REST web interface? I looked at this awhile back and don't remember it being there, but if that has changed it may change the solution I am thinking of. |
What do you mean by authentication? The SDK allows signing on the REST interface if the application provides the name and password of the private key stored in the key-manager. |
How does the Electron client authenticate communication to the SDK? |
For what it's worth, I just implemented the end-to-end encryption protocol used by the YubiHSM2 in Rust: https://github.com/tendermint/yubihsm-rs If there's interest in supporting end-to-end encryption between JS and hardware devices like YubiHSM2s, I don't think translating my implementation into JavaScript would be too difficult. The protocol itself is rather simple, at least as far as transport encryption protocols go, and only depends on AES (in CBC mode for encryption, and CMAC for authentication), as well as PBKDF2-SHA-256 for deriving a set of static encryption keys from a password. The interface to the device itself (yubihsm-connector, an app provided by Yubico) is HTTP(S), so it should be fairly easy to integrate with a JS app. Note that yubihsm-connector is untrusted in that it acts as an HTTP(S)<->USB gateway for the hardware device. |
hmm does this basically suggest that we shouldn't be concerned about communication hacks because this is effectively comparable to the client machine getting hacked which is effectively the same loss of security as storing the password locally and having it compromised there?
interesting - sounds like an okay idea. We definitely want to allow/encourage for posh air-gapped setups - although a tiny atom holder who just wants to be involved may not care that much (and shouldn't have too) - maybe we leave this as a setting (default:ON) and allow for small-time users to disable I'm a bit confused/disconnected from the development - does the local UI client run an instance of the SDK client and call it to sign transactions (proposed)... so we're only concerned about communication within the local machine? I imagine local encrypted communication should be secure enough...... maybe correct me? |
@tarcieri this sounds like a cool idea and thank you for offering this! I would suggest that we think about migrating to JS <-> hsm a little later and use the JS <-> keystore <-> hsm first so we minimize double work and also have a product that uses and therefor tests keystore <-> hsm.
Cool feature. The question is which user we want to target first (small holders or wales). I would suggest we target the masses first to get the UX right and then provide features for the few wales later.
The UI runs the client formerly known as Gaia locally and exposes the REST API to also build -> sign -> send transactions. You figured correctly, that the communciation between the JS part and the SDK REST server was the issue.
@jessysaurusrex @NodeGuy would you agree? |
* I imagine * not a security expert ;) |
Provided the communication between the parts in question is all encrypted and has some sort of authentication (implicit based on context or explicit), that seems fine. Even if the interfaces are all local, I'd like to avoid sending bare keys over IPC and have some assurance that the things we're interfacing with are actually what we intend to use/send traffic to. |
you guys are awesome. |
Created a ticket for the first outcome of this discussion: #595 |
Yes. |
I think we can close this? The LCD now uses HTTPS. |
The cosmos SDK provides a REST-server, that should provide all the functionality of the SDK. The question is, is the communication with this REST-server secure enough to send local passwords so that only the SDK can handle building of TX / signing of TX / sending of TX. This would be a major improvement for all app-developers building on top of the SDK, as they don't have to implement this round-trip themselves.
Process before:
Process after:
Quoting @jaekwon:
Quoting @mappum from a meeting: (Correct me if quote you wrong)
The text was updated successfully, but these errors were encountered: