fix(logging): redact sensitive credentials from log output#522
Merged
emlautarom1 merged 2 commits intoJul 7, 2026
Merged
Conversation
emlautarom1
requested changes
Jul 6, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, but we could use less code given the expected usages.
Collaborator
|
Thanks for your contribution! Please take a look at the provided comments so we can proceed with the PR. |
Contributor
Author
|
@emlautarom1 i will get right on it |
Patrick-Ehimen
added a commit
to Patrick-Ehimen/pluto
that referenced
this pull request
Jul 7, 2026
9fc130b to
f7b70bb
Compare
- Use Secret<String> in keymanager::Client so Debug prints [REDACTED] - Manual Debug for KeymanagerConfig that redacts auth_token - redact_url() helper in bootnode strips userinfo before log fields - Unit tests for each redaction site
f7b70bb to
cc3a166
Compare
emlautarom1
approved these changes
Jul 7, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thanks for your contribution.
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.
Closes #504
Summary
keymanager::Client(eth2util): stores bearer token asSecret<String>(secrecy crate). DerivedDebugnow printsSecret([REDACTED])instead of the raw value.expose_secret()is called only at the HTTP header construction site.KeymanagerConfig(dkg): replaces derivedDebugwith a manual impl that prints<redacted>forauth_token, following the existingLokiConfigpattern in the tracing crate. The field staysStringso thebonbuilder API and CLI arg tests are unchanged.bootnode::resolve_relay(p2p): adds aredact_url()helper that strips embedded userinfo (basic-auth credentials) from relay URLs before they appear in tracing fields.Test plan
cargo test -p pluto-eth2util -- keymanager—client_debug_redacts_auth_tokenpassescargo test -p pluto-dkg -- keymanager—keymanager_config_debug_redacts_auth_tokenpassescargo test -p pluto-p2p -- bootnode::tests— all 3redact_url_*tests pass