-
Notifications
You must be signed in to change notification settings - Fork 55
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
Sanitize transport config and include in report (Alt Approach) #152
Sanitize transport config and include in report (Alt Approach) #152
Conversation
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 change is happening at a lower level than it should be. It should be in the caller of the connectivity library instead, like it's done in test-connectivity. Please revert.
We should either merge this PR or PR #159, not both. |
x/config/config.go
Outdated
} else { | ||
return u, nil | ||
} | ||
// If no user info is found, return the scheme and redacted placeholder |
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.
Why? Perhaps just drop the path or search params?
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.
sanitizeURLGeneric
is a bit conservative in terms of not leaking any sensitive info. Right now if no UserInfo
is detected, I redact everything.
Perhaps, I should further dissect the URL and keep url.host
if it has the ip:port
format and keep path, query params and fragments.
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.
see my other comment here
Co-authored-by: Vinicius Fortuna <[email protected]>
Co-authored-by: Vinicius Fortuna <[email protected]>
Co-authored-by: Vinicius Fortuna <[email protected]>
@fortuna Thanks for all the feedback! I applied the last requested changes, resolved merge conflicts and merged with main :) |
This PR scoped changed since opening it. Currently, it proposes a standalone sanitizer method in
config.go
that redacts sensitive user info.