Skip to content
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

Support optional remote signer in kosud #317

Open
hrharder opened this issue Oct 4, 2019 · 3 comments
Open

Support optional remote signer in kosud #317

hrharder opened this issue Oct 4, 2019 · 3 comments
Labels
enhancement New feature or request go-kosu Project: go-kosu

Comments

@hrharder
Copy link
Member

hrharder commented Oct 4, 2019

Overview

For optimal security, Tendermint recommends using an external signer process on production chains for validators. This prevents double signing, and reduces (or eliminates) the risk of the keys being compromised.

Background

This is a really good primer on the topic!

The PrivValidator interface provides signing functionality for Tendermint validators. The simplest is FilePV (used by go-kosu currently) which uses priv_validator_state.json and priv_validator_key.json.

Currently, we create our in-process tendermint node with a custom constructor, CreateNode.

It assumes usage of FilePV:

node, err := node.NewNode(
		app.Config,
		pv.LoadOrGenFilePV(                                // <= FilePV!
			app.Config.PrivValidatorKeyFile(),
			app.Config.PrivValidatorStateFile(),
		),
		nodeKey,
		proxy.NewLocalClientCreator(app),
		node.DefaultGenesisDocProviderFunc(app.Config),
		node.DefaultDBProvider,
		node.DefaultMetricsProvider(app.Config.Instrumentation),
		logger,
	)

Requirements

  • The kosud CLI should provide the option to configure a remote signer, by configuring a SignerListenterEndpoint and SignerClient
  • The SignerClient becomes the PrivValidator passed to node.NewNode()
  • The default should be FilePV (as it stands now)

For example (just an idea):

// not exactly sure what is required by SignerListenerEndpoint, more flags may be needed
kosud start -E [URL] --remote-signer "10.0.0.4:8000"

Testing

We may have to write a simple remote signer implementation in order to properly test.

@hrharder hrharder added enhancement New feature or request go-kosu Project: go-kosu labels Oct 4, 2019
@qustavo
Copy link
Contributor

qustavo commented Oct 8, 2019

This has been partially implemented in #320. We still need to wait for Tx signing support.

@hrharder
Copy link
Member Author

hrharder commented Oct 8, 2019

Do you think we close this issue since technically the implementation satisfies the above? Or leave it open since its not fully compatible with a live network?

@qustavo
Copy link
Contributor

qustavo commented Oct 9, 2019

Since the functionality is not there yet, I'd keep it open. And close it when enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go-kosu Project: go-kosu
Projects
None yet
Development

No branches or pull requests

2 participants