nextcloud / user_saml

:lock: App for authenticating Nextcloud users using SAML https://apps.nextcloud.com/apps/user_saml
https://portal.nextcloud.com/article/configuring-single-sign-on-10.html
GNU Affero General Public License v3.0
96 stars 76 forks source link

nextcloud.oc_user_saml_auth_token missing errors in log since 6.1.2 update #825

Closed Alakadoo closed 8 months ago

Alakadoo commented 8 months ago

Steps to reproduce

1.Update user_saml to 6.1.2 2.Check logs

Expected behaviour

No errors

Actual behaviour

Lot of errors being logged, howerver no actual impact found

Server configuration

Operating system: Ubuntu 22.04

Web server: Apache 2.4.52

Database: mysql 8.0.36

PHP version: 8.1.2

Nextcloud version: (see Nextcloud admin page) 28.0.3

Where did you install Nextcloud from: Nextcloud server download

List of activated apps:

Enabled:
 - activity: 2.20.0
 - analytics: 4.12.0
 - bruteforcesettings: 2.8.0
 - calendar: 4.6.7
 - camerarawpreviews: 0.8.4
 - checksum: 1.2.3
 - circles: 28.0.0-dev
 - cloud_federation_api: 1.11.0
 - comments: 1.18.0
 - contacts: 5.5.3
 - dashboard: 7.8.0
 - dav: 1.29.1
 - deck: 1.12.2
 - dicomviewer: 2.0.0
 - federatedfilesharing: 1.18.0
 - federation: 1.18.0
 - files: 2.0.0
 - files_mindmap: 0.0.30
 - files_pdfviewer: 2.9.0
 - files_reminders: 1.1.0
 - files_sharing: 1.20.0
 - files_trashbin: 1.18.0
 - files_versions: 1.21.0
 - firstrunwizard: 2.17.0
 - forms: 4.1.1
 - groupfolders: 16.0.4
 - impersonate: 1.15.0
 - logreader: 2.13.0
 - lookup_server_connector: 1.16.0
 - nextcloud_announcements: 1.17.0
 - notifications: 2.16.0
 - notify_push: 0.6.10
 - oauth2: 1.16.3
 - officeonline: 2.1.0
 - password_policy: 1.18.0
 - photos: 2.4.0
 - privacy: 1.12.0
 - provisioning_api: 1.18.0
 - recognize: 6.1.1
 - recommendations: 2.0.0
 - related_resources: 1.3.0
 - serverinfo: 1.18.0
 - settings: 1.10.1
 - sharebymail: 1.18.0
 - spreed: 18.0.5
 - support: 1.11.0
 - survey_client: 1.16.0
 - systemtags: 1.18.0
 - terms_of_service: 2.4.0
 - text: 3.9.1
 - theming: 2.3.0
 - translate: 2.1.0
 - twofactor_backupcodes: 1.17.0
 - updatenotification: 1.18.0
 - user_saml: 6.1.2
 - user_status: 1.8.1
 - viewer: 2.2.0
 - workflowengine: 2.10.0
Disabled:
 - admin_audit
 - cfg_share_links: 5.0.0
 - contactsinteraction: 1.9.0
 - encryption
 - files_archive: 1.2.0
 - files_downloadlimit: 1.1.0
 - files_external
 - files_rightclick: 1.6.0
 - integration_openai: 1.2.1
 - ldap_contacts_backend: 1.8.0
 - metadata: 0.19.0
 - stt_whisper: 1.0.8
 - suspicious_login
 - twofactor_totp
 - user_ldap: 1.17.0
 - weather_status: 1.7.0

Logs

Nextcloud log (data/owncloud.log)

[webdav] Erreur: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_user_saml_auth_token' doesn't exist
    PROPFIND /remote.php/dav/files/admin/
    de 10.97.50.2 par -- à 21 mars 2024, 10:20:39

[no app in context] Erreur: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_user_saml_auth_token' doesn't exist
    PROPFIND /remote.php/dav/files/admin/
    de 10.97.50.2 par -- à 21 mars 2024, 10:22:43
blizzz commented 8 months ago

Um, this table is actually not used for a few eternities, and it was dropped eventually.

From your nextcloud directory, could you run: grep -rl user_saml_auth_token . (the trailing dot is important). Do you get any results? The expectation is that it appears in apps/user_saml/lib/Migration/Version6001Date20240202183823.php only.

Alakadoo commented 8 months ago

I ran grep -rl user_saml_auth_token . from the nextcloud root,, the only result was Version6001Date20240202183823.php yes. I restarted the web server and the errors stopped happening, I think that even tho I updated user_saml to 6.1.2, apache kept running the old version in cache or something like that until I restarted the server ?

Well now I have another error, this time with impact :

[webdav] Erreur: Call to undefined method OCA\User_SAML\UserBackend::checkPassword() PROPFIND /remote.php/dav/files/admin/ de 10.97.50.2 par -- à 21 mars 2024, 15:15:27

Impact is nextcloud windows client can no longer connect. I have the last stable version 3.12.2.

blizzz commented 8 months ago

I restarted the web server and the errors stopped happening,

That could be wrongly configured PHP opcache. Perhaps you see warnings about that in Admin settings overview?

I split off the other problem into https://github.com/nextcloud/user_saml/issues/826