TLS Authentication

How to secure the communication of your Erigon components

TLS Authentication

TLS authentication can be enabled to ensure communication integrity and access control to the Erigon node.

At a high level, the process consists of

  1. Generate the Certificate Authority (CA) key pair.

  2. Create the Certificate Authority certificate file

  3. Generate a key pair

  4. Create the certificate file for each public key

  5. Deploy the files to each instance

  6. Run Erigon and RPCdaemon with the correct tags

The following is a detailed description of how to use the ``arrow-up-rightopenssl’’ suite of tools to secure the connection between a remote Erigon node and a remote or local RPCdaemon.

circle-info

Note: The same procedure applies to any Erigon component you wish to run separately; it is recommended to name the files accordingly.

triangle-exclamation

1) Generating the key pair for the Certificate Authority (CA)

Generate the CA key pair using Elliptic Curve (as opposed to RSA). The generated CA key will be in the CA-key.pem file.

triangle-exclamation
openssl ecparam -name prime256v1 -genkey -noout -out CA-key.pem

2) Creating the CA certificate file

Create CA self-signed certificate (this command will ask questions, the answers aren’t important for now, but at least the first one needs to be filled in with some data). The file created by this command will be called CA-cert.pem:

3) Generating a key pair

Generate a key pair for the Erigon node:

Also generate a key pair for the RPC daemon:

4) Creating the certificate file for each public key

Now create the Certificate Signing Request for the Erigon key pair:

And from this request, produce the certificate (signed by the CA) that proves that this key is now part of the “cluster of trust”:

Then create the certificate signing request for the RPC daemon key pair:

And from this request, produce the certificate (signed by CA), proving that this key is now part of the “cluster of trust”:

5) Deploy the files on each instance

These three files must be placed in the /erigon folder on the machine running Erigon:

  • CA-cert.pem

  • erigon-key.pem

  • erigon.crt

On the RPCdaemon machine, these three files must also be placed in the /erigon folder:

  • CA-cert.pem

  • RPC key.pem

  • RPC.crtv

6) Run Erigon and RPCdaemon with the correct tags

Once all the files have been moved, Erigon must be run with these additional options:

and the RPC daemon must be started with these additional options:

circle-exclamation

Previousarrow-up-rightNext arrow-up-right

Last updated

Was this helpful?