jopenlibs / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://jopenlibs.github.io/vault-java-driver
29 stars 18 forks source link

[BUG] If the token is not set in VaultConfig, it will not be set automatically after calling .auth().loginByKubernetes() #60

Open trend-jeff-chu opened 9 months ago

trend-jeff-chu commented 9 months ago

Describe the bug I am not sure whether I implement it correctly, here is what I found: If the token is not set in VaultConfig (either by specifying explicitly by calling .token("<my_token>"), or getting from environment variable VAULT_TOKEN), it will not be set automatically after calling .auth().loginByKubernetes("<role>", "<jwt>"). Therefore, it will encounter 403 http error when calling logical().read(xxx)