eos-blocksigner

command module
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2018 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

EOS out-of-band block signer server

A simple and secure OOB block signing server for EOS.IO Software blockchains, from your friends at EOS Canada.

Slightly before EOS.IO 1.0 release, Block.one introduced Out-of-band signing for block producers. It involves setting up your configuration with something like this:

signature-provider=EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEOSD:http://localhost:6666/v1/wallet/sign_digest
keosd-provider-timeout=20   # default value is 5 ms

This means that nodeos can sign blocks with the private key corresponding to EOS6MR...W5CV through an external keosd-compatible program.

eos-blocksigner is such a program, and integrates with eosc's vault, the wallet and command-line tool.

WARNING: you do NOT want to expose that software to any public endpoint, even in an internal network. It should run and listen strictly on a loopback interface. The sign_digest endpoint can actually sign anything with the associated private key. If you are using the same private key for owner and/or active permissions on some accounts (which you should not), then any transaction can be signed with the /v1/wallet/sign_digest endpoint.

Two modes of operation

As of May 2018, eos-blocksigner has two modes of operation:

  1. using a vault encrypted through Google Cloud Platform's Key Management System
  2. using a plain-text private keys file

As demand grows, we can add more strategies, like AWS's KMS system, passphrase-encrypted vaults, or some other HSM systems.

GCP KMS integration

To use the KMS-GCP strategy, create a vault locally using eosc this way:

$ eosc vault create --import \
                    --vault-type kms-gcp \
                    --comment "Block signing key vault" \
                    --kms-gcp-keypath projects/PROJNAME/locations/LOC/keyRings/RINGNAME/cryptoKeys/KEYNAME
...

This implies you have authenticated through gcloud and have permissions to Encrypt using KMS, in the specified project and keyring.

You can then drop the eosc-vault.json wallet on your production infrastructure, and run eos-blocksigner with these parameters:

$ eos-blocksigner --wallet-path path/to/eosc-vault.json \
                  --kms-gcp-keypath projects/PROJNAME/locations/LOC/keyRings/RINGNAME/cryptoKeys/KEYNAME
Listening on 127.0.0.1:6666

You will need the Decrypt KMS scopes on your servers to handle decryption of the vault.

Plain-text private keys file

This is a method which is not very secure, yet is still more secure than keeping your private keys in plain-text in your config.ini.

Remote code execution vulnerabilities often allow reading the process' memory easily. Having the out-of-band (read: separate process) signing server already makes it more complex to access memory with your private keys. With proper isolation (containers, network access, and eos-blocksigner), you can mitigate the risk of leaking your private keys through an unforeseen nodeos vulnerability.

The --keys-file is a simple file that looks like this (myfile.keys):

5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFFF
5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 // This matches EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

It has one private key per line. Anything after an optional whitespace is ignored.

With a keys-file, you don't need an eosc-vault.json, and can run:

$ eos-blocksigner --keys-file=myfile.keys
Listening on 127.0.0.1:6666

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址