TNZ-97927 Prevent Authorization header leaking into switchboard debug logs#121
Open
kimago wants to merge 1 commit into
Open
TNZ-97927 Prevent Authorization header leaking into switchboard debug logs#121kimago wants to merge 1 commit into
kimago wants to merge 1 commit into
Conversation
… logs httputil.DumpRequest serialises all headers verbatim including Authorization: Basic <base64(user:pass)>, bypassing the redaction already applied by the Logger middleware. Remove the DumpRequest call and its log statement; the Logger middleware covers the same request metadata (without credentials) for every /v0 request. ai-assisted=yes [TNZ-97927](https://vmw-jira.broadcom.net/browse/TNZ-97927) Authored-by: Kim Bassett <[email protected]> Made-with: Claude Code
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.
Summary
handleUpdate()inapi/cluster.gocalledhttputil.DumpRequest(req, true)and logged the result at Debug level, serialising theAuthorization: Basic <base64>header verbatimDumpRequestcall entirely; the Logger middleware already covers equivalent request metadata (headers without Authorization, body, URL, host, remote addr) for every/v0requestTest plan
api/cluster_test.go: sends a PATCH withAuthorization: Basicand asserts the base64 credential value does not appear in debug logsapipackage specs continue to passnet/http/httputilimport removed;go vetcleanCloses TNZ-97927
🤖 Generated with Claude Code