Sample application written in dotnet core 2.1 which shows how to connect and read data from vaultproject docker container :)
Firstly, run the docker vault container
./scripts/run-vault.sh
Open up the browser to configure secrets in vault. The token is myroot
- you can configure it in the run-vault.sh
script
Create a Key Value (KV) Secret Engine by clicking enable new engine
Create sample secret
Next, ensure that configuration in appsettings.json
matches your docker container deployment (maily the ip address)
Run the dotnet core project.
dotnet run
You should see:
PS C:\repo\vaultsharp-demo> dotnet run
data from vault.
Login:toumash
Passwordtoumashpassword