Repository navigation
Ignore this created by mistake - #3537
ravindra-tripathi wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: ef9b2f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@ravindra-tripathi is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @ravindra-tripathi, thanks for the pull request! Before we review code from a first-time contributor, a maintainer vouches for them, and you're not on our list yet. There's nothing else to file and this PR stays open — a maintainer will look at it, usually within a day or two, and vouch for you right here if it's a genuine attempt at the problem. To make that quick, check the PR description has:
More detail in our contributing guide. |
| }, | ||
| ]; | ||
| ].filter( | ||
| tab => |
There was a problem hiding this comment.
🟠 major — Only the settings tabs are hidden; other write controls still show for non-admins and now return 403
requireTeamSettingsWriteAccess blocks POST/PUT/DELETE on /webhooks, /sources and /connections, including POST /webhooks/test. The UI only filters the TeamPage tabs. These controls are still shown to restricted members and now fail with 403: the alert form's "Add New Incoming Webhook" button and WebhookForm modal (components/Alerts.tsx:133-159), the source create/edit modal on the search page (DBSearchPage.tsx:263/284 TableSourceForm), and source creation in OnboardingModal. Fix: gate those entry points on me.canManageTeamSettings.
Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond
| subject: claims.sub, | ||
| // The ID token is validated at login. An explicitly configured app | ||
| // session has its own lifetime; this does not extend any OIDC token. | ||
| expiresAt: config.SESSION_MAX_AGE_SECONDS |
There was a problem hiding this comment.
🟠 major — Without SESSION_MAX_AGE_SECONDS, Keycloak sessions end at ID-token expiry (Keycloak's default is 5 minutes) and are never refreshed
With no explicit max age, expiresAt = claims.exp * 1000, and isUserAuthenticated destroys the session once that time passes. No refresh token is kept. With Keycloak's default token lifespan, an operator who sets only the four KEYCLOAK_* variables (the docs/keycloak.md Configuration block) gets users logged out every ~5 minutes. Fix: when Keycloak is enabled, default the app session to the existing cookie/idle lifetime (or require SESSION_MAX_AGE_SECONDS) instead of tying it to the ID token's exp.
Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond
| @@ -140,6 +154,7 @@ router.post( | |||
| ); | |||
|
|
|||
| router.get('/logout', (req, res, next) => { | |||
There was a problem hiding this comment.
🔵 minor — GET /logout stays a cross-site logout endpoint for password sessions even though the UI now uses POST
AppNav now submits a same-origin POST to /api/logout, and nothing else in the app calls GET /logout. The GET handler still logs out non-Keycloak sessions with no origin check, so any cross-site image or link can end a user's session. Fix: return 405 for all GET /logout requests, or remove the route, so password sessions get the same POST-only protection.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
|
|
||
| This fork adds Keycloak OIDC login to HyperDX's existing Passport and MongoDB | ||
| sessions. It also adds configurable session limits and an optional team settings | ||
| allowlist for Members, Data, and Integrations, enforced by the API and MCP as |
There was a problem hiding this comment.
🔵 minor — Upstream README gains a fork-specific section
The new "Authentication changes in this fork" section says to "build images from this branch" and that "the upstream images below do not include this fork's additions". That is wrong once this is merged into hyperdxio/hyperdx. Fix: drop the fork framing and keep a short pointer to docs/keycloak.md.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
7 finding(s): 🔴 0 critical · 🟠 3 major · 🔵 4 minor 4 posted as inline comment(s) on the changed lines. 3 listed below. Findings outside the changed lines
2 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Summary
Screenshots or video
How to reproduce
Starting point:
On
main:On this branch:
How to test on Vercel preview
Preview routes:
Steps:
References