AlveyChain Documents
  • Alveychain Docs
  • Get-Started
    • Alveychain
    • Installation
    • Local Setup
    • Cloud Setup
    • Full Node
    • CLI Commands
    • JSON RPC Commands
    • Performance Reports
  • Configuration
    • Manage private keys
    • Set up Hashicorp Vault
    • Enable Prometheus metrics
  • Working-With-Node
    • Query JSON RPC endpoints
    • Query operator information
    • Backup/restore node instance
  • Consensus
    • Proof of Authority (PoA)
    • Proof of Stake
    • Set up and use Proof of Stake (PoS)
    • Migration from PoA to PoS
  • Additional Features
    • Alveycoin bridge
    • Network stress testing
    • Blockscout
  • Architecture
    • Architecture Overview
    • modules
      • Blockchain
      • Consensus
      • JSON RPC
      • Minimal
      • Networking
      • Other modules
      • Protocol
      • Sealer
      • State
      • Storage
      • TxPool
      • Types
  • Concepts
    • State in Ethereum
  • Community
    • Propose a new feature
    • Report an issue
  • Docs
    • Server Config File
    • how-tos
      • How to set up and use Proof of Stake (PoS)
Powered by GitBook
On this page
  • Overview
  • Prerequisites
  • Step 1 - Generate the secrets manager configuration
  • Step 2 - Initialize secret keys using the configuration
  • Step 3 - Generate the genesis file
  • Step 4 - Start the alveychain client
  1. Configuration

Set up Hashicorp Vault

PreviousManage private keysNextEnable Prometheus metrics

Last updated 2 years ago

Overview

Currently, the alveychain is concerned with keeping 2 major runtime secrets:

  • The validator private key used by the node, if the node is a validator

  • The networking private key used by libp2p, for participating and communicating with other peers

For additional information, please read through the

The modules of the alveychain should not need to know how to keep secrets. Ultimately, a module should not care if a secret is stored on a far-away server or locally on the node's disk.

Everything a module needs to know about secret-keeping is knowing to use the secret, knowing which secrets to get or save. The finer implementation details of these operations are delegated away to the SecretsManager, which of course is an abstraction.

The node operator that's starting the alveychain can now specify which secrets manager they want to use, and as soon as the correct secrets manager is instantiated, the modules deal with the secrets through the mentioned interface - without caring if the secrets are stored on a disk or on a server.

This article details the necessary steps to get the alveychain up and running with a server.

:::info previous guides It is highly recommended that before going through this article, articles on and are read. :::

Prerequisites

This article assumes that a functioning instance of the Hashicorp Vault server is already set up.

Additionally, it is required that the Hashicorp Vault server being used for the alveychain should have enabled KV storage.

Required information before continuing:

  • The server URL (the API URL of the Hashicorp Vault server)

  • Token (access token used for access to the KV storage engine)

Step 1 - Generate the secrets manager configuration

In order for the alveychain to be able to seamlessly communicate with the Vault server, it needs to parse an already generated config file, which contains all the necessary information for secret storage on Vault.

To generate the configuration, run the following command:

alveychain secrets generate --dir <PATH> --token <TOKEN> --server-url <SERVER_URL> --name <NODE_NAME>

Parameters present:

  • PATH is the path to which the configuration file should be exported to. Default ./secretsManagerConfig.json

  • NODE_NAME is the name of the current node for which the Vault configuration is being set up as. It can be an arbitrary value. Default alveychain-node

:::caution Node names Be careful when specifying node names.

The alveychain uses the specified node name to keep track of the secrets it generates and uses on the Vault instance. Specifying an existing node name can have consequences of data being overwritten on the Vault server.

Secrets are stored on the following base path: secrets/node_name :::

Step 2 - Initialize secret keys using the configuration

Now that the configuration file is present, we can initialize the required secret keys with the configuration file set up in step 1, using the --config:

alveychain secrets init --config <PATH>

The PATH param is the location of the previously generated secrets manager param from step 1.

Step 3 - Generate the genesis file

Since Hashicorp Vault is being used instead of the local file system, validator addresses should be added through the --ibft-validator flag:

alveychain genesis --ibft-validator <VALIDATOR_ADDRESS> ...

Step 4 - Start the alveychain client

Now that the keys are set up, and the genesis file is generated, the final step to this process would be starting the alveychain with the server command.

The server command is used in the same manner as in the previously mentioned guides, with a minor addition - the --secrets-config flag:

alveychain server --secrets-config <PATH> ...

The PATH param is the location of the previously generated secrets manager param from step 1.

TOKEN is the access token previously mentioned in the

SERVER_URL is the URL of the API for the Vault server, also mentioned in the

The genesis file should be generated in a similar manner to the and guides, with minor changes.

Managing Private Keys Guide
Hashicorp Vault
Local Setup
Cloud Setup
prerequisites section
prerequisites section
Local Setup
Cloud Setup