example_configs/hashicorp-vault.md
Official LDAP configuration documentation is located here.
You'll need to authenticate using your root token or as a user who has permission to modify authentication methods!
Access -> Authentication MethodsEnable new method + in the top right and choose LDAP under InfraEnable method at the bottomldap://lldap.example.com:3890 or ldaps://lldap.example.com:6360Insecure TLS otherwise leave this uncheckeduidcn=admin,ou=people,dc=example,dc=comou=people,dc=example,dc=comChangeMe!(&(uid={{.Username}})(objectClass=person))(&(member={{.UserDN}})(objectclass=groupOfUniqueNames))cnou=groups,dc=example,dc=comSave at the bottomCreate group + under the Groups tabdefault or whatever policy you want to tie to this groupSave at the bottomAs long as your user is in the group you specified, you should now be able to select LDAP from the dropdown on the login page and use your credentials.
This requires the vault CLI to be installed on your machine
Set VAULT_ADDR environment variable
export VAULT_ADDR=https://vault.example.com
Login to vault and provide token when prompted
vault login
Enable the LDAP authentication method
vault auth enable ldap
Configure the LDAP authentication method
vault write auth/ldap/config \
url="ldaps://lldaps.example.com:6360" \
binddn="cn=admin,ou=people,dc=example,dc=com" \
bindpass="ChangeMe!" \
userdn="ou=people,dc=example,dc=com" \
userfilter="(&(uid={{.Username}})(objectClass=person))" \
groupdn="ou=groups,dc=example,dc=com" \
groupfilter="(&(member={{.UserDN}})(objectclass=groupOfUniqueNames))" \
userattr="uid" \
groupattr="cn" \
discoverdn=false
If you are using plain LDAP, change the URL accordingly. If you're using LDAPS and your server does not have your LDAPS certificate installed append insecure_tls=true to the bottom of the command.
Add your group to the LDAP configuration and set the policy
vault write auth/ldap/groups/vault_users policies=default
As long as your user is in the group you specified, you should now be able to select LDAP from the dropdown on the login page and use your credentials.