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
0
votes
0 answers

KeyValue: Is there a method to testif a secret exists without retrieving the data ? As a more secure approach to ReadSecretAsync

In our codebase we want a service to verify if a secret (key) is present without actually reading the secret. Using 1.7.0.4 on .NET 6 such a request can be done in this way : curl https://myvaultserver/v1/secret/subkeys/mygroup/myservice data is…
0
votes
1 answer

How to get all Leases or Http Client from VaultSharp?

I am using HashiCorp Vault 1.10.0 to maintain secrets and for this, I am using VaultSharp in C# .Net Core 6.0. I am new to VaultSharp and I have ask about it that how can I get Leases from the VaultSharp (I tried but not able to find such…
0
votes
1 answer

How to read secret using vaultsharp

I have created a secret in the default cubbyhole secret engine named secret1. Now I'd like to read this secret, which works fine from vault online CLI : vault read cubbyhole/secret1 But with the following code : static void Main(string[] args) { …
a17sans
  • 13
  • 3
0
votes
1 answer

VaultSharp: Why I get the "no handler for route" error?

Windows 10 x64 Vault works in the docker container on my computer. I can get my secret successfully by the container console: But I get the exception when I try to do the same through C# code (VaultSharp, .Net Framework 4.8): try { …
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
0
votes
1 answer

How do I determine the TTL of the Vault token the VaultClient acquires

I'm currently handling the TTL expiring like this: Secret v2Secret; try { v2Secret = await this.vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync(vaultPath).ConfigureAwait(false); } catch (VaultApiException e) { …
Pete Whitehead
  • 178
  • 2
  • 11
0
votes
1 answer

In the VaultSharp library, what's the equivalent of setting the VAULT_CACERT environment variable?

I'm getting the error An error occurred while sending the request when using the VaultSharp library in C# to request secrets from a Vault service. I can get the access token I need from the command line, so I know the Vault address and my personal…
Kevin J
  • 23
  • 1
  • 5
0
votes
1 answer

Hashicorp Vault Kerberos Auth with VaultSharp

I'm having great difficulty getting Kerberos Auth working with Vault using VaultSharp. I don't have control over Vault server but I've been informed that it is configured and ready to use. I'm using .NET running in IIS and I want to make use of the…
PostureOfLearning
  • 3,481
  • 3
  • 27
  • 44
0
votes
2 answers

Read Vault secret with VaultSharp in C#

The VaultSharp package seems to contain all I want and it is well-documented. I tried to use VaultSharp package to read our secrets from a Vault server. But my rusty C# stopped me at line Secret kv2Secret = await…
user3400152
  • 133
  • 6
  • 13
0
votes
1 answer

Token Life cycle managment

Does VaultSharp manage token life cycle? I am using VaultSharp and see the token lease duration is set at 3,600 seconds. I ran some tests within that time using a singleton instance of the VaultClient object. Everything worked as expected. Only…
MC1234
  • 1
0
votes
1 answer

vaultsharp tls auth failed - client certificate must be supplied

Vaultsharp is not able to authenticate with vault for TLS AUTH method C# code on windows 10, cert and key in personal store environment windows X509Certificate2 clientCertificate = null; X509Store store = new…
Rahul Jain
  • 23
  • 11
1
2