MOD-13014: hide user data from trace logs by default (fail closed) [8.10] by gabsow · Pull Request #1610 · RedisJSON/RedisJSON · GitHub
Skip to content

MOD-13014: hide user data from trace logs by default (fail closed) [8.10]#1610

Closed
gabsow wants to merge 1 commit into
8.10from
tom.gabsow/MOD-13014-hide-user-data-by-default-8.10
Closed

MOD-13014: hide user data from trace logs by default (fail closed) [8.10]#1610
gabsow wants to merge 1 commit into
8.10from
tom.gabsow/MOD-13014-hide-user-data-by-default-8.10

Conversation

@gabsow

@gabsow gabsow commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick of #1609 onto 8.10. Follow-up to #1608 (already merged).

Flips the JSONPath trace-log redaction gate to fail closed:

  • the cached hide-user-data-from-log flag now defaults to true (hidden)
  • read_hide_user_data_from_log returns true on any read failure, and shows data only when the server explicitly sets hide-user-data-from-log no

So contexts without a readable config (read errors, older Redis lacking the config, the standalone jsonpath binary, unit tests) keep user data hidden rather than leaking it. A running server still honors an explicit hide-user-data-from-log no.

Testing

  • cargo fmt -- --check, cargo clippy --all-targets -- -D warnings — clean
  • All json_path tests pass

🤖 Generated with Claude Code


Note

Medium Risk
Changes logging/redaction defaults and CONFIG interpretation; query results are unchanged but operators who relied on verbose traces without an explicit hide-user-data-from-log no will see less detail.

Overview
JSONPath trace logs now redact user data by default instead of only when Redis says to hide it. The cached hide-user-data-from-log flag starts as true, and trace_user_data! still skips those traces while the flag is set.

In the RedisJSON module, read_hide_user_data_from_log fails closed: CONFIG GET errors or missing/unparseable values keep redaction on. User data appears in traces only when the server sets hide-user-data-from-log to no (the previous logic treated yes as the signal to hide and defaulted to showing data on read failure).

Standalone jsonpath, tests, and older Redis without the config therefore no longer emit verbose user-data traces unless something explicitly opts out. A unit test now restores the hidden default after toggling the flag.

Reviewed by Cursor Bugbot for commit 321966a. Bugbot is set up for automated code reviews on this repo. Configure here.

Follow-up to #1605. The cached hide-user-data-from-log gate defaulted to
`false` (show), matching Redis core's config default. Flip it to fail
closed so user data is redacted unless the server is known to permit it:

- the cached flag now defaults to `true` (hidden)
- read_hide_user_data_from_log returns `true` on any read failure and
  shows data only when the server explicitly sets the config to `no`

This keeps user data out of the logs in contexts without a readable
config (read errors, older Redis lacking the config, the standalone
jsonpath binary, unit tests). A running server still follows an explicit
`hide-user-data-from-log no`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

@gabsow

gabsow commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

@gabsow gabsow closed this Jun 24, 2026
@gabsow gabsow deleted the tom.gabsow/MOD-13014-hide-user-data-by-default-8.10 branch June 24, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant