Hi, maybe someone can help.
I try to request an otp via the api
In the UI it works fine
login with ldap user works
curl --request POST \
--data @payload.json \
$VAULT_ADDR/v1/auth/ldap/login/user
but when I try to get an otp I get permission denied.
curl \
--request POST \
--data @ip.json \
$VAULT_ADDR/v1/ssh/creds/testuser
{"errors":["permission denied"]}
Thank you!
maxb
December 15, 2022, 9:03am
2
Nowhere in this command are you sending your Vault token along with the request, so you are effectively not logged in at this point.
If you really want to use curl
instead of the Vault CLI, you have to manually include an X-Vault-Token
header with every non-login request.
Thanks maxb,
do I get the X-Vault-Token with the login request or how do I get it?
Or can I just do one request. ldap and otp together?
Sorry, I’m pretty new to vault.
maxb
December 15, 2022, 10:26am
4
Yes.
No, there is no way to bundle multiple requests into one.
Thank you so much.
Got it working!