[MINOR] Prevent WebSocket tickets from being logged - #5388
Open
jongyoul wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR mitigates CVE-2026-44614 by ensuring WebSocket bearer tickets (and other potentially sensitive payload data) are no longer written to server logs, while keeping response bodies, authentication behavior, and the WebSocket protocol unchanged.
Changes:
- Replaced ticket-bearing REST response logging in
LoginRestApiandSecurityRestApiwith structured, non-secret metadata logs (principal + success). - Replaced raw WebSocket message/error logging in
NotebookServerwith operation/principal metadata and a sanitized error type (no payload / msg dump / exception details). - Added regression tests to assert tickets and payloads are not present in logs for login,
/api/security/ticket, and a WebSocket failure path.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java | Stops logging full login responses; logs only principal and success metadata. |
| zeppelin-server/src/main/java/org/apache/zeppelin/rest/SecurityRestApi.java | Stops logging full ticket responses; logs only principal and success metadata. |
| zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java | Removes raw WebSocket message logging and sanitizes error logging to avoid leaking tickets/payloads. |
| zeppelin-server/src/test/java/org/apache/zeppelin/rest/SecurityRestApiTest.java | Adds tests verifying tickets are not present in login/ticket endpoint logs. |
| zeppelin-server/src/test/java/org/apache/zeppelin/socket/NotebookServerLoggingTest.java | Adds test verifying tickets/payload are not present in WebSocket failure logs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
This fixes CVE-2026-44614, where the WebSocket bearer ticket could be written to server or browser diagnostic logs in plaintext.
The login and security ticket endpoints no longer log their complete ticket-bearing responses. Server-side WebSocket handling now logs only non-secret operation, principal, success, and error type metadata instead of the complete message, payload, or exception details. The active Angular SDK and classic UI likewise log only operation/principal metadata rather than complete WebSocket messages.
Ticket response bodies, authentication behavior, and the WebSocket wire protocol remain unchanged. Both clients still attach the bearer ticket to outbound WebSocket frames, but no longer copy it or the complete payload to the browser console.
What type of PR is it?
Hot Fix
Todos
/api/security/ticket, WebSocket failures, and classic-client console loggingWhat is the Jira issue?
Not applicable. This addresses CVE-2026-44614.
How should this be tested?
./mvnw -pl zeppelin-server --am -Dtest=SecurityRestApiTest,NotebookServerLoggingTest,NotebookServerTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.gitcommitid.skip=true testcd zeppelin-web && npm run karma-testcd zeppelin-web-angular && npm run build-project:sdkzeppelin-server,zeppelin-web-angular, andzeppelin-webwith no unapproved licenses.git diff --check apache/master...HEADThe standalone
checkstyle:checkcommand reports the same existing baseline on cleanapache/masterand this branch: 1,795 repository-wide violations and 103 violations when restricted to the original server files. No violation is reported on a line added or modified by this PR.Screenshots (if appropriate)
Not applicable.
Questions: