Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to look up namespace from the token #325

Closed
discofire opened this issue Jul 26, 2023 · 2 comments
Closed

Failed to look up namespace from the token #325

discofire opened this issue Jul 26, 2023 · 2 comments

Comments

@discofire
Copy link

discofire commented Jul 26, 2023

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 am able to login to the vault webpage using token authentication using the token
  • I am able to login and retrieve secrets from the command line using the token
  • I am able to login and retrieve secrets from a Python script using the hvac package with the same token.

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

@konidev20
Copy link
Collaborator

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
Copy link
Owner

closing due to no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants