fix(GRO-2234): bounded sliding expiration for SSO portal sessions #183

Merged
Flea Flicker merged 1 commits from flea-flicker/gro-2234-portal-session-sliding-ttl into dev 2026-06-08 18:55:43 +00:00

1 Commits

Author SHA1 Message Date
Flea Flicker 2a3905d2ea fix(GRO-2234): bounded sliding expiration for SSO portal sessions
CI / Test (pull_request) Successful in 27s
CI / Lint & Typecheck (pull_request) Successful in 29s
CI / Build & Push Docker Images (pull_request) Successful in 1m10s
Portal Book New submissions returned 401 when a customer lingered in the
multi-step wizard. SSO-bridge portal sessions (POST /api/portal/session-from-auth)
are now minted with a 30-min idle TTL and slid forward on each authenticated
/api/portal/* request, bounded by an 8h absolute cap from startedAt.

- portalSession.ts: validatePortalSession extends expiresAt to now+30m for
  reason="sso-bridge" sessions only (staff-initiated impersonation untouched),
  capped at startedAt+8h; write skipped below a 60s slide threshold.
- portal.ts: session-from-auth mint TTL aligned to the 30-min idle window
  (matches the staff-console impersonation idle model). dev-session unchanged.
- Tests: sliding extends, stays valid past original window, bounded by max
  lifetime, no-slide for staff sessions, no resurrection of expired sessions.
- UAT_PLAYBOOK.md §4.8: TC-API-8.17/8.18 (slide-on-activity, slow-wizard submit).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-08 18:51:23 +00:00