VaultSharp 0.11.1000
* The most comprehensive .NET Library for HashiCorp's Vault - A Secret Management System.
* VaultSharp supports all Auth methods, all Secrets Engines and most System Apis.
* It has first class support for Consul, Enterpise Vault APIs etc.
* This library is built with .NET Standard 1.3 & .NET 4.5 and hence is cross-platform across .NET Core 1.0, .NET 4.5 and more, Xamarin iOS, Android, Mac, UWP etc.
See the version list below for details.
Install-Package VaultSharp -Version 0.11.1000
dotnet add package VaultSharp --version 0.11.1000
<PackageReference Include="VaultSharp" Version="0.11.1000" />
paket add VaultSharp --version 0.11.1000
#r "nuget: VaultSharp, 0.11.1000"
VaultSharp
A cross-platform .NET Library for HashiCorp's Vault - A Secret Management System.
Also at: http://rajanadar.github.io/VaultSharp/
What is VaultSharp?
- VaultSharp is a .NET Standard 1.3 (and .NET 4.5) cross-platform C# Library that can be used in any .NET application to interact with Hashicorp's Vault.
- The Vault system is a secret management system built as an Http Service by Hashicorp.
VaultSharp has been re-designed ground up, to give a structured user experience across the various auth methods, secrets engines & system apis.
Also, the Intellisense on IVaultClient class should help. I have tried to add a lot of documentation.
Give me a quick snippet for use!
- Add a Nuget reference to VaultSharp as follows
Install-Package VaultSharp -Version <latest_version>
- Instantiate a IVaultClient as follows:
// Initialize one of the several auth methods.
IAuthMethodInfo authMethod = new TokenAuthMethodInfo("MY_VAULT_TOKEN");
// Initialize settings. You can also set proxies, custom delegates etc. here.
var vaultClientSettings = new VaultClientSettings("https://MY_VAULT_SERVER:8200", authMethod);
IVaultClient vaultClient = new VaultClient(vaultClientSettings);
// Use client to read a key-value secret.
var kv2Secret = await vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync("secret-name");
// Generate a dynamic Consul credential
var consulCreds = await vaultClient.V1.Secrets.Consul.GetCredentialsAsync(consulRole, consulMount);
var consulToken = consulCredentials.Data.Token;
Gist of the features
- VaultSharp 0.11.x supports
- All the Auth Methods for Logging into Vault. (AliCloud, AppRole, AWS, Azure, GitHub, Google Cloud, JWT/OIDC, Kubernetes, LDAP, Okta, RADIUS, TLS, Tokens & UserPass)
- All the secret engines to get dynamic credentials. (AD, AWS, Azure, EC2 and IAM, Consul, Cubbyhole, Databases, Google Cloud, Key-Value, Nomad, PKI, RabbitMQ, SSH and TOTP)
- Several system APIs including enterprise vault apis
- You can also bring your own "Auth Method" by providing a custom delegate to fetch a token from anywhere.
- VaultSharp has first class support for Consul engine.
- KeyValue engine supports both v1 and v2 apis.
- Abundant intellisense.
- Provides hooks into http-clients to set custom proxy settings etc.
VaultSharp - Supported .NET Platforms
VaultSharp is built on .NET Standard 1.3 & .NET Framework 4.5. This makes it highly compatible and cross-platform.
The following platforms are supported due to that.
- .NET Core 1.0 and above including .NET Core 2.0
- .NET Framework 4.5 and above
- Mono 4.6 and above
- Xamarin.iOS 10.0 and above
- Xamarin Mac 3.0 and above
- Xamarin.Android 7.0 and above
- UWP 10.0 and above
In Conclusion
- If the above documentation doesn't help you, feel free to create an issue or email me. https://github.com/rajanadar/VaultSharp/issues/new
Happy Coding folks!
VaultSharp
A cross-platform .NET Library for HashiCorp's Vault - A Secret Management System.
Also at: http://rajanadar.github.io/VaultSharp/
What is VaultSharp?
- VaultSharp is a .NET Standard 1.3 (and .NET 4.5) cross-platform C# Library that can be used in any .NET application to interact with Hashicorp's Vault.
- The Vault system is a secret management system built as an Http Service by Hashicorp.
VaultSharp has been re-designed ground up, to give a structured user experience across the various auth methods, secrets engines & system apis.
Also, the Intellisense on IVaultClient class should help. I have tried to add a lot of documentation.
Give me a quick snippet for use!
- Add a Nuget reference to VaultSharp as follows
Install-Package VaultSharp -Version <latest_version>
- Instantiate a IVaultClient as follows:
// Initialize one of the several auth methods.
IAuthMethodInfo authMethod = new TokenAuthMethodInfo("MY_VAULT_TOKEN");
// Initialize settings. You can also set proxies, custom delegates etc. here.
var vaultClientSettings = new VaultClientSettings("https://MY_VAULT_SERVER:8200", authMethod);
IVaultClient vaultClient = new VaultClient(vaultClientSettings);
// Use client to read a key-value secret.
var kv2Secret = await vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync("secret-name");
// Generate a dynamic Consul credential
var consulCreds = await vaultClient.V1.Secrets.Consul.GetCredentialsAsync(consulRole, consulMount);
var consulToken = consulCredentials.Data.Token;
Gist of the features
- VaultSharp 0.11.x supports
- All the Auth Methods for Logging into Vault. (AliCloud, AppRole, AWS, Azure, GitHub, Google Cloud, JWT/OIDC, Kubernetes, LDAP, Okta, RADIUS, TLS, Tokens & UserPass)
- All the secret engines to get dynamic credentials. (AD, AWS, Azure, EC2 and IAM, Consul, Cubbyhole, Databases, Google Cloud, Key-Value, Nomad, PKI, RabbitMQ, SSH and TOTP)
- Several system APIs including enterprise vault apis
- You can also bring your own "Auth Method" by providing a custom delegate to fetch a token from anywhere.
- VaultSharp has first class support for Consul engine.
- KeyValue engine supports both v1 and v2 apis.
- Abundant intellisense.
- Provides hooks into http-clients to set custom proxy settings etc.
VaultSharp - Supported .NET Platforms
VaultSharp is built on .NET Standard 1.3 & .NET Framework 4.5. This makes it highly compatible and cross-platform.
The following platforms are supported due to that.
- .NET Core 1.0 and above including .NET Core 2.0
- .NET Framework 4.5 and above
- Mono 4.6 and above
- Xamarin.iOS 10.0 and above
- Xamarin Mac 3.0 and above
- Xamarin.Android 7.0 and above
- UWP 10.0 and above
In Conclusion
- If the above documentation doesn't help you, feel free to create an issue or email me. https://github.com/rajanadar/VaultSharp/issues/new
Happy Coding folks!
Release Notes
https://github.com/rajanadar/VaultSharp/blob/master/CHANGELOG.md
Dependencies
-
.NETFramework 4.5
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
- System.Net.Requests (>= 4.3.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
Used By
NuGet packages (38)
Showing the top 5 NuGet packages that depend on VaultSharp:
Package | Downloads |
---|---|
Convey.Configurations.Vault
Convey.Configurations.Vault
|
|
Convey.Secrets.Vault
Convey.Secrets.Vault
|
|
NetEscapades.Configuration.Vault
Configuration provider implementation to use with Hashicorp Vault.
|
|
MicroBootstrap
MicroBootstrap is a framework for quickly and conveniently creating microservices on .NET Core.
|
|
Solari.Juno.Abstractions
Abstractions of Juno Library
|
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on VaultSharp:
Repository | Stars |
---|---|
snatch-dev/Convey
A simple recipe for .NET Core microservices.
|
|
andrewlock/NetEscapades.Configuration
Additional configuration providers to use with ASP.NET Core
|
|
devmentors/DNC-DShop.Common
[Distributed .NET Core] Common library for DShop project.
|
Version History
Version | Downloads | Last updated |
---|---|---|
1.6.2 | 432 | 2/22/2021 |
1.6.0.3 | 1,495 | 2/11/2021 |
1.6.0.2 | 24,878 | 1/4/2021 |
1.6.0.1 | 12,528 | 12/7/2020 |
1.6.0 | 6,709 | 11/26/2020 |
1.4.0.7 | 5,101 | 11/25/2020 |
1.4.0.6 | 2,639 | 11/20/2020 |
1.4.0.5 | 128,359 | 8/1/2020 |
1.4.0.4 | 63,820 | 6/25/2020 |
1.4.0.3 | 128,058 | 5/7/2020 |
1.4.0.2 | 218 | 5/7/2020 |
1.4.0.1 | 67,657 | 4/28/2020 |
1.4.0 | 3,261 | 4/25/2020 |
0.11.1003 | 17,551 | 4/23/2020 |
0.11.1002 | 806,183 | 4/21/2019 |
0.11.1001 | 280 | 4/20/2019 |
0.11.1000 | 92,523 | 4/15/2019 |
0.11.1-beta1 | 884 | 3/18/2019 |
0.11.0 | 308,074 | 9/1/2018 |
0.10.4003 | 1,186 | 8/22/2018 |
0.10.4002 | 510 | 8/16/2018 |
0.10.4001 | 718 | 8/10/2018 |
0.10.4000 | 5,172 | 7/31/2018 |
0.6.5-beta1 | 11,763 | 4/11/2017 |
0.6.4 | 257,133 | 1/18/2017 |
0.6.1 | 6,019 | 10/3/2016 |
0.4.1 | 3,456 | 1/21/2016 |
0.4.0 | 1,167 | 1/21/2016 |