getgrav/docker-grav

crash when installing official ldap plugin

fthiebolt opened this issue · 4 comments

Once docker-grav is running, you login as admin and you ask to install login-ldap officiel plugin: crash !

  • To reproduce: build the grav image from official docker-grav docker file
  • Start container
  • create admin account
  • login as admin
  • install login-ldap official plugin

... then you got a PHP page stating about a critical situation because of missing the php-ldap module

I've been able to circumvent it through a manual install of php-ldap:

docker exec -it <container name> bash

apt-get install -y libldap2-dev
docker-php-ext-configure ldap --prefix=/usr/local/php
docker-php-ext-install ldap

exit

Ok, we're near to abandon grav-cms because ldap login is a key requirement.

Digging a bit, i discovered that login-ldap plugin SUCCESSFULLY accept ldap users ... then, it returns to some caller that (imho) will try to authenticate agains local users that do not exist :(

... maybe tied to the event->stopPropagation ??

This really should be in LDAP plugin issues, but from my quick look at the code, it should work just fine and return AUTHENTICATION_SUCCESS.

That is not enough to log in, though, you also need to set proper permissions for the user from your LDAP account and using the plugin configuration options.

Dear Matias,

You're right ... it took me some to understand that you need to specifiy group access (i.e LDAP groups) in the ldap-plugin and they are unrelated to the accounts/groups definition !

... now it works, sorry for the noise.

anyway, dockerfile need to have

apt-get install -y libldap2-dev
docker-php-ext-configure ldap --prefix=/usr/local/php
docker-php-ext-install ldap

... now it works with our openldap (osixia container).
Best