Difficulty: intermediate
Estimated Time: 30 minutes

You can explore a deeper dive into the OpenLDAP secrets engine that further extends the example in this guide with a full environment based on Docker containers.

Please check out the Docker OpenLDAP Secrets Engine with SSH Demonstration to learn more.

Help and reference

OpenLDAP Secrets Engine

Step 1 of 7

Start OpenLDAP

For the purpose of this tutorial, let's run a community based OpenLDAP Docker image in a container.

Run a OpenLDAP server in a Docker container.

docker run \
  --name vault-openldap \
  --env LDAP_ORGANISATION="learn" \
  --env LDAP_DOMAIN="learn.example" \
  --env LDAP_ADMIN_PASSWORD="2LearnVault" \
  -p 389:389 \
  -p 636:636 \
  --detach \
  --rm \

Verify that the OpenLDAP container is running.

docker ps -f name=vault-openldap --format "table {{.Names}}\t{{.Status}}"

View the OpenLDAP data in openldap-data.ldif.

cat learn-vault-example.ldif

Add the data in openldap-data.ldif to the OpenLDAP server.

ldapadd -cxD "cn=admin,dc=learn,dc=example" \
  -w 2LearnVault \
  -f learn-vault-example.ldif

The output displays the new entries added to the OpenLDAP server.

Now you are ready to configure Vault.