test(playwright): add nightly SAML session renewal coverage#27619
test(playwright): add nightly SAML session renewal coverage#27619
Conversation
Covers OM's JWT refresh behavior for SAML sessions end-to-end against the local Keycloak fixture: silent refresh after expiry, concurrent 401s queuing behind a single refresh call, and forced re-login when the server-side SAML HttpSession is gone. Reuses the snapshot/restore mechanism and keycloak-azure-saml provider helper introduced in #27164; shortens samlConfiguration.security.token Validity to 10s so the suite observes multiple expiry cycles in <60s. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
Pull request overview
Adds a new Playwright nightly E2E spec to validate SAML session renewal behavior (silent JWT refresh, concurrent-401 coalescing, and forced re-login on server-side session loss) against the local Keycloak SAML fixture, and wires it into the existing nightly SSO workflow.
Changes:
- Introduces
SSORenewal.spec.tscovering access-token refresh, refresh de-duplication, and session-loss relogin. - Adds reusable helpers in
playwright/utils/sessionRenewal.ts(TTL override, JWT exp decode, expiry wait, cookie clearing). - Updates Playwright config + nightly workflow to include the new spec in the
sso-authnightly run.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/playwright/utils/sessionRenewal.ts | Adds helpers to shorten SAML token validity and drive renewal-related assertions. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/Auth/SSORenewal.spec.ts | New nightly E2E coverage for SAML JWT refresh + forced relogin scenarios. |
| openmetadata-ui/src/main/resources/ui/playwright.config.ts | Includes the new spec in the sso-auth project and excludes it from default runs. |
| .github/workflows/playwright-sso-login-nightly.yml | Executes the new renewal spec alongside the existing SSO login spec on the nightly workflow. |
…Renewal.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Review ✅ ApprovedAdds Playwright coverage for nightly SAML session renewal. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
🟡 Playwright Results — all passed (18 flaky)✅ 3693 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 89 skipped
🟡 18 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |



Summary
HttpSessionloss.keycloak-azure-samlprovider helper introduced in test(playwright): add nightly SSO login spec starting #27164, and tightenssamlConfiguration.security.tokenValidityto 10s so the suite observes multiple expiry cycles in under 60s.playwright-sso-login-nightly.ymlso the renewal scenarios run on the nightly cadence alongside the existing SSO login spec.Test plan
cd openmetadata-ui/src/main/resources/ui && yarn playwright:run playwright/e2e/Auth/SSORenewal.spec.ts🤖 Generated with Claude Code