[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak debug_redact behavior #460

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Tweak debug_redact behavior #460

merged 2 commits into from
Jul 23, 2024

Conversation

sfc-gh-srhodes
Copy link
Collaborator

In sansshell we use redact to avoid logging sensitive info primarily for avoiding leaking secrets, not to provide privacy. I've switched our redaction from --REDACTED-- to REDACTED-<sha256hash> so that it's possible to figure out if a field matches a known value while not being possible to learn the value purely from reading the field. The empty value is left unredacted because it should never be secret. I've also added support for bytes in addition to strings.

Now that we have a more generous redaction, I've added it to a couple more fields that seem like they might accidentally contain secrets.

In sansshell we use redact to avoid logging sensitive info primarily for avoiding leaking secrets, not to provide privacy. I've switched our redaction from `--REDACTED--` to `REDACTED-<sha256hash>` so that it's possible to figure out if a field matches a known value while not being possible to learn the value purely from reading the field. The empty value is left unredacted because it should never be secret. I've also added support for bytes in addition to strings.

Now that we have a more generous redaction, I've added it to a couple more fields that seem like they might accidentally contain secrets.
Copy link
Collaborator
@sfc-gh-jallie sfc-gh-jallie left a comment

Choose a reason for hiding this comment

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

LGTM

auth/opa/rpcauth/redact.go Show resolved Hide resolved
proxy/testdata/testservice.proto Show resolved Hide resolved
@sfc-gh-srhodes sfc-gh-srhodes merged commit 346fb9f into main Jul 23, 2024
5 checks passed
@sfc-gh-srhodes sfc-gh-srhodes deleted the srhodes-debug-redact branch July 23, 2024 17:09
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.

2 participants