-
Couldn't load subscription status.
- Fork 263
chore_: use sensitive string in MarketDataProxyConfig #6592
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
base: develop
Are you sure you want to change the base?
chore_: use sensitive string in MarketDataProxyConfig #6592
Conversation
Jenkins BuildsClick to see older builds (9)
|
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.
The MarketDataProxyConfig changes look good to me 👍
But I'm against bloating SensitiveString type with lots of sugar methods. Please keep it slim and simple 🙏 Or convince me that I'm wrong 😄
| func (s SensitiveString) ContainedIn(str any) bool { | ||
| return strings.Contains(getValue(str), s.value) | ||
| } | ||
|
|
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.
This is exactly why I was against adding TrimRight method. We will automatically start adding a ton of other methods, which are implemented in strings and other standard libraries.
It is absolutely fine to use strings.Contains("text", secret.Reveal()).
Think of single responsibility. SensitiveString should not implement each and every method for all use cases. It should remain as slim as possible, providing just 1 feature: keep strings secret until explicitly revealed.
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.
Same about Equal method.
And especially if they're only used in tests!
Pls review by commit :)