Posts

Showing posts with the label HashiCorp

Hashicorp Vault behind IIS

Image
Hashicorp Vault behind IIS Last week I talked about Hashicorp Vault and how it could be used to store secrets . Today I will continue on the same line and show how we can host Vault behind IIS and use what we learnt in the previous post to retrieve secrets from ASP.NET Core. Setup Vault Read secrets from Vault from ASP.NET Core 1. Setup Vault Vault is a webserver which comes with a complete API. In this example, we will show how to setup Vault and proxy calls from IIS to Vault. 1.1 Boot Vault To begin with, we can follow the same steps described in my previous post - Hashicorp Vault and how it could be used to store secrets . As a quick overview, here are the steps to be executed inside Windows Server: download Vault create the config.hcl file run the command vault.exe server -config=config.hcl In config.hcl, we configured Vault to listen on http://localhost:8200 so the next thing to do is to proxy calls from IIS to Vault process. 1.2 Configure IIS to direct calls to...

Manage secrets with Hashicorp Vault

Manage secrets with Hashicorp Vault During development it is common to save local connection string in the code via setting files. But when it comes the time to deploy, hosted environments should not have their secrets persisted as plain text in the code. Since those can’t be saved in the git repository, they have to be stored in a secure place where they can be managed easily, a vault . Hashicorp Vault is one of this software which allows us to store and retrieve secrets while providing a granular level of control over the secret accesses. Today we will see the basic configuration of Hashicorp Vault to store and retrieve secrets using the Vault CLI. This post will be composed by four parts: Start Vault Save secrets Create a role with a policy Retrieve secrets 1. Start Vault 1.1 Configure Vault Head to https://www.vaultproject.io/downloads.html and download the latest binaries of Vault then place it in a folder and add the folder to PATH. Before starting Vault we need to ...