nextcloud / nextcloud/ldap_write_support

ldap_write_support not working with nextcloud 29.0.0.19

Open
#740 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage needs info
Dominant language
PHP
Stars
33
Forks
14
Avg merge
1d 4h
Merged PRs (30d)
13

Description

I'm new to nextcloud and have a fresh install of 29.0.0.19 with and ldap backend for users. authentication is working as expected and verified to be coming from LDAP. When I enable ldap_write_support, I immediately start seeing the following errors in my logs:

{"reqId":"pS4lTGpVaUwGwesjMBNL","level":4,"time":"2024-05-19T18:52:26+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"--","app":"no app in context","method":"GET","url":"/remote.php/dav/","message":"Could not boot user_ldap: No LDAP provider is available","userAgent":"Nextcloud Server Crawler","version":"29.0.0.19","exception":{"Exception":"Exception","Message":"No LDAP provider is available","Code":0,"Trace":[{"file":"/mnt/data/var/nextcloud/html/lib/private/Server.php","line":1083,"function":"getLDAPProvider","class":"OC\\LDAP\\NullLDAPProviderFactory","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":175,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/ServerContainer.php","line":173,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":445,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"array_map"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":470,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":442,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"array_map"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":470,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/ServiceEventListener.php","line":70,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/mnt/data/var/nextcloud/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/apps/user_ldap/lib/AppInfo/Application.php","line":143,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":66,"function":"OCA\\User_LDAP\\AppInfo\\{closure}","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/mnt/data/var/nextcloud/html/apps/user_ldap/lib/AppInfo/Application.php","line":147,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/mnt/data/var/nextcloud/html/remote.php","line":155,"function":"loadApps","class":"OC_App","type":"::"}],"File":"/mnt/data/var/nextcloud/html/lib/private/LDAP/NullLDAPProviderFactory.php","Line":36,"message":"Could not boot user_ldap: No LDAP provider is available","exception":{},"CustomMessage":"Could not boot user_ldap: No LDAP provider is available"}}

But I do in fact have an LDAP provider configured and working.

I've been digging into the code and have not been able to determine what the exact problem is. I suspect maybe things have changed in nextcloud that have caused this to become an issue as I am sure others have been working just fine.

I'll continue to poke and it and if I can find a solution, I will update this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/user_ldap/lib/AppInfo/Application.php and lib/private/LDAP/NullLDAPProviderFactory.php, then reproduce the logged failure with ldap_write_support enabled on Nextcloud 29.0.0.19. Done means identifying why the configured LDAP provider is unavailable during boot and correcting the failure without breaking LDAP authentication.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.