[MINOR] Drop ticket value from WebSocket debug log statements#5228
Draft
jongyoul wants to merge 1 commit intoapache:masterfrom
Draft
[MINOR] Drop ticket value from WebSocket debug log statements#5228jongyoul wants to merge 1 commit intoapache:masterfrom
jongyoul wants to merge 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) <[email protected]>
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: