OSIRIS-Solutions / osiris

Open, Smart and Intuitive Research Information System
https://osiris-app.de
Other
9 stars 1 forks source link

Feature Request: Add Support for PHP LDAP Search Filter #27

Closed paschulke closed 2 months ago

paschulke commented 2 months ago

Summary: I would like to request the addition of support for PHP LDAP search filters in this project.

Motivation: Currently, the project lacks native support for creating and using these filters in a PHP environment. While I did find the blacklist feature, it appears to be based solely on usernames, which can be cumbersome and too static in larger environments. Adding support for LDAP search filters would provide a more dynamic and scalable solution for managing user authentication and access.

Proposed Solution: Adapt the php/_login.php file so that it allows the construction and application of LDAP search filters. The filter should be configurable through the CONFIG.php file.

Example Use Case:

$filter = "(&(objectClass=person)(|(cn=John*)(mail=john.doe@example.com)))";

$results = ldap_search($connection, $baseDn, $filter);

Thank you for considering this request.

JKoblitz commented 2 months ago

Dear @paschulke,

thank you for your time to suggest new features to OSIRIS. I completely agree with your proposed feature, which is why this has already found its way into the dev branch. I have some minor bugs to fix and will then make a release within the next couple of days.

Cheers, Julia

JKoblitz commented 2 months ago

Hello,

the new version 1.3.6 #28 is resolving this. It includes better error handling on user login, support for LDAP pagination (> 1000 users) and an LDAP_FILTER constant in the CONFIG.php, which you can use to filter your synchronized users.

I hope it helps and everything works as you expect. Otherwise, please do open a new ticket.

Best, Julia