Search code examples
tokenenterprisehashicorp-vault

How to verify token of ldap user in enterprise hashicorp vault


I am trying to lookup token from hashicorp vault (enterprise version ). its giving me permission denied error on linux terminal. I want to check if token is still valid or not. Could you please provide way for it.

[shell prompt]$ vault token lookup -tls-skip-verify <Vault_Token>
Error looking up token: Error making API request.

URL: POST https://vault.prod.use1.crypto.aws.efx/v1/auth/token/lookup
Code: 403. Errors:

* permission denied

Solution

  • The token with which you are authenticating (likely at ~/.vault-token on disk) doesn't have permission to lookup tokens.

    Try doing this instead:

    $ VAULT_TOKEN=<Vault_Token> vault token lookup
    

    If that also fails, it means the token does not have permission to read information about itself (it's missing the default policy), or it has expired/been deleted.