VaultSharp 0.10.4003
See the version list below for details.
Install-Package VaultSharp -Version 0.10.4003
dotnet add package VaultSharp --version 0.10.4003
<PackageReference Include="VaultSharp" Version="0.10.4003" />
paket add VaultSharp --version 0.10.4003
#r "nuget: VaultSharp, 0.10.4003"
// Install VaultSharp as a Cake Addin
#addin nuget:?package=VaultSharp&version=0.10.4003
// Install VaultSharp as a Cake Tool
#tool nuget:?package=VaultSharp&version=0.10.4003
VaultSharp
A cross-platform .NET Library for HashiCorp's Vault - A Secret Management System.
VaultSharp Latest Documentation: Inline Below and 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.10.x supports
- All the Auth Methods for Logging into Vault. (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 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!
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1 |
.NET Framework | net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen30 tizen40 tizen60 |
Universal Windows Platform | uap uap10.0 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.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)
NuGet packages (48)
Showing the top 5 NuGet packages that depend on VaultSharp:
Package | Downloads |
---|---|
Convey.Secrets.Vault
Convey.Secrets.Vault |
|
Convey.Configurations.Vault
Convey.Configurations.Vault |
|
Else.Convey.Secrets.Vault
Convey.Secrets.Vault |
|
Else.Else.WebApi.Vault
Else.WebApi.Vault |
|
NetEscapades.Configuration.Vault
Configuration provider implementation to use with Hashicorp Vault. |
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 | Downloads | Last updated |
---|---|---|
1.7.0.4 | 297,954 | 11/26/2021 |
1.7.0.3 | 11,400 | 11/21/2021 |
1.7.0.2 | 1,971 | 11/20/2021 |
1.7.0.1 | 121,625 | 10/4/2021 |
1.7.0 | 160,000 | 8/14/2021 |
1.6.5.1 | 51,423 | 7/17/2021 |
1.6.5 | 23,588 | 6/27/2021 |
1.6.2.5 | 114,692 | 6/15/2021 |
1.6.2.4 | 5,442 | 6/13/2021 |
1.6.2.3 | 15,375 | 6/5/2021 |
1.6.2.2 | 42,492 | 5/23/2021 |
1.6.2.1 | 188,553 | 3/1/2021 |
1.6.2 | 85,065 | 2/22/2021 |
1.6.0.3 | 10,478 | 2/11/2021 |
1.6.0.2 | 209,539 | 1/4/2021 |
1.6.0.1 | 33,468 | 12/7/2020 |
1.6.0 | 52,622 | 11/26/2020 |
1.4.0.7 | 72,107 | 11/25/2020 |
1.4.0.6 | 6,322 | 11/20/2020 |
1.4.0.5 | 494,988 | 8/1/2020 |
1.4.0.4 | 180,814 | 6/25/2020 |
1.4.0.3 | 249,915 | 5/7/2020 |
1.4.0.2 | 449 | 5/7/2020 |
1.4.0.1 | 125,549 | 4/28/2020 |
1.4.0 | 10,907 | 4/25/2020 |
0.11.1003 | 95,706 | 4/23/2020 |
0.11.1002 | 1,541,414 | 4/21/2019 |
0.11.1001 | 527 | 4/20/2019 |
0.11.1000 | 177,282 | 4/15/2019 |
0.11.1-beta1 | 1,017 | 3/18/2019 |
0.11.0 | 520,341 | 9/1/2018 |
0.10.4003 | 1,718 | 8/22/2018 |
0.10.4002 | 778 | 8/16/2018 |
0.10.4001 | 1,058 | 8/10/2018 |
0.10.4000 | 11,622 | 7/31/2018 |
0.6.5-beta1 | 14,303 | 4/11/2017 |
0.6.4 | 372,563 | 1/18/2017 |
0.6.1 | 6,493 | 10/3/2016 |
0.4.1 | 4,232 | 1/21/2016 |
0.4.0 | 1,776 | 1/21/2016 |