matomo-org / matomo-org/plugin-LoginLdap
Anonymous binding to the ldap server when LoginLdap tries to synchronize users with ldap.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 37
- Forks
- 30
- Avg merge
- 22h 53m
- Merged PRs (30d)
- 19
Description
Hello,
When synchronizing users with the LDAP server using the command loginldap:synchronize-users, the LoginLdap plugin bind the server with an anonymous connection.
The plugin does not bind because we refuse anonymous connections to the ldap server and this causes warnings.
These warnings cause an error when the plugin manages to synchronize users to ldap.
WARNING [2020-09-30 16:24:56] 105 /var/www/html/plugins/LoginLdap/Ldap/Client.php(91): Warning - ldap_bind(): Unable to bind to server: Inappropriate authentication - Matomo 3.13.5 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2020-09-30 16:24:56] 105 LdapUsers::makeLdapClient: Using LDAP server ldaps://ldap.XXXXXX.com:636
Synchronizing 'demo.demo'... WARNING [2020-09-30 16:24:56] 105 /var/www/html/plugins/LoginLdap/Ldap/Client.php(91): Warning - ldap_bind(): Unable to bind to server: Inappropriate authentication - Matomo 3.13.5 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2020-09-30 16:24:56] 105 LdapUsers::makeLdapClient: Using LDAP server ldaps://ldap.XXXXXX.com:636
success!
Synchronized 1 users!
Error: error or warning logs detected, exit 1
Could you modify the behaviour of the LoginLdap plugin so that it bind the Ldap server with a non-annonymous connection please ?
Regards
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/LoginLdap/Ldap/Client.php around line 91 and trace how the loginldap:synchronize-users command creates and binds the LDAP client. Reproduce synchronization against a server that refuses anonymous connections; done means the plugin uses a non-anonymous bind and completes synchronization without the reported warning or error exit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100