You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since commit d1189f9, it is no longer possible to log in to the Nextcloud platform using the user_saml plugin in a load-balanced environment without sticky sessions. The issue seems to stem from the following block:
Indeed, since the token is stored in the local cache, in a round-robin load balancing scenario without sticky sessions, the token is only accessible on the application server that generated it. The second request is sent to a node that does not recognize the token, prompting the user_saml to re-authenticate, which causes a redirection loop.
Bug description
Since commit d1189f9, it is no longer possible to log in to the Nextcloud platform using the user_saml plugin in a load-balanced environment without sticky sessions. The issue seems to stem from the following block:
Indeed, since the token is stored in the local cache, in a round-robin load balancing scenario without sticky sessions, the token is only accessible on the application server that generated it. The second request is sent to a node that does not recognize the token, prompting the user_saml to re-authenticate, which causes a redirection loop.
Steps to reproduce
Expected behavior
We should be able to log in directly without a redirection loop
The token should not be stored in the local cache as this information needs to be known by all nodes in a cluster.
We tested the following modification by replacing the localCache with the distributedCache, and it fixes the issue:
We have submitted a pull request to propose the change: #46109. Since this is our first time, we are creating an issue to explain our approach.
Installation method
Community Manual installation with Archive
Nextcloud Server version
29
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?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: