Skip to content

Instantly share code, notes, and snippets.

@rhazberries
Last active July 22, 2020 23:58
Show Gist options
  • Select an option

  • Save rhazberries/967a619e6aaa998fbd92717cbdef4902 to your computer and use it in GitHub Desktop.

Select an option

Save rhazberries/967a619e6aaa998fbd92717cbdef4902 to your computer and use it in GitHub Desktop.
Keybase Integration Notes

Keybase Integration

Initial Issue

#183 [Feature] Add Keybase Integration to Harmony protocol

Problem: The existing method for uploading a validator image to the Staking Dashboard is cumbersome. (Github repo + pull requests)

Proposed Solution: Use Keybase PGP keys & the CLI to verify uploaded pictures.

Additional Security Concerns

Impersonation of other validators.

Anyone can upload an image to the Github repo without proving ownership of the validator address, maliciously changing someone else's validator image or using someone else's image to impersonate them.

Solution

Validators set their "identity" field to their Keybase public key fingerprint. The Staking Dashboard can query for their Keybase user & by default use their uploaded Keybase profile picture as their validator icon on the Staking Dashboard.

This solves the cumbersome validator logo upload process. Additionally, the Staking Dashboard can also display the link to the Keybase profile, which delegators & other uses can use to check the identity of the validator. The Keybase account can also be used to provide contact between the validator & their delegators.

Since the "identity" field of each validator must be unique, no one else will be able to use the same Keybase PGP key to impersonate a validator. However, if a validator's PGP key was "stolen" by another validator in the "identity" field, they will have to replace their existing Keybase public key, if they wish to use Keybase for their validator.

This is already being used by developers for Cosmos block explorers. Keybase-associated validators can be helpful for other developers/partners as well for external dashboards images & other integrations.

Implementation of this should be simple using the Keybase user lookup API. The returned data includes a link to the profile picture of the account.

This could be a bounty, but this is a fairly small task.

Other Ways to Use Keybase

In researching the simple solution for Keybase integration, there are some other ways we can utilize Keybase for identity proofs.

Keybase Proof Integration

Keybase allows custom websites to integrate with their account proofs, which we can use to allows users to connect their Keybase profile with their ONE address.

Deploy a smart contract where users can send a transaction with their Keybase proof message & integrate the smart contract data on a hmny.io domain or even our main harmony.one webpage.

The Staking Dashboard can also hook into this Keybase verification & display "green verification check marks" for Keybase users with valid identity proofs.

This could be proposed as a bounty, but if we want to use this as "Harmony verified"; it would be better to be handled by the internal team.

Business Related

Keybase allows users to set a Bitcoin & ZCash address on their profile. The business team should reach out to them & try to get them to list ONE addresses as well.

This does not necessary provide any security, as the address is not a proof, but would be good exposure. This is also not really a solution, but would be something nice to have. Also, not sure if we have already tried to reach out to Keybase.

Requested Feedback

  • Are there additional concerns with security with either idea?
  • Is it worth putting either of these two solutions as a bounty?
@rlan35
Copy link

rlan35 commented Jul 22, 2020

Good analysis!

  1. I don't see major security concerns, since our protocol ensures the uniqueness of identity field, it should be secure to integrate with keybase id.

  2. Depending on the estimated workload, if it's just a small tasks of a few days. Better just do it ourselves. The communication cost for doing a bounty maybe too high in that case. If Pops is interested to take the bounty, the communication cost can be minimum tho.

@yelllowsin
Copy link

Great we are having this!

I think this should be done by you Janet. Reason is that it will require changes in the hmy cli anyway and you are already work on it, so we will have a working solution much faster than if we offered this as a bounty. Other blockchains already use Keybase for the same purpose (validator identity), and it has been proved secure.

@rhazberries
Copy link
Author

@yelllowsin There is no changes needed to be done with the CLI, since I don't plan on doing any verification in the CLI (because it can be bypassed).

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