fix: redact secret property values in SessionContext Debug - #2960
Open
plusplusjiajia wants to merge 1 commit into
Open
fix: redact secret property values in SessionContext Debug#2960plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
plusplusjiajia
marked this pull request as ready for review
August 5, 2026 09:14
plusplusjiajia
force-pushed
the
fix/session-context-debug-redaction
branch
10 times, most recently
from
August 6, 2026 01:43
767c783 to
36f0722
Compare
plusplusjiajia
force-pushed
the
fix/session-context-debug-redaction
branch
from
August 6, 2026 01:48
36f0722 to
f7ceb7e
Compare
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 changes are included in this PR?
SessionContext's derivedDebugprintedpropertiesverbatim, while session properties routinely carry secrets. Redaction now happens on two levels:token,s3.secret-access-key,AWS_SECRET_ACCESS_KEY,clientSecret,Authorization,Cookie, ...) since property keys carry no casing contract.uriholdingpostgres://user:pass@host/db) and signed URLs (X-Amz-Signature=, SASsig=).Plain values (warehouse names, credential-free URIs) stay visible, so
Credential's redaction isn't undone by the map next to it. Same approach as the REST catalog config redaction in #2838.Are these changes tested?
Table-driven tests pin both matchers (key casings/separators, URI/signed-URL values, plus negative cases), and a
Debugformatting test asserts secret values are redacted while plain values remain visible.