matomo-org / matomo-org/plugin-LoginLdap
anonymous bind + user bind + password hash
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 37
- Forks
- 30
- Avg merge
- 22h 53m
- Merged PRs (30d)
- 19
Description
Our openLdap server always requires binding with an account. It will fail with an anonymous bind. Thus, we have a technical user and password with which we bind and execute searches.
Our LDAP will not ever release a password (even as hash), thus I cannot use that field to verify the user's password. Instead, I have to bind to LDAP using the user's password ,
So, in order to verify a user's password, I need to:
connect
start TLS
bind with the technical user
fetch the user's record (we have special attributes with which we can search for either the shortname (uid) or the email address)
then use the cn of that record to rebind using the user's password.
If the last step succeeds, I have the correct password, otherwise not.
LDAP modules of other applications (i.e. RT4) offer this option, this one doesn't. Could this be implemented?
Implementing startTLS is easy, it only requires calling the ldap_start_tls function and checking for a true or false. (Of course there's more to it, but not on the programming side.) We'd need some configuration flag to use or not use TLS, though.
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 by tracing the plugin's existing LDAP authentication and configuration flow; the issue identifies the required LDAP operations as connect, optional ldap_start_tls, technical-user bind, user lookup, and password rebind. Confirm the current entry points and test coverage before deciding how the option fits. Done means configured LDAP servers can complete this sequence and reject incorrect user passwords without retrieving a password hash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100