OpenMetadata/.github
Sid ca2d0122db
test(playwright): add nightly SAML session renewal coverage (#27619)
* test(playwright): add nightly SAML session renewal spec

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>

* Update openmetadata-ui/src/main/resources/ui/playwright/utils/sessionRenewal.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test(playwright): drop expiry wait from refresh-on-reload SSO specs

The reactive 401 refresh path races with the AuthProvider useEffect that
wires tokenService.renewToken from authenticatorRef — if the 401 from
/users/loggedInUser lands before that effect commits the populated ref,
refreshToken() returns null and the user is logged out instead of refreshed.

With tokenValidity=10s (< EXPIRY_THRESHOLD_MILLES=60s), the UI's proactive
timer in startTokenExpiryTimer fires immediately on every mount, so
/auth/refresh is exercised on each reload regardless of expiry state.
Assertions on token rotation and session continuity still cover "silent
refresh works end-to-end".

The SAML-session-gone case still waits for expiry — it needs to.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(playwright): trigger refresh via SPA nav in SSO renewal specs

page.reload() remounts React and re-races the axios interceptor setup
in AuthProvider — the useEffect that wires authenticatorRef.renewIdToken
onto TokenService has a ref-typed dependency that doesn't reliably
re-run, so the first 401 after reload sometimes finds renewToken=null
and the interceptor silently logs the user out instead of refreshing.

Click the Explore sidebar link instead. The click triggers authenticated
API calls while staying inside the already-mounted React tree, so the
interceptor always reaches the wired TokenService. Spec now passes
10/10 locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Siddhant <siddhant@MacBook-Pro-621.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-05-04 11:48:45 +05:30
..
actions chore: update sqlalchemy to 1.0.0 (#27776) 2026-04-28 11:07:26 -07:00
ISSUE_TEMPLATE chore(github): migrate issue templates to structured forms (#27710) 2026-04-24 14:08:20 +02:00
scripts chore(github): migrate issue templates to structured forms (#27710) 2026-04-24 14:08:20 +02:00
trivy/templates Feat: Github Workflow Action for Scanning vulnerabilities using Trivy. (#19710) 2025-02-16 12:02:14 -08:00
workflows test(playwright): add nightly SAML session renewal coverage (#27619) 2026-05-04 11:48:45 +05:30
CODEOWNERS chore: update code owner for openmetadata-ui-core-components (#23616) 2025-09-29 19:57:34 +05:30
copilot-instructions.md chore(ingestion): drop pylint, expand ruff (#27774) 2026-04-28 07:21:59 +02:00
e2eLabeler.yml Show collapse for record type of topic entity (#16063) 2024-04-29 19:16:40 +05:30
labeler.yml Refactor: remove doc changes from OM repo (#22019) 2025-08-20 14:28:48 +05:30
pull_request_template.md Update PR template (#10700) 2023-03-22 16:50:13 +01:00
teams.yml CI - Update teams.yaml (#23943) 2025-10-17 15:59:34 +05:30