SlugEnt.VaultAgent 1.2.0-alpha-0001b

This is a prerelease version of SlugEnt.VaultAgent.
There is a newer version of this package available.
See the version list below for details.
dotnet add package SlugEnt.VaultAgent --version 1.2.0-alpha-0001b
                    
NuGet\Install-Package SlugEnt.VaultAgent -Version 1.2.0-alpha-0001b
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SlugEnt.VaultAgent" Version="1.2.0-alpha-0001b" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SlugEnt.VaultAgent" Version="1.2.0-alpha-0001b" />
                    
Directory.Packages.props
<PackageReference Include="SlugEnt.VaultAgent" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SlugEnt.VaultAgent --version 1.2.0-alpha-0001b
                    
#r "nuget: SlugEnt.VaultAgent, 1.2.0-alpha-0001b"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SlugEnt.VaultAgent@1.2.0-alpha-0001b
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SlugEnt.VaultAgent&version=1.2.0-alpha-0001b&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SlugEnt.VaultAgent&version=1.2.0-alpha-0001b&prerelease
                    
Install as a Cake Tool

VaultAgent

VaultAgent is a C# library that provides an opinionated access to the HashiCorp Vault API Interface. It has extensive unit tests for each of the implemented API methods and backends as well as robust error handling and plenty of documentation. C# classes that map to JSON objects are always used to return information to the caller.

It has been Unit tested against Vault version 1.8.4 (Latest as of October 2021).

Release Notes

Version 1.2

  • ListSecrets methods replaced with a single method --> ListSecrets
  • ListSecrets functionality is now controled by a KV2ListSecretSettings object
  • ListSecrets has ability to return an entire tree hierarchy of secrets, full path names, Just parent secrets or just child secrets and more
  • DeleteSecrets now will fully traverse the requested secrets tree and delete all child secrets. This is the only way in vault to ensure a secret with children is deleted.

Implemented Functionality

This library implements several key parts of vault

  • System Backend

    • Mounts - Fully Implemented
    • Auth - Fully Implemented
    • Audit - (Partial - no hash)
    • Capabilities (Partial)
    • Policy / Policies - Fully Implemented
  • App Role Backend (95% implemented, just a couple of the accessor and other minor functions not implemented.)

  • LDAP Auth Backend (85%)

    • Login - Implemented
    • Group To Policy Mapping - Implemented
    • Save / Read LDAP Engine Config - Implemented
    • Some user methods implemented Mainly missing delete group method
  • Token Auth Backend (95%)

    • All important methods and most informational methods implemented.
  • Identity Secret Engine (60%)

    • All Entity and Entity Alias methods implemented
    • Missing Group information.
  • KeyValue V2 (100%)

    • Fully implemented.
  • KeyValue V1 (90%)

  • Transit (90%)

Next Steps

  • Finish the LDAP and Identity backends.

Usage

To test the library you will need to have a local instance of the Vault binary installed somewhere. In the Solution Folder there is a RunVaultDev.bat script that you can use as a sample for starting your own Vault instance up. Both the Unit Test and the VaultClient sample require a Vault Instance with the following configuration.

  • IP Address: 127.0.0.1
  • Port: 16100
  • Root Token: tokenA

The RunVaultDev.bat file will automatically start a development instance of Vault up with the above settings. These Vault Settings are hardcoded in 2 places in the test/sample projects:

  • VaultClient - VaultClient_Main
  • VaultAgent.Test - VaultServerSetup.cs:InitTestingSetup

VaultClient

At the moment this pretty much needs to be re-written with some real samples. At the present it is wired for an Active Directory Login and thus nothing will work without this.

This needs to be replaced.

The Transit samples work

#!CSharp
// The following are all examples of use

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 277 4/3/2024
1.2.1 301 7/5/2023
1.2.0 543 7/23/2022
1.2.0-alpha-0001b 276 7/9/2022
1.2.0-alpha-0000 328 10/23/2021
1.1.0 632 3/30/2021
1.0.0 570 8/28/2020
1.0.0-rc-243 509 8/14/2020
1.0.0-rc-242 520 8/1/2020
1.0.0-rc-241 442 7/31/2020
1.0.0-rc-239 443 7/30/2020
1.0.0-rc-237 555 7/25/2020
1.0.0-rc-235 441 7/2/2020
1.0.0-rc-233 415 7/2/2020
1.0.0-rc-232 459 7/2/2020
1.0.0-rc-231 422 6/24/2020
1.0.0-rc-227 529 6/23/2020
1.0.0-rc-224 467 6/23/2020
1.0.0-rc-219 484 6/23/2020
1.0.0-rc-218 489 6/23/2020
1.0.0-rc-216 519 6/22/2020
1.0.0-rc-213 475 6/4/2020
1.0.0-rc-212 461 6/1/2020
1.0.0-rc-210 439 6/1/2020
1.0.0-rc-209 482 5/5/2020
1.0.0-rc-208 486 4/30/2020
1.0.0-rc-205 445 4/26/2020
1.0.0-rc-201 446 4/22/2020
1.0.0-rc-187 452 4/20/2020
1.0.0-rc-186 474 4/16/2020
1.0.0-rc-183 462 4/15/2020
1.0.0-rc-181 485 4/1/2020
1.0.0-rc-172 482 4/1/2020
1.0.0-rc-167 472 4/1/2020
1.0.0-rc-164 495 3/11/2020
1.0.0-rc-126 442 3/6/2020
1.0.0-rc-124 593 2/1/2020
1.0.0-rc-118 535 1/31/2020
1.0.0-rc-114 492 1/30/2020
1.0.0-rc-113 491 1/28/2020
1.0.0-rc-112 486 1/28/2020
1.0.0-rc-110 520 1/27/2020
1.0.0-rc-103 573 1/26/2020
1.0.0-rc-01 636 1/19/2020
0.1.0 1,134 1/14/2019

Supports Token, LDAP, AppRole, System, Transit, Identity, Keyvalue1 and KeyValue2 backends.