Lizmap-web-client: Config LDAP authentication

Created on 12 Feb 2019  路  4Comments  路  Source: 3liz/lizmap-web-client

Hi,
I have some questions about ldap configuration with Lizmap. See my configuration below :

  • Lizmap 3.3pre.181017
  • Active directory 2008
  • Apache 2.2 / PHP 5
    According to the 3liz doc i setup the localconfig.ini.php file with
[modules]
ldapdao.access=1
[coordplugin_auth]
driver=ldapdao

My profile.ini.php file

[ldap:lizmapldap]
hostname=ldap://serverldap
port=389
adminUserDn="CN=USERADM,OU=XXXX,DC=XXX,DC=priv"
adminPassword="PWD"
searchUserBaseDN="DC=XXX,DC=priv"
searchUserFilter="(samaccountname=%%LOGIN%%)"
bindUserDN="samaccountname=%?%,DC=XXX,DC=priv"
searchAttributes="uid:login,givenname:firstname,sn:lastname,mail:email"
searchGroupFilter=
searchGroupProperty="cn"
searchGroupBaseDN=""

I add those parameters (not in doc) in index/auth.coord.ini.php

;--- ldap parameters
[ldapdao]
; profile to use for ldap
ldapprofile = "lizmapldap"

This configuration seems dont block the app. The admin user is still accessible locally. But i can't connect with a user LDAP.

Is there anyway to see traces (debug)?
Did i understand well how lizmap works ? The user is created when logged for the first time isn't it ?

I tried to use ldapsearch command and i found my user.
Can you help ?

question

All 4 comments

The user is created when logged for the first time isn't it ?
yes

>

Yes.
Into lizmap/var/config/localconfig.ini.php, adds this parameters:

[logger]
auth=file

[fileLogger]
auth=auth.log

When trying to login, you will have a lizmap/var/log/auth.log file created and filled with some messages, indicated what happened.

Good hint, thanks. Could this be added to the manual?

I added it into the documentation :)

While configuring LDAP for lizmap auth i notice a little problem. There are various fields in db (jauth.db in my case) that can't be null and the use of the doc example for LDAP produce errors for all the fileds not mapped and it can be only seen debugging the ldap connection.

So if I can, i suggest to modify lizmap-doc (ldap settings) line for searchAttributes as ...
from => searchAttributes="uid:login,givenName:firstname,sn:lastname,mail:email"
to => searchAttributes="uid:login,givenName:firstname,sn:lastname,mail:email,organization:organization,street:street,postcode:postcode,city:city"
[lizmap 3.2.3 on debian9, apache2, postggres9.6]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pcav picture pcav  路  5Comments

pcav picture pcav  路  11Comments

jaitor1 picture jaitor1  路  4Comments

Nokram picture Nokram  路  5Comments

josemvm picture josemvm  路  13Comments