VaultSharp 0.11.1-beta1
See the version list below for details.
dotnet add package VaultSharp --version 0.11.1-beta1
NuGet\Install-Package VaultSharp -Version 0.11.1-beta1
<PackageReference Include="VaultSharp" Version="0.11.1-beta1" />
paket add VaultSharp --version 0.11.1-beta1
#r "nuget: VaultSharp, 0.11.1-beta1"
// Install VaultSharp as a Cake Addin #addin nuget:?package=VaultSharp&version=0.11.1-beta1&prerelease // Install VaultSharp as a Cake Tool #tool nuget:?package=VaultSharp&version=0.11.1-beta1&prerelease
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!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.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 (83)
Showing the top 5 NuGet packages that depend on VaultSharp:
Package | Downloads |
---|---|
FenixAlliance.APS.Core
Application Component for the Alliance Business Suite. |
|
VaultSharp.Extensions.Configuration
Configuration extension that allows you to use Hashicorp Vault as a configuration backend. This library is built with .NET Standard 2.0, 2.1, .NET 6, .NET 7, .NET 8 |
|
Convey.Secrets.Vault
Convey.Secrets.Vault |
|
Sitko.Core.Configuration.Vault
Sitko.Core is a set of libraries to help build .NET Core applications fast |
|
Else.Convey.Secrets.Vault
Convey.Secrets.Vault |
GitHub repositories (8)
Showing the top 5 popular GitHub repositories that depend on VaultSharp:
Repository | Stars |
---|---|
phongnguyend/Practical.CleanArchitecture
Full-stack .Net 8 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 18, React 18, Vue 3, BFF with YARP, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, Entity Framework Core, OpenTelemetry, SignalR, Hosted Services, Health Checks, Rate Limiting, Cloud Services (Azure, AWS, GCP).
|
|
snatch-dev/Convey
A simple recipe for .NET Core microservices.
|
|
andrewlock/NetEscapades.Configuration
Additional configuration providers to use with ASP.NET Core
|
|
Raiffeisen-DGTL/ViennaNET
Framework for quickly creating enterprise microservices on .NET https://habr.com/ru/company/raiffeisenbank/blog/494830/
|
|
ElectNewt/Distribt
|
Version | Downloads | Last updated |
---|---|---|
1.17.5.1 | 138,277 | 9/18/2024 |
1.17.5 | 4,955 | 9/16/2024 |
1.13.0.1 | 3,299,567 | 4/3/2023 |
1.13.0.1-beta1 | 2,403 | 4/1/2023 |
1.13.0 | 72,452 | 3/25/2023 |
1.12.2.1 | 828,198 | 1/24/2023 |
1.12.2 | 835,355 | 12/9/2022 |
1.8.12 | 18,109 | 12/9/2022 |
1.7.2.2 | 42,834 | 12/7/2022 |
1.7.2.1 | 5,933 | 12/7/2022 |
1.7.2 | 4,401 | 12/6/2022 |
1.7.1 | 1,300,619 | 7/28/2022 |
1.7.0.5 | 276,135 | 7/18/2022 |
1.7.0.4 | 2,273,693 | 11/26/2021 |
1.7.0.3 | 33,599 | 11/21/2021 |
1.7.0.2 | 5,428 | 11/20/2021 |
1.7.0.1 | 348,607 | 10/4/2021 |
1.7.0 | 409,415 | 8/14/2021 |
1.6.5.1 | 116,162 | 7/17/2021 |
1.6.5 | 45,087 | 6/27/2021 |
1.6.2.5 | 300,094 | 6/15/2021 |
1.6.2.4 | 59,880 | 6/13/2021 |
1.6.2.3 | 73,511 | 6/5/2021 |
1.6.2.2 | 56,124 | 5/23/2021 |
1.6.2.1 | 656,402 | 3/1/2021 |
1.6.2 | 100,164 | 2/22/2021 |
1.6.0.3 | 30,169 | 2/11/2021 |
1.6.0.2 | 479,034 | 1/4/2021 |
1.6.0.1 | 51,973 | 12/7/2020 |
1.6.0 | 177,045 | 11/26/2020 |
1.4.0.7 | 152,141 | 11/25/2020 |
1.4.0.6 | 11,151 | 11/20/2020 |
1.4.0.5 | 853,419 | 8/1/2020 |
1.4.0.4 | 304,740 | 6/25/2020 |
1.4.0.3 | 418,931 | 5/7/2020 |
1.4.0.2 | 3,035 | 5/7/2020 |
1.4.0.1 | 145,595 | 4/28/2020 |
1.4.0 | 47,404 | 4/25/2020 |
0.11.1003 | 161,394 | 4/23/2020 |
0.11.1002 | 2,683,929 | 4/21/2019 |
0.11.1001 | 3,025 | 4/20/2019 |
0.11.1000 | 407,713 | 4/15/2019 |
0.11.1-beta1 | 3,348 | 3/18/2019 |
0.11.0 | 720,718 | 9/1/2018 |
0.10.4003 | 4,780 | 8/22/2018 |
0.10.4002 | 3,370 | 8/16/2018 |
0.10.4001 | 3,602 | 8/10/2018 |
0.10.4000 | 16,230 | 7/31/2018 |
0.6.5-beta1 | 28,147 | 4/11/2017 |
0.6.4 | 511,811 | 1/18/2017 |
0.6.1 | 10,424 | 10/3/2016 |
0.4.1 | 6,804 | 1/21/2016 |
0.4.0 | 6,599 | 1/21/2016 |