âī¸HashiCorp Vault Setup
Last updated
Last updated
In this example, we will demonstrate the MGS Vault using the open-source Hashicorp vault. Once the Vault is deployed to the cloud of your choice, you can access the Vault's user interface by opening your web browser and navigating to the Vault's U.R.L.
First, you'll need to initialize the vault. If this is the first time you're using the Vault, you'll need to initialize it by setting the number of key shares and key threshold. Key shares are the total number of parts the master key is split into, while the key threshold is the minimum number of parts required to unseal the Vault. For example, you can set key shares to 5 and the key threshold to 3. Click on the "Initialize" button on the welcome page.
Next, you need to download the unseal keys and the initial root token. After initializing the Vault, you'll be provided with a set of unseal keys and an initial root token. Make sure to securely store this information, as it's required to unseal and authenticate with the Vault.
After that step, You'll need to unseal the vault. You'll need to provide the required number of unseal keys, matching the key threshold, to unseal the Vault. Click on "Continue to Unseal" and enter the unseal keys one by one.
Now, you can log into your vault. Once the Vault is unsealed, you'll be redirected to the login page. Select the Token method of authentication and enter the initial root token you saved earlier and click "Sign In."
Once logged in, you should create a secret engine. Now that you're logged in, click on the "Enable new engine" button on the right side of the screen.
Select generic K.V. type, and click next.
Enter a path for the secret engine, and make note of it. You will need to provide it later during the MGS setup. Keep Maximum number of versions 0 as defaulted. Click on Enable Engine.
Once you have a secret engine, you can create a "secret." Select your newly created Secret engine. After creating the secret engine, you will be automatically redirected to this page.
To create a new secret, click the "Create secret" button.
You'll be asked to provide a path for the secret, you will also need this path during the MGS user profile setup. In the âSecret dataâ section put âprivateKeyâ in the âkeyâ field, and your "private key" in the value field. Click the âSaveâ button.