wekan / ldap

LDAP support for Wekan code has been moved to https://github.com/wekan/wekan/tree/master/packages/wekan-ldap , issues to https://github.com/wekan/wekan/issues , and if PRs are needed please add them instead to https://github.com/wekan/wekan/pulls
https://github.com/wekan/wekan/tree/master/packages/wekan-ldap
MIT License
12 stars 10 forks source link

Issue: unset variable LDAP_FULLNAME_FIELD #21

Closed loic74 closed 5 years ago

loic74 commented 5 years ago

I got this error today : [WARN] Lookup for unset variable: LDAP_FULLNAME_FIELD Everything was functional before.

Any idea ? Thanks

xet7 commented 5 years ago

@alkemyst

How did you configure CN to fullname at #10 at that I included in newest release of Wekan ?

Should it have some default value in Snap config and Snap help and Wekan repo's Dockerfile + docker-compose.yml etc?

Can you add those?

alkemyst commented 5 years ago

Well, unfortunately I do not know any ldap database other than our own. For our database the LDAP_FULLNAME_FIELD is "displayName" I am not familiar with snap, but if you point me to the right file I can add it. In any case I would tend to avoid setting it by default, as it might not match with the users LDAP server

loic74 commented 5 years ago

First of all, I would like to apologize because I am not a developer. Maybe there's something obvious that I don't see...

I added this in Wekan config (displayName is our fullname field too): ldap-sync-user-data-fieldmap = '{\"cn\":\"displayName\", \"mail\":\"mail\"}' ldap-fullname-field = 'displayName'

I don't see any setting to add after reading the documentation.

Here's my complete configuration:

ldap-authentication            true
ldap-authentication-password   *********
ldap-authentication-userdn     CN=ldap,CN=users,DC=c3r,DC=local
ldap-basedn                    DC=c3r,DC=local
ldap-connect-timeout           10000
ldap-enable                    true
ldap-fullname-field            displayName
ldap-host                      192.168.0.3
ldap-idle-timeout              10000
ldap-log-enabled               true
ldap-merge-existing-users      true
ldap-port                      389
ldap-reconnect                 true
ldap-sync-user-data-fieldmap   {\"cn\":\"displayName\", \"mail\":\"mail\"}
ldap-timeout                   10000
ldap-user-search-field         sAMAccountName
ldap-user-search-filter        objectClass=*
ldap-userdn                    CN=ldap,CN=users,DC=c3r,DC=local
ldap-username-field            sAMAccountName
mail-from                      Wekan@********.com
mail-url                       smtp://192.168.3.89:25/
mongodb-bind-ip                0.0.0.0
mongodb-bind-unix-socket       /var/snap/wekan/current/share/
mongodb-port                   27019
port                           8181
root-url                       http://192.168.0.6:8181

By the way: how to remove wrong parameters entered ? (I had entered for example ldap-search-field instead of ldpa-user-search-field)

Thank you very much for your help.

alkemyst commented 5 years ago

I have to apologize: I introduced the regression, apparently. In order to avoid error it is necessary that the LDAP_FULLNAME_FIELD is set. If it's set to an empty value, it's fine @xet7 : is that already the case with the new builds?

xet7 commented 5 years ago

@alkemyst

I will add default empty setting to next Wekan release.