Questions tagged [vaultsharp]

Use the **vaultsharp** tag for all questions and problems related to the usage of VaultSharp, a C# .NET based client library to HashiCorp's Vault server.

VaultSharp is the most comprehensive .NET library written for HashiCorp's Vault server which is a Secret management system.

Use the vaultsharp tag for all questions and problems related to the usage of VaultSharp, a C# .NET based client library to HashiCorp's Vault server.

Problems include initialization of the client, customization with proxy etc., using the various Auth methods, various Secret engines, System APIs, Enterprise APIs etc.

A lot of the problems may be cleared by referring to the docs at http://rajanadar.github.io/VaultSharp

If you feel there is a feature missing, feel free to create a new issue here: https://github.com/rajanadar/VaultSharp/issues/new

25 questions
3
votes
3 answers

Connecting to vault and using credentials

I am trying to setup hashicorp vault and fetch our key value pairs (database credentials) stored in the vault. I am following below link to connect to vault and fetch credentials from the vault https://github.com/rajanadar/VaultSharp I can connect…
Brenda
  • 510
  • 3
  • 13
  • 36
2
votes
1 answer

How do I sign with HashiCorp Vault

i don't know if this question is very easy and I just didn't figure it out how to sign with HashiCorp-Vault´s Api VaultSharp, but I am despairing. The entire Documentation with examples can be found here:…
Manuel
  • 73
  • 5
2
votes
1 answer

Vaultsharp : System.AggregateException: 'One or more errors occurred. ({"errors":["no handler for route 'kv-v2/data'

Can not seem to get pass this error. hashicorp vault is running on my k3s env. I can get to the vault UI fine. I can also curl vault [POST, GET] using the following : curl --location --request POST 'http://192.168.8.110:31476/v1/niv/data/foo'…
Optimus Prime
  • 43
  • 1
  • 11
2
votes
1 answer

VaultSharp: "permission denied" when trying to list secrets

I keep trying to simply list the secrets in my KeyValue Vault via API and I'm getting "permission denied" using AppRole auth. Here's what I have so far. Caller private async Task RetrieveSecrets() { // Fails here, though it's the actual service…
Ari Roth
  • 5,392
  • 2
  • 31
  • 46
1
vote
1 answer

Does PerformImmediateLogin throw a custom exception? If so, what is the type?

When calling we'd like to be able to catch any exceptions in a try catch and hand over to our handler. IVaultClient vaultClient = new VaultClient(vaultClientSettings); try { vaultClient.V1.Auth.PerformImmediateLogin(); } catch ( Exception e)…
MB34
  • 4,210
  • 12
  • 59
  • 110
1
vote
0 answers

Using static database roles with VaultSharp

I am looking into using VaultSharp to manage static roles for my Microsoft SQL Server and having a hard time getting it to work the way I expected and believe that the implementation by VaultSharp might be off in this area. This is my code that…
illug
  • 793
  • 1
  • 9
  • 23
1
vote
1 answer

Can I auth using VaultSharp with just an LDAP username?

I have a Windows service running as a an AD user. I do not have the password for this user (not without storing it in a file somewhere). The method signatures for VaultSharp LDAP auth all want a username and password, but is there any other way of…
Reezy
  • 984
  • 1
  • 9
  • 12
1
vote
1 answer

Hashicorp Vaultsharp permission denied error

Error System.Exception: Vault configuration failed: One or more errors occurred. ({"errors":["1 error occurred:\n\t* permission denied\n\n"]} ) at VaultConnection.VaultExtensions.AddVaultKeys.GetValutKeyValuePairs(IConfiguration buildConfig)…
fortanu82
  • 351
  • 1
  • 9
  • 19
0
votes
0 answers

Error: The request was aborted: Could not create SSL/TLS secure channel

.NET version is 4.6.2 and The version of VaultSharp package being used is VaultSharp.1.4.0.1 Code: ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | …
hacksdump
  • 71
  • 2
  • 5
0
votes
1 answer

understanding how to call secrets engine in vault sharp

we are using Hashi vault enterprise. I have a couple of questions as I am struggling to understand what variables go where and how to format them. Here is my vault settings. Assume v1. we are currently using v1 kv vault Version 1. First we use…
Jay
  • 21
  • 2
0
votes
0 answers

VaultSharp - Is it possible to unit test, mock VaultClient, set "Returns"

Is there a way to mockup the VaultSharp VaultClient? I'm looking to build out a few unit tests Any examples would be greatly…
0
votes
1 answer

VaultSharp - How to generate a secret-id?

I'm currently using the latest version of VaultSharp in a project. Can you tell me if it's possible to generate a secret-id using the library please? Something along the lines of: vault write -force auth/apppole/role/myapp/secret-id Thank you in…
0
votes
1 answer

HAProxy - Forwarding Client Certificate to backend HashiCorp Vault servers

I've been trying for about a week to setup a HashiCorp Vault environment, but have gotten stuck at setting up the last part: HAProxy, as I am unable to forward my Client Certificate to my backend. My current setup on the HAProxy is this: frontend…
0
votes
1 answer

VaultSharp AppRole Login Unwrapping problem

I logged in via the CLI using my standard Token obtained from the UI. Then I ran this to get a wrapping token: vault write auth/approle/login role_id="e309ea24-994c-771e-939f-49e24a936ef2" secret_id="9597c7d0-3a88-c8f7-e43f-e8999600e38e" that call…
MB34
  • 4,210
  • 12
  • 59
  • 110
0
votes
1 answer

Differentiation between the namespace, path, mountpoint, etc

The Hashicorp documentation leaves a lot to be desired when it comes to implementing a solution using .Net and the VaultSharp documentation isn't as comprehensive enough to cover the multitude of scenarios. We have our Vault setup with a namespace,…
MB34
  • 4,210
  • 12
  • 59
  • 110
1
2