symfony 5 LDAP

I was encountering difficulties to work locally with ldap, with that project you can get a good starter to work with a local ldap based on docker containers.

About

This POC demonstrates how to handle a LDAP authentication in symfony 5.

A custom user has been created in order to authenticate users against LDAP and return the matching App\Entity\User based on the username criteria.

If authentication is ok but there is no existing App\Entity\User, the custom user provider will instantiate one and fill it properties from the ldap.

What's inside?

  • webserver container
  • database container
  • ldap container
  • phpldapadmin container

See docker-compose.yml for details.

Usage

Installation

git clone git@github.com:benIT/symfony5-ldap-poc.git
docker-compose up -d
docker exec symfony5-ldap-poc_web_1 bash install.sh

URLs

Credentials

user1/123
user2/123
...

Resources