All Projects → Chatham → Vault.net

Chatham / Vault.net

Licence: mit
.NET API client for vault

Projects that are alternatives of or similar to Vault.net

teller
Cloud native secrets management for developers - never leave your command line for secrets.
Stars: ✭ 998 (+1248.65%)
Mutual labels:  vault, secret-management, hashicorp
Cryptr
Cryptr: a GUI for Hashicorp's Vault
Stars: ✭ 324 (+337.84%)
Mutual labels:  hashicorp, vault, secret-management
Vaulted
nodejs based wrapper for HashiCorp's Vault HTTP API
Stars: ✭ 47 (-36.49%)
Mutual labels:  hashicorp, vault, secret-management
vault-unseal
auto-unseal utility for Hashicorp Vault
Stars: ✭ 57 (-22.97%)
Mutual labels:  vault, hashicorp
vault-terraform-demo
Deploy HashiCorp Vault with Terraform in GKE.
Stars: ✭ 47 (-36.49%)
Mutual labels:  vault, hashicorp
secrets cli
CLI for storing and reading your secrets via vault
Stars: ✭ 24 (-67.57%)
Mutual labels:  vault, secret-management
vim-hcl
Syntax highlighting for HashiCorp Configuration Language (HCL)
Stars: ✭ 83 (+12.16%)
Mutual labels:  vault, hashicorp
lockgit
A CLI tool for storing encrypted data in a git repo
Stars: ✭ 121 (+63.51%)
Mutual labels:  vault, secret-management
vault-token-helper-osx-keychain
An example @hashicorp Vault token helper for Mac OS X Keychain.
Stars: ✭ 64 (-13.51%)
Mutual labels:  vault, hashicorp
secrets-proxy
🔑 A secure proxy service for managing OneOps secrets.
Stars: ✭ 12 (-83.78%)
Mutual labels:  vault, secret-management
T Vault
Simplified secrets management solution
Stars: ✭ 316 (+327.03%)
Mutual labels:  hashicorp, vault
thycotic.secretserver
PowerShell module for automating with Thycotic Secret Server REST API
Stars: ✭ 41 (-44.59%)
Mutual labels:  vault, secret-management
vault-ctrl-tool
Simple tool for managing authentication, secrets, and leases for services.
Stars: ✭ 23 (-68.92%)
Mutual labels:  vault, hashicorp
vault-load-testing
Automated load tests for Vault and Consul using the locust.io Python framework
Stars: ✭ 44 (-40.54%)
Mutual labels:  vault, hashicorp
Aomi
Provide secrets to build and release pipelines in a self service way using Hashicorp Vault.
Stars: ✭ 33 (-55.41%)
Mutual labels:  vault, secret-management
argocd-vault-plugin
An Argo CD plugin to retrieve secrets from Secret Management tools and inject them into Kubernetes secrets
Stars: ✭ 404 (+445.95%)
Mutual labels:  vault, secret-management
nomad-box
Nomad Box - Simple Terraform-powered setup to Azure of clustered Consul, Nomad and Traefik Load Balancer that runs Docker/GoLang/Java workloads. NOTE: Only suitable in dev environments at the moment until I learn more Terraform, Consul, Nomad, Vault :P
Stars: ✭ 18 (-75.68%)
Mutual labels:  vault, hashicorp
vault-consul-swarm
Deploy Vault and Consul with Docker Swarm
Stars: ✭ 20 (-72.97%)
Mutual labels:  vault, hashicorp
k8s-vault-webhook
A k8s vault webhook is a Kubernetes webhook that can inject secrets into Kubernetes resources by connecting to multiple secret managers
Stars: ✭ 107 (+44.59%)
Mutual labels:  vault, secret-management
Node Vault
Client for HashiCorp's Vault
Stars: ✭ 391 (+428.38%)
Mutual labels:  hashicorp, vault

Vault.NET Build status

  • Vault API: v0.9.1
  • .NET Standard 1.3 (.NET: >= 4.6, .NET Core: >= 1.0.0)
  • .NET 4.5
  • Nuget: Vault NuGet

Vault.NET is an .NET API client for the interacting with Vault. This is a port of the go api client and provides generic methods for interacting with the paths in Vault.

Example

using Vault;

var vaultClient = new VaultClient();
vaultClient.Token = "XXXXXX";

Generic Secret

var data = new Dictionary<string, string>
{
    {"zip", "zap"}
};
await vaultClient.Secret.Write("secret/foo", data);

var secret = await vaultClient.Secret.Read<Dictionary<string, string>>("secret/foo");
Console.WriteLine(secret.Data["zip"]);

// zap

PKI

using Vault.Models.Secret.Pki;

var testRole = new RolesRequest
{
    AllowAnyDomain = true,
    EnforceHostnames = false,
    MaxTtl = "1h"
};
await vaultClient.Secret.Write("pki/roles/test", testRole);

var certRequest = new IssueRequest
{
    CommonName = "Test Cert"
};
var cert = await vaultClient.Secret.Write<IssueRequest, IssueResponse>("pki/issue/test", certRequest);
Console.WriteLine(secret.Data.Certificate);

// -----BEGIN CERTIFICATE-----
// MII...

Username/Password Authentication

using Vault.Models.Auth.UserPass;

await vaultClient.Sys.EnableAuth("userpass", "userpass", "Userpass Mount");

var usersRequest = new UsersRequest
{
    Password = "password",
    Policies = new List<string> { "default" },
    Ttl = "1h",
    MaxTtl = "2h"
};
await vaultClient.Auth.Write("userpass/users/username", usersRequest);

var loginRequest = new LoginRequest
{
    Password = "password"
};
var loginResponse = await vaultClient.Auth.Write<LoginRequest, NoData>("userpass/login/username", loginRequest);

// Set client token to authenticated token
vaultClient.Token = loginResponse.Auth.ClientToken;

// Proceed with authenticated requests

Models

Many request/response objects are provided in this package to support different backends. This is in no way an exhaustive list of all the objects. Since the models are the things that are going to most likely change between versions of vault, it may make sense to make your own to service your needs. These may get split into a seperate Nuget package in the future.

Testing

Since most of the operation of this library are just building requests and passing them to the vault API and the vault team provides an easy to use local development server, each test runs against its own vault server. This means that tests require the vault binary available to spin up the vault server instance. The test suite will first look for the environment variable VAULT_BIN and if not found will fall back to use the vault binary in the $PATH.

Downloads for vault can be found here.

Versioning

This library will follow the version of vault that it was developed against. Since most core operations of vault maintain backwards compatibility, this library can be used against many older and newer versions of vault. If features are added or bugs are fixed, a new point release will be created (ex. 0.6.4 -> 0.6.4.1). If there is some functionality that breaks on a newer version of vault, please submit a pull request.

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].