fix(docs): Wiki.js session sweep judged brokered sessions dead via wikijs client check #192

Merged
haydar merged 1 commit from fix/docs-editor-exit-403 into develop 2026-10-31 19:55:20 +00:00
Member

WikiJsSessionReconciler::subjectIsLive kept a wiki session only while a
live Keycloak SSO session carried the 'wikijs' client — a direct-OIDC
concept the session broker retired: managed logins mint wiki sessions
from the central session's snapshot and never run an OIDC exchange for
that client, so every brokered session read as dead and the ~30s sweep
deleted it. The next /_api call — e.g. the pageLoad the route watcher
fires on editor exit (GET /sites/{id}/pages/{hash}?withContent=false)
— evaluated as anonymous, hit the guests DENY rule, and the SPA landed
on /_error/unauthorized (with the 'Page has been reverted' toast
masking the navigation that triggered it).

Liveness now mirrors the record the session gate actually introspects:
the subject's active central browser_session (not revoked, within
expiry, seen inside the idle window). Keycloak identity disabled or
deleted still purges; sidless central sessions keep their keep-until-
expiry rule from ReconcileBrowserSessions so the sweep never
out-purges the gate's own verdict. The dead wikijs.oidc_client_id
config goes with the clients-map check.

WikiJsSessionReconcileTest rewritten for the broker-native verdict:
central-session presence decides keep/purge, plus revoked/expired/
idle-timeout, sidless keep, disabled/deleted dominance, lookup-failure
skip, and the local-only exemption.

WikiJsSessionReconciler::subjectIsLive kept a wiki session only while a live Keycloak SSO session carried the 'wikijs' client — a direct-OIDC concept the session broker retired: managed logins mint wiki sessions from the central session's snapshot and never run an OIDC exchange for that client, so every brokered session read as dead and the ~30s sweep deleted it. The next /_api call — e.g. the pageLoad the route watcher fires on editor exit (GET /sites/{id}/pages/{hash}?withContent=false) — evaluated as anonymous, hit the guests DENY rule, and the SPA landed on /_error/unauthorized (with the 'Page has been reverted' toast masking the navigation that triggered it). Liveness now mirrors the record the session gate actually introspects: the subject's active central browser_session (not revoked, within expiry, seen inside the idle window). Keycloak identity disabled or deleted still purges; sidless central sessions keep their keep-until- expiry rule from ReconcileBrowserSessions so the sweep never out-purges the gate's own verdict. The dead wikijs.oidc_client_id config goes with the clients-map check. WikiJsSessionReconcileTest rewritten for the broker-native verdict: central-session presence decides keep/purge, plus revoked/expired/ idle-timeout, sidless keep, disabled/deleted dominance, lookup-failure skip, and the local-only exemption.
fix(docs): Wiki.js session sweep judged brokered sessions dead via wikijs client check
All checks were successful
ci / commit-trailers (pull_request) Successful in 9s
ci / secret-scan (pull_request) Successful in 12s
ci / release-tests (pull_request) Successful in 1m25s
ci / portal-frontend (pull_request) Successful in 38s
ci / integrations-js (pull_request) Successful in 30s
ci / openproject-spec (pull_request) Successful in 34s
ci / portal-php (pull_request) Successful in 6m31s
ci / openproject-rspec (pull_request) Successful in 4m46s
b23d06eef3
WikiJsSessionReconciler::subjectIsLive kept a wiki session only while a
live Keycloak SSO session carried the 'wikijs' client — a direct-OIDC
concept the session broker retired: managed logins mint wiki sessions
from the central session's snapshot and never run an OIDC exchange for
that client, so every brokered session read as dead and the ~30s sweep
deleted it. The next /_api call — e.g. the pageLoad the route watcher
fires on editor exit (GET /sites/{id}/pages/{hash}?withContent=false)
— evaluated as anonymous, hit the guests DENY rule, and the SPA landed
on /_error/unauthorized (with the 'Page has been reverted' toast
masking the navigation that triggered it).

Liveness now mirrors the record the session gate actually introspects:
the subject's active central browser_session (not revoked, within
expiry, seen inside the idle window). Keycloak identity disabled or
deleted still purges; sidless central sessions keep their keep-until-
expiry rule from ReconcileBrowserSessions so the sweep never
out-purges the gate's own verdict. The dead wikijs.oidc_client_id
config goes with the clients-map check.

WikiJsSessionReconcileTest rewritten for the broker-native verdict:
central-session presence decides keep/purge, plus revoked/expired/
idle-timeout, sidless keep, disabled/deleted dominance, lookup-failure
skip, and the local-only exemption.
haydar scheduled this pull request to auto merge when all checks succeed 2026-10-31 19:48:47 +00:00
haydar merged commit 42c416907d into develop 2026-10-31 19:55:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
developing4all/devworkbase!192
No description provided.