You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.7 KiB

  1. ---
  2. order: 7
  3. ---
  4. # Remote signer
  5. Tendermint provides a remote signer option for validators. A remote signer enables the operator to store the validator key on a different machine minimizing the attack surface if a server were to be compromised.
  6. The remote signer protocol implements a [client and server architecture](https://en.wikipedia.org/wiki/Client%E2%80%93server_model). When Tendermint requires the public key or signature for a proposal or vote it requests it from the remote signer.
  7. To run a secure validator and remote signer system it is recommended to use a VPC (virtual private cloud) or a private connection.
  8. There are two different configurations that can be used: Raw or gRPC.
  9. ## Raw
  10. While both options use tcp or unix sockets the raw option uses tcp or unix sockets without http. The raw protocol sets up Tendermint as the server and the remote signer as the client. This aids in not exposing the remote signer to public network.
  11. > Warning: Raw will be deprecated in a future major release, we recommend implementing your key management server against the gRPC configuration.
  12. ## gRPC
  13. [gRPC](https://grpc.io/) is an RPC framework built with [HTTP/2](https://en.wikipedia.org/wiki/HTTP/2), uses [Protocol Buffers](https://developers.google.com/protocol-buffers) to define services and has been standardized within the cloud infrastructure community. gRPC provides a language agnostic way to implement services. This aids developers in the writing key management servers in various different languages.
  14. GRPC utilizes [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security), another widely standardized protocol, to secure connections. There are two forms of TLS to secure a connection, one-way and two-way. One way is when the client identifies the server but the server allows anyone to connect to it. Two-way is when the client identifies the server and the server identifies the client, prohibiting connections from unknown parties.
  15. When using gRPC Tendermint is setup as the client. Tendermint will make calls to the remote signer. We recommend not exposing the remote signer to the public network with the use of virtual private cloud.
  16. Securing your remote signers connection is highly recommended, but we provide the option to run it with a insecure connection.
  17. ### Generating Certificates
  18. To run a secure connection with gRPC we need to generate certificates and keys. We will walkthrough how to self sign certificates for two-way TLS.
  19. There are two ways to generate certificates, [openssl](https://www.openssl.org/) and [certstarp](https://github.com/square/certstrap). Both of these options can be used but we will be covering `certstrap` because it provides a simpler process then openssl.
  20. - Install `Certstrap`:
  21. ```sh
  22. go get github.com/square/certstrap@v1.2.0
  23. ```
  24. - Create certificate authority for self signing.
  25. ```sh
  26. # generate self signing ceritificate authority
  27. certstrap init --common-name "<name_CA>" --expires "20 years"
  28. ```
  29. - Request a certificate for the server.
  30. - For generalization purposes we set the ip to `127.0.0.1`, but for your node please use the servers IP.
  31. - Sign the servers certificate with your certificate authority
  32. ```sh
  33. # generate server cerificate
  34. certstrap request-cert -cn server -ip 127.0.0.1
  35. # self-sign server cerificate with rootCA
  36. certstrap sign server --CA "<name_CA>" 127.0.0.1
  37. ```
  38. - Request a certificate for the client.
  39. - For generalization purposes we set the ip to `127.0.0.1`, but for your node please use the clients IP.
  40. - Sign the clients certificate with your certificate authority
  41. ```sh
  42. # generate client cerificate
  43. certstrap request-cert -cn client -ip 127.0.0.1
  44. # self-sign client cerificate with rootCA
  45. certstrap sign client --CA "<name_CA>" 127.0.0.1
  46. ```