vault-cli icon indicating copy to clipboard operation
vault-cli copied to clipboard

Support LDAP Authentication

Open MarkRx opened this issue 4 years ago • 1 comments

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)

MarkRx avatar Jan 18 '21 20:01 MarkRx

You're right, it's currently unsupported. Are you interested in making a contribution ? I'd be happy to help :)

ewjoachim avatar Jan 19 '21 10:01 ewjoachim