SMB external storage ignores Kerberos authentication and attempts BasicAuth
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Using external storage over SMB produce BasicAuth errors even when kerberos-ticket (apache-mode) authentification is selected.
Steps to reproduce
- Install nextcloud with apache and kerberos authentification
- configure LDAP
- try to add external storage over SMB with kerberos ticket in apache-mode
Expected behavior
All users with rights can use external storage
Nextcloud Server version
32
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
Exception Icewind\SMB\BasicAuth::__construct(): Argument #3 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php on line 106 in file '/var/www/html/nextcloud/3rdparty/icewind/smb/src/BasicAuth.php' line 17
/var/www/html/nextcloud/lib/private/AppFramework/App.phpZeile 153
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/html/nextcloud/lib/private/Route/Router.phpZeile 321
OC\AppFramework\App::main()
/var/www/html/nextcloud/lib/base.phpZeile 1061
OC\Route\Router->match()
/var/www/html/nextcloud/index.phpZeile 25
OC::handleRequest()
Verursacht von TypeError Icewind\SMB\BasicAuth::__construct(): Argument #3 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php on line 106
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 in apps/files_external/lib/Lib/Backend/SMB.php around line 106 and inspect how the Kerberos ticket/apache-mode selection reaches Icewind\SMB\BasicAuth in 3rdparty/icewind/smb/src/BasicAuth.php. Reproduce the SMB external-storage setup with Apache Kerberos authentication and verify that Kerberos mode no longer attempts BasicAuth with a null password.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100