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
feat: prevent sensitive information (key, password, secrets etc.) from being printed in plain #1501
Conversation
because greptimedb/src/common/base/src/bytes.rs Lines 23 to 31 in 7dbac89
greptimedb/src/common/base/src/bytes.rs Lines 57 to 63 in 7dbac89
And we can also implement |
Codecov Report
@@ Coverage Diff @@
## develop #1501 +/- ##
===========================================
- Coverage 85.89% 85.44% -0.46%
===========================================
Files 550 550
Lines 82545 82600 +55
===========================================
- Hits 70904 70574 -330
- Misses 11641 12026 +385 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will be nice to use existing solutions. |
The inner struct of |
secstr provides a SecUtf8. But using secrecy is fine, these two crates are similar.
Oh, right, you could open a new PR for this.
I'm not sure, as BytesString might hold a non-UTF-8 string in the future. But we can implement Deref first since we only support UTF-8 strings now. Once it really needs to support non-UTF-8 encoding, we must remove the Deref impl and methods that access it as str directly. |
Thx! Got it. I'm ashamed that I didn't check the documentation for |
…m being printed in plain (GreptimeTeam#1501) * feat: add secret type * chore: replace key, password, secrets with secret type. * chore: use secrecy * chore: remove redundant file * style: taplo fmt
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
add secret type,
SecretString
andSecretBytes
.Checklist
Refer to a related PR or issue link (optional)
close #1487