Skip to content

Hide user data from log#13400

Merged
sundb merged 19 commits intoredis:unstablefrom
sundb:hide-user-data-from-log
Jul 9, 2024
Merged

Hide user data from log#13400
sundb merged 19 commits intoredis:unstablefrom
sundb:hide-user-data-from-log

Conversation

@sundb
Copy link
Collaborator

@sundb sundb commented Jul 8, 2024

This PR is based on the commits from PR #11747.

In the event of an assertion failure, hide command arguments from the operator.

In some cases, private client information can be voluntarily exposed when a redis instance crashes due to an assertion failure.
This commit prevent וnintentional client info exposure.
Operators can still access the hidden data, but they must actively request it.
Any of the client info commands remains the unchanged.

Config

Add a new config hide-user-data-from-log to turn this feature on and off, default off.

Co-authored-by: naglera [email protected]

@sundb sundb requested a review from oranagra July 8, 2024 11:14
oranagra
oranagra previously approved these changes Jul 8, 2024
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label Jul 8, 2024
Comment on lines -1157 to -1158
catch {
set ldd [exec ldd src/redis-server]
Copy link
Collaborator Author

@sundb sundb Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tcl, return in catch is used to exit the block of catch not the block of proc, it will leave catch and continue to execute 'return 0'.

proc test {} {
    catch {
        puts "a"
        return
        puts "b"
    }
    puts "c"
}

test

output:

a
c

@sundb sundb requested a review from oranagra July 9, 2024 09:55
@sundb sundb merged commit 69b480c into redis:unstable Jul 9, 2024
sundb added a commit to sundb/redis that referenced this pull request Jul 10, 2024
@sundb sundb deleted the hide-user-data-from-log branch August 9, 2024 01:36
funny-dog pushed a commit to funny-dog/redis that referenced this pull request Sep 17, 2025
This PR is based on the commits from PR redis#11747.

In the event of an assertion failure, hide command arguments from the
operator.

In some cases, private client information can be voluntarily exposed
when a redis instance crashes due to an assertion failure.
This commit prevent וnintentional client info exposure.
Operators can still access the hidden data, but they must actively
request it.
Any of the client info commands remains the unchanged.

### Config
Add a new config `hide-user-data-from-log` to turn this feature on and
off, default off.

---------

Co-authored-by: naglera <[email protected]>
Co-authored-by: naglera <[email protected]>
sundb pushed a commit that referenced this pull request Jan 4, 2026
This PR continues the work from
[#13400](#13400), following the
discussion in
[#11747](#11747 (comment)),
to further ensure sensitive user data is not exposed in logs when
hide_user_data_from_log is enabled.

- Introduce redactLogCstr() helper for safe, centralized log redaction.
- Update ACL and networking log messages to use redacted values where
appropriate.
- Prevent leaking raw query buffer contents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants