Repository navigation
Feature #21971: Session Management in Multiple Server Pods - #26314
Conversation
| private UUID getUserIdForPrincipal(String userName) { | ||
| EntityReference userRef = | ||
| Entity.getEntityReferenceByName(Entity.USER, userName, Include.NON_DELETED); | ||
| return userRef.getId(); |
| private static String trimToNull(String value) { | ||
| if (value == null || value.isBlank()) { | ||
| return null; | ||
| } | ||
| return value.trim(); | ||
| } | ||
|
|
||
| private static boolean hasText(String value) { | ||
| return value != null && !value.isBlank(); | ||
| } |
There was a problem hiding this comment.
💡 Quality: Custom string helpers duplicate CommonUtil-style utilities
trimToNull and hasText are newly introduced private helpers (SocketAddressFilter.java:250-259). The repository conventions ask for org.openmetadata.common.utils.CommonUtil.nullOrEmpty() for string/collection emptiness checks. While hasText (which uses isBlank()) is not exactly equivalent to nullOrEmpty (which checks null/empty only), the blank-handling logic could be consolidated to reduce per-class string utilities and stay consistent with the codebase. Consider replacing hasText(x) with !nullOrEmpty(x) where whitespace-only inputs are not a concern, or centralizing these helpers if blank handling is required. Minor / optional.
Was this helpful? React with 👍 / 👎
|
Code Review 👍 Approved with suggestions 19 resolved / 20 findingsImplements centralized session management using JDBC or Redis backends to enable cross-node state consistency. Address minor duplication by consolidating custom string helpers with existing utility classes. 💡 Quality: Custom string helpers duplicate CommonUtil-style utilities📄 openmetadata-service/src/main/java/org/openmetadata/service/socket/SocketAddressFilter.java:250-259
✅ 19 resolved✅ Security: revokeSession silently fails on version conflict — logout may not revoke
✅ Bug: NPE if user not found after successful authentication
✅ Edge Case: acquireRefreshLease may throw spurious 503 from stale cache
✅ Edge Case: SAML handleRefresh passes same token without rotation
✅ Bug: OIDC expired-token fallback removed, breaking Azure AD login
...and 14 more resolved from earlier reviews 🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
SessionServicebacked byJdbcSessionStoreorRedisSessionStorefor cross-node state consistency.OM_SESSIONcookie-based tracking to manage user authentication across distributed pods.SocketAddressFilterto validate session status during WebSocket handshakes, preventing connections from revoked or expired sessions.sessionExpiryandmaxActiveSessionsPerUsersettings inAuthenticationConfigurationto control session lifecycles.SessionMultiNodeITandSessionRedisMultiNodeITto verify multi-node session synchronization and WebSocket session validation.This will update automatically on new commits.