All Projects → kdcllc → NetCore.HashiCorp.Vault

kdcllc / NetCore.HashiCorp.Vault

Licence: MIT license
Securing with HashiCorpVault in Kubernetes

Programming Languages

C#
18002 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to NetCore.HashiCorp.Vault

X.Web.Sitemap
Simple sitemap generator for .NET
Stars: ✭ 66 (+288.24%)
Mutual labels:  asp-net-core
.NetCorePluginManager
.Net Core Plugin Manager, extend web applications using plugin technology enabling true SOLID and DRY principles when developing applications
Stars: ✭ 17 (+0%)
Mutual labels:  asp-net-core
forza-data-web
Forza Motorsport / Forza Horizon 4 Data-Out feature receiver web application
Stars: ✭ 18 (+5.88%)
Mutual labels:  asp-net-core
vault-plugin-splunk
Vault plugin to securely manage Splunk admin accounts and password rotation
Stars: ✭ 23 (+35.29%)
Mutual labels:  hashicorp-vault
MusicDatabase-API
This project is able to manage your songs, artists, albums and more by RESTful API. Developed with ASP.NET Core 2.0 & EF Core and used PostgreSQL Database Provider. Implemented Swagger to project.
Stars: ✭ 18 (+5.88%)
Mutual labels:  asp-net-core
Lib.AspNetCore.Mvc.Ndjson
Lib.AspNetCore.Mvc.Ndjson is a library that provides support for NDJSON (Newline Delimited JSON) based structured data streaming to ASP.NET Core MVC
Stars: ✭ 13 (-23.53%)
Mutual labels:  asp-net-core
HotelListing-API-dotnet5
An Educational Web API built using .NET Core 5.0. We look at REST principles, connecting to a database, using swagger and developing custom middleware to bring out the full feature set of a .NET API.
Stars: ✭ 37 (+117.65%)
Mutual labels:  asp-net-core
vault-demo
Walkthroughs and scripts for my @hashicorp Vault talks
Stars: ✭ 67 (+294.12%)
Mutual labels:  hashicorp-vault
Asp-net-Core-Project-with-Admin-Template-Setup
AdminLTE Template Setup with Asp.net Core MVC 2.1 Project
Stars: ✭ 50 (+194.12%)
Mutual labels:  asp-net-core
oauth-aspnet
An ASP.NET Core compatible port of the OAuth Authorization Server Middleware from Microsoft's Project Katana (Microsoft.Owin.Security.OAuth)
Stars: ✭ 25 (+47.06%)
Mutual labels:  asp-net-core
RESTvsGRPC
Evaluating Performance of REST vs. gRPC
Stars: ✭ 36 (+111.76%)
Mutual labels:  asp-net-core
secrets cli
CLI for storing and reading your secrets via vault
Stars: ✭ 24 (+41.18%)
Mutual labels:  hashicorp-vault
AspNetCoreFileUploadFileTable
ASP.NET Core MVC file upload / download with MS SQL Server FileTable
Stars: ✭ 112 (+558.82%)
Mutual labels:  asp-net-core
DNZ.MvcComponents
A set of useful UI-Components (HtmlHelper) for ASP.NET Core MVC based-on Popular JavaScript Plugins (Experimental project).
Stars: ✭ 25 (+47.06%)
Mutual labels:  asp-net-core
EmbeddedBlazorContent
Library to load embedded content files (js and css) from Blazor libraries in server-side Blazor mode.
Stars: ✭ 39 (+129.41%)
Mutual labels:  asp-net-core
ApiDmS
Open Source Document Management System.
Stars: ✭ 16 (-5.88%)
Mutual labels:  asp-net-core
ASPCore.Two-Factor-Authentication
Perform two factor authentication in an ASP.NET core application using Google Authenticator app
Stars: ✭ 29 (+70.59%)
Mutual labels:  asp-net-core
configuration-service
Configuration Service is a distributed configuration provider for .NET Core.
Stars: ✭ 62 (+264.71%)
Mutual labels:  asp-net-core
LoggingAdvanced
Improved and patched .NET Core console logger.
Stars: ✭ 20 (+17.65%)
Mutual labels:  asp-net-core
BetterHostedServices
Fixed a wide variety of issues that have to do with Hosted Services and BackgroundServices, such as error handling and the abillity to access them via the DI.
Stars: ✭ 25 (+47.06%)
Mutual labels:  asp-net-core

HashiCorp Vault Asp.Net Core 2.0 Netstandard implementation

The goal of this project is to provide a way to read encrypted values from HashiCorp Vault thru environment variables inside the Kubernetes pods.

  • ConfigMap - store non-secure information i.e HashiCorp Vault url with port number and keys for the secure data to be retrieved.
  • Secrets - store HashiCorp Vault credentials.

Nuget Package

Install-Package NetCore.HashiCorp.Vault

Docker

There are two example of using this library in the Docker container.

  • ConsoleApp
  • WebApp

In order for the example to run the following code is added to the Configurations for both projects:

.ConfigureAppConfiguration((context, configBuilder) => {
                    configBuilder.AddEnvironmentVariables();
                    configBuilder.AddJsonFile("appsettings.json", optional: true);
                    configBuilder.AddCommandLine(args);

                    var configuration = configBuilder.Build();

                    #region DEBUG: Seed the Vault before reading into Configurations
                    // bind vault options
                    var options = new VaultOptions();
                    configuration.Bind("VaultOptions", options);

                    // bind seeder
                    var seedData = new List<VaultSeeder>();
                    configuration.Bind("VaultSeeder", seedData);

                    var logger = new LoggerFactory()
                           .AddConsole()
                           .AddDebug()
                           .CreateLogger<VaultWriteService>();
                    // seed
                    new VaultWriteService(
                           logger,
                           options,
                           seedData
                           ).SeedVault();
                    #endregion

                    // retrieve encrypted values and make available to the application
                    configuration = configBuilder.AddHashiCorpVault(configuration).Build();

                    // set configuration
                    context.Configuration = configuration;
                })

Tools

  • Visual Studio.NET 2017
  • Visual Studio Code

Resources

Configurations

  1. Json format
{
        "VaultOptions": {
        "Server": "http://localhost:8300",
        // "RoleId": "",
        // "SecretId": "",
        "TokenId": "root_dev_token",
        "Prefix": "secret",
        "Secrets": [
            "connectionString",
            "option1"
        ]
    }
}
  1. YAML format
VaultOptions:
  Server: http://localhost:8300
  TokenId: root_dev_token
  Prefix: secret
  Secrets:
  - connectionString
  - option1

Docker Communication

In order to troubleshoot connection between the Docker container, log into one of the containers and install ping utility:

apt-get update && apt-get install -y iputils-ping
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].