vault-cli
vault-cli copied to clipboard
Support LDAP Authentication
I've read the documentation and looked through the code but I don't see a way to set the authentication to use the ldap method. Is this supported? It might simply be a tweak to the authentication mechanism to grab a token to use a different body and url.
The curl command to authenticate with LDAP looks like this:
VAULT_TOKEN=$(curl -s -S \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "X-Vault-Namespace: $NAMESPACE" \
--data @<(/usr/bin/cat <<< "{\"password\":\"$VAULT_PASSWORD\"}") \
"$VAULT_URL/v1/auth/ldap/login/$USERNAME" \
| jq -j .auth.client_token)
You're right, it's currently unsupported. Are you interested in making a contribution ? I'd be happy to help :)