Bug 57467 - Automatic refresh after logout
Automatic refresh after logout
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Portal
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-8-errata
Assigned To: Marius Meschter
Christian Castens
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-25 16:33 CEST by Jan-Luca Kiok
Modified: 2024-08-21 15:34 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Security, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Luca Kiok univentionstaff 2024-07-25 16:33:20 CEST
Currently a logout, regardless of if it's plain auth or SLO, does not trigger a reload of open tabs, meaning that as long as the user does not interact with the page it still looks like he is logged in - Triggering an action will then lead to various unwanted conditions, f.e. clicking on an UMC tile redirects to the login, opening a self-service module displays an error, ...

This is especially valid for the scenario of backchannel logouts where the user does not trigger the logout from the web interface of UCS but instead from a connected application.

The desired behavior would be that, upon logout or with only a small delay, all opened instances of the web interface reload their state in order to show that nobody is logged in anymore.
Comment 2 Marius Meschter univentionstaff 2024-08-13 08:57:59 CEST
This new feature works by creating a new endpoint in the UMC '/logout-sse'.
This is a server-sent event compatabile endpoint that will send the client a
message with the content of 'logout' when the specific session ends.

On the frontend the Portal starts a SharedWorker. This SharedWorker will
connect to this endpoint once and when it receives the logout message will
send a message to all attached open Portals and tells them to refresh. Using
SharedWorkers here comes with the limitation that this feature will not work
on Safari < 16. In this case the feature will simply not be available.

Performance considerations: Every browser having an instance of the Portal
open will need a long lived TCP connection to Apache2. There is however
basically 0 network traffic in that connection. On initial connection and on
every additional automatic reconnect a simple HTTP message is sent. Apart
from that only the final 'logout' message is sent. This should be more
performant than polling.

This feature is enabled by default and can be disabled via UCR variable
'portal/reload-tabs-on-logout'.

univention-portal.yaml
cd1b7fb490c5 | feat: Reload all logged in Portal browser tabs on logout

univention-portal (4.0.17-2)
cd1b7fb490c5 | feat: Reload all logged in Portal browser tabs on logout

univention-management-console.yaml
cd1b7fb490c5 | feat: Reload all logged in Portal browser tabs on logout

univention-management-console (12.0.34-4)
cd1b7fb490c5 | feat: Reload all logged in Portal browser tabs on logout

ucs-test (10.0.22-51)
0bae3d47c0dc | test(keycloak): adjust logout notifier tests to work with OIDC logout

ucs-test (10.0.22-50)
cd1b7fb490c5 | feat: Reload all logged in Portal browser tabs on logout
Comment 3 Christian Castens univentionstaff 2024-08-15 10:31:35 CEST
QA:
  OK: manual test
      - manual logout from SAML/OIDC/plain auth sessions trigger browser tab refresh of all tabs that have the Portal open
      - session timeouts also refresh the tabs
      - new UCR variable can enable/disable this feature
  OK: performance impact
  OK: docs/yaml/changelog
  OK: new tests
  OK: Jenkins test runs (Keycloak jobs)
  OK: UCS 5.0 + UCS 5.2