getgrav / docker-grav

Official Docker Image for Grav
https://getgrav.org
197 stars 123 forks source link

crash when installing official ldap plugin #38

Closed fthiebolt closed 3 years ago

fthiebolt commented 3 years ago

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

... 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
fthiebolt commented 3 years ago

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 ??

mahagr commented 3 years ago

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.

fthiebolt commented 3 years ago

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.

fthiebolt commented 3 years ago

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