SSO / portal redirect failure after upgrade to YNH 12 - FIXED

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0
How are you able to access your server: Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: Upgrade yunohost from 11 to 12

Describe your issue

Hello,

After the upgrade of my yunohost instance from 11 to 12, I got an issue with authentication (I think) and the portail.

I have 2 domains and some subdomains :

  • domainA (with application element, adguard, …)
  • sub1.domainA (with nextcloud)
  • sub2.domainA (with Vaultwarden)
  • domainB (with mastodon)

I’m able to authenticate on both domain. When I try to log to any application (by using the tile on the portal) I got:

  • for all apps except Nextcloud and Mastodon : a loading and redirect to the portal
  • for Nextcloud the authentication page. When I put my credentials, it works
  • for Mastodon the authentication page. When I put my credentials, it doesn’t work.

All was working fine before upgrade. Upgrade did not trigger any warning or issue (as far as I have found)

Tested without success:

  • Force upgrade all application
  • Created a new user with same permission (and with all possible permission)

Thanks

Share relevant logs or error messages

For Nextcloud
==> /var/log/nginx/sub2.domainA.eu-access.log.1 <==
192.168.250.1 - - [13/Nov/2024:08:31:57 +0100] “GET / HTTP/2.0” 302 0 “hxxs://domainA.eu/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:31:57 +0100] “GET /login HTTP/2.0” 200 6330 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
… LOGIN…?
192.168.250.1 - - [13/Nov/2024:08:33:19 +0100] “POST /login HTTP/2.0” 303 0 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:33:19 +0100] “GET /apps/dashboard/ HTTP/2.0” 200 11890 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”

For AdGuard / Element
==> /var/log/nginx/domainA.eu-access.log.1 <==
192.168.250.1 - - [13/Nov/2024:08:34:07 +0100] “GET /adguard/ HTTP/2.0” 302 138 “hxxs://domainA.eu/yunohost/sso/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:34:07 +0100] “GET /yunohost/sso/?r=aHR0cHXXXXXXXXXXXXXX HTTP/2.0” 200 11028 “hxxs://domainA.eu/yunohost/sso/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:34:07 +0100] “GET /yunohost/sso/customassets/custom.css HTTP/2.0” 200 0 “hxxs://domainA.eu/yunohost/sso/?r=aHR0cHXXXXXXXXXXXXXX” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:34:08 +0100] “GET /yunohost/portalapi/public HTTP/2.0” 200 194 “hxxs://domainA.eu/yunohost/sso/?r=aHR0cHXXXXXXXXXXXXXX” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”
192.168.250.1 - - [13/Nov/2024:08:34:08 +0100] “GET /yunohost/portalapi/me HTTP/2.0” 200 1891 “hxxs://domainA.eu/yunohost/sso/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”

==> /var/log/yunohost-portalapi.log <==
2024-11-13 08:34:08,034 DEBUG geventwebsocket.handler.run_application - Initializing WebSocket
2024-11-13 08:34:08,176 DEBUG geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-11-13 08:34:08,176 DEBUG moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-11-13 08:34:08,176 DEBUG moulinette.actionsmap.process - processing action ‘yunohost.portal.public’
2024-11-13 08:34:08,177 DEBUG moulinette.actionsmap.process - action executed in 0.001s
2024-11-13 08:34:08,179 INFO geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-11-13 08:34:08] “GET /public HTTP/1.1” 200 804 0.144523
2024-11-13 08:34:08,326 DEBUG geventwebsocket.handler.run_application - Initializing WebSocket
2024-11-13 08:34:08,326 DEBUG geventwebsocket.handler.upgrade_websocket - Validating WebSocket request
2024-11-13 08:34:08,328 DEBUG moulinette.actionsmap.process - loading python module yunohost.portal took 0.000s
2024-11-13 08:34:08,328 DEBUG moulinette.actionsmap.process - processing action ‘yunohost.portal.me
2024-11-13 08:34:08,330 DEBUG moulinette.actionsmap.process - action executed in 0.001s
2024-11-13 08:34:08,331 INFO geventwebsocket.handler.log_request - 127.0.0.1 - - [2024-11-13 08:34:08] “GET /me HTTP/1.1” 200 2502 0.004610

After some investigation, disabling experimental feature in tools → secuiry makes everything works fine.
Marked subject as fixed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.