BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

LDAP Group Sync error

Open lucaguindani opened this issue 1 year ago • 2 comments

Attempted Debugging

  • [x] I have read the debugging page

Searched GitHub Issues

  • [x] I have searched GitHub for the issue.

Describe the Scenario

I've enabled the LDAP group sync option following the documentation (https://www.bookstackapp.com/docs/admin/ldap-auth/#ldap-group-sync) and getting an error at login.

production.ERROR: ldap_read(): Search: Invalid DN syntax {"exception":"[object] (ErrorException(code: 0): ldap_read(): Search: Invalid DN syntax at /var/www/bookstack/app/Access/Ldap.php:71)
[stacktrace]
#0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'ldap_read(): Se...', '/var/www/bookst...', 71)

I think it's because the memberOf attribute only contains simple group names (example below), but the LDAP query in bookstack expects the complete DN.

[memberOf] => Array
                (
                    [count] => 10
                    [0] => group-name-1
                    [1] => group-name-2
                    [2] => group-name-3
                    [3] => group-name-4
                    [4] => ...

Is there a way I'm not aware off to still make it work ?

Exact BookStack Version

25.05.2

Hosting Environment

PHP8.4

lucaguindani avatar Jul 23 '25 13:07 lucaguindani

Patch proposition: https://github.com/BookStackApp/BookStack/issues/6065

darxmurf avatar Mar 20 '26 12:03 darxmurf

BookStack is now managed on Codeberg.

As part of this change, we're closing all existing GitHub issues and pull requests. You'll instead find this issue on Codeberg here: https://codeberg.org/bookstack/bookstack/issues/5730

Any further discussion for this will now be done on Codeberg. Therefore this GitHub thread will be locked.

ssddanbrown avatar Apr 28 '26 12:04 ssddanbrown