Skip to content

[SECURITY] Enforce server-side session map check in ignore-timeout fallback path#5458

Merged
casionone merged 1 commit into
apache:masterfrom
aiceflower:fix-enforce-session-map-check-in-fallback
Jul 16, 2026
Merged

[SECURITY] Enforce server-side session map check in ignore-timeout fallback path#5458
casionone merged 1 commit into
apache:masterfrom
aiceflower:fix-enforce-session-map-check-in-fallback

Conversation

@aiceflower

Copy link
Copy Markdown
Member

Summary

getLoginUserIgnoreTimeout previously skipped isTimeoutOrNot entirely — any ticket that decrypted cleanly (with the known default key) was accepted even if it was never registered via setLoginUser. This was the second half of the auth bypass.

This PR adds isTimeoutOrNot for all normal users even in the ignore-timeout path. The only exception is OTHER_SYSTEM_IGNORE_UM_USER (internal RPC identity via header).

Changes

  • SSOUtils.getLoginUserIgnoreTimeout: normal users now go through isTimeoutOrNot (session map lookup)
  • OTHER_SYSTEM_IGNORE_UM_USER remains exempt (internal RPC, not browser-cookie-based)

Affected files

  • linkis-commons/linkis-module/.../SSOUtils.scala (+20/-1)

Deployment impact

Scenario Impact
HA mode (Redis session sharing) No impact
Non-HA (standalone session maps) Gateway→backend may fail; switch to HA mode recommended

🤖 Generated with Claude Code

@aiceflower
aiceflower force-pushed the fix-enforce-session-map-check-in-fallback branch from 6ae0961 to 03f9933 Compare July 16, 2026 03:37
…e-timeout fallback

- getLoginUserIgnoreTimeout: normal users now go through isTimeoutOrNot (session map lookup)
- OTHER_SYSTEM_IGNORE_UM_USER remains exempt (internal RPC, not browser-cookie-based)
- Add escape hatch: linkis.security.ignore.timeout.require.session.map=false restores legacy behavior
- Add CommonVars import for config toggle
@aiceflower
aiceflower force-pushed the fix-enforce-session-map-check-in-fallback branch from 03f9933 to 3931400 Compare July 16, 2026 03:53

@casionone casionone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@casionone
casionone merged commit 974438c into apache:master Jul 16, 2026
4 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants