Skip to content

X-Vault-Token should be optional #183

Closed
@jetersen

Description

@jetersen

Trying to add support for interacting with Vault agent: jenkinsci/hashicorp-vault-plugin#36
Found out after much headache my issue was with vault-java-driver because it assumes vault-token is mandatory, which it is not in the case of the auto-auth use case for Vault agent. The null pointer results in 400 Bad Request.

image

Example of vault cli against the very same endpoint (ngrok used for inspection purpose 😓)

$ VAULT_ADDR=http://0c19b983.ngrok.io vault kv get kv-v1/admin
==== Data ====
Key     Value
---     -----
key1    123
key2    456

You can set up the vault agent to use auto-auth and handle the requesting the token. So the application does not need to be concerned about caching or reauthenticating against vault.

https://www.vaultproject.io/docs/agent/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions