rajanadar / VaultSharp

A comprehensive cross-platform .NET Library for HashiCorp's Vault, a secret management tool
http://rajanadar.github.io/VaultSharp
Apache License 2.0
488 stars 130 forks source link

Failed to look up namespace from the token #325

Closed discofire closed 1 week ago

discofire commented 1 year ago

Describe the bug Unable to perform any calls (ReadSecretsAsync, ReadConfigAsync, etc...)

VaultSharp Version 1.13.0.1

Vault Version 1.12.0-dev1

Does this work with Vault CLI? Yes

Sample Code `Snippet

string vaultToken = @"hvs.ahjsdkfjhasdkfjhaskdfjhksfLOTSOFSTUFFaksjdhfksajhf"; //This is not my actual token
var tokenAuthMethod = new TokenAuthMethodInfo(vaultToken);
var vaultClientSettings = new VaultClientSettings(this.environmentVariables["VAULT_URL"], tokenAuthMethod);
var vaultClient = new VaultSharp.VaultClient(vaultClientSettings);
vaultClient.V1.Secrets.KeyValue.V2.ReadConfigAsync();

Exception Details/Stack Trace/Error Message VaultApiException: {"errors":["error performing token check: failed to look up namespace from the token: no namespace"]}

Any additional info

I also tried version 1.13.0 (initially installed before upgrading hoping maybe a bug had been fixed).

konidev20 commented 1 year ago

Hey @discofire,

  1. Do you have an enterprise version of HashiCorp Vault?
  2. Can you give me an example of the VAULT_URL and mountPoint for the KV engine?
rajanadar commented 1 week ago

closing due to no response.