[MINOR] Drop ticket value from WebSocket debug log statements#5228
Merged
jongyoul merged 1 commit intoapache:masterfrom May 10, 2026
Merged
[MINOR] Drop ticket value from WebSocket debug log statements#5228jongyoul merged 1 commit intoapache:masterfrom
jongyoul merged 1 commit intoapache:masterfrom
Conversation
The WebSocket auth ticket is a per-session UUID and exposes nothing useful for debugging beyond the principal that owns it. Logging the raw value at DEBUG level makes the value visible to anyone who reads log files or whichever observability stack the logs flow into. Replace the three call sites in NotebookServer.onMessage that emit the ticket value with messages keyed on the principal: - RECEIVE block: drop the "RECEIVE TICKET" column entirely. The remaining op / principal / roles / data fields keep the message identifiable. - "no ticket on file" branch: log the principal that has no entry rather than the rejected ticket. - ticket-mismatch branch: log the principal whose ticket did not match rather than both raw values. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves WebSocket logging hygiene in NotebookServer.onMessage by removing the per-session auth ticket value from debug logs, reducing the risk of exposing sensitive session identifiers via log files/collectors without changing runtime behavior.
Changes:
- Removed the ticket value from the general “RECEIVE” debug log line.
- Updated “no ticket on file” and “ticket mismatch” debug logs to reference the principal instead of echoing ticket values.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ParkGyeongTae
approved these changes
May 9, 2026
Member
ParkGyeongTae
left a comment
There was a problem hiding this comment.
LGTM. Sensible logging hygiene fix — the ticket is a session credential and has no business sitting in debug logs. Keeping principal is enough to identify the message. No behavior change, existing tests cover the paths.
tbonelee
approved these changes
May 9, 2026
jongyoul
added a commit
that referenced
this pull request
May 10, 2026
### What is this PR for?
Removes the WebSocket auth ticket value from three `LOGGER.debug` call sites in `NotebookServer.onMessage`. The ticket is a per-session UUID and adds no debugging value beyond the principal that owns it; emitting the raw value makes it visible to anyone with access to log files or downstream log collectors.
The three call sites and the change applied to each:
- **RECEIVE block** — drops the `RECEIVE TICKET` column. The remaining `op` / `principal` / `roles` / `data` columns are sufficient to identify the message.
- **"no ticket on file" branch** — logs the principal that has no entry instead of echoing back the rejected ticket.
- **"ticket mismatch" branch** — logs the principal whose ticket did not match, rather than both raw values.
`Message.toString()` does not include the ticket field, so the surrounding `LOGGER.trace("RECEIVE MSG = " + receivedMessage)` already does not leak it.
### What type of PR is it?
Improvement
### What is the Jira issue?
N/A — minor logging hygiene change, no behavioral or API change.
### How should this be tested?
Diff is self-evident. The three changed sites stay on the existing branches; behavior (what is returned to the client, what is rejected) is unchanged. Existing `NotebookServerTest` continues to exercise these paths.
### Screenshots (if appropriate)
N/A
### Questions:
- Does the license files need to update? No
- Is there breaking changes for older versions? No
- Does this needs documentation? No
Closes #5228 from jongyoul/ZEPPELIN-ws-ticket-log-redact.
Signed-off-by: Jongyoul Lee <jongyoul@gmail.com>
(cherry picked from commit e1e59bc)
Signed-off-by: Jongyoul Lee <jongyoul@gmail.com>
Member
Author
|
Merged into master (e1e59bc). |
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?
Removes the WebSocket auth ticket value from three
LOGGER.debugcall sites inNotebookServer.onMessage. The ticket is a per-session UUID and adds no debugging value beyond the principal that owns it; emitting the raw value makes it visible to anyone with access to log files or downstream log collectors.The three call sites and the change applied to each:
RECEIVE TICKETcolumn. The remainingop/principal/roles/datacolumns are sufficient to identify the message.Message.toString()does not include the ticket field, so the surroundingLOGGER.trace("RECEIVE MSG = " + receivedMessage)already does not leak it.What type of PR is it?
Improvement
What is the Jira issue?
N/A — minor logging hygiene change, no behavioral or API change.
How should this be tested?
Diff is self-evident. The three changed sites stay on the existing branches; behavior (what is returned to the client, what is rejected) is unchanged. Existing
NotebookServerTestcontinues to exercise these paths.Screenshots (if appropriate)
N/A
Questions: