- Notifications
You must be signed in to change notification settings - Fork1k
feat: log non-sensitive query param fields in the httpmw logger#19532
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedAug 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
All contributors have signed the CLA ✍️ ✅ |
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.
Should we only loglimit
,page
, andoffset
?
I think we also need to include oauth query params likestate
,client_secret
, etc. Coder is adding an OAuth server.
I just feel safer logging an explicit allow set, rather than a deny-list.
I do hear the argument for this. I still prefer the opt in approach to avoid logging anything that we should not. |
72e60ca
to893c00b
CompareSigned-off-by: Callum Styan <callumstyan@gmail.com>
want to denySigned-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
893c00b
toec3f727
Comparef0cf0ad
intomainUh oh!
There was an error while loading.Please reload this page.
Blink helped here but it's suggestion was to have a set map of sensitive fields based on predefined constants in various files, such as the api token string names. The map lookup would be faster than
strings.Contains
but would be more likely to lead to edge cases where new sensitive fields/slightly different formatting of a field leads to something sensitive being logged.We could change back to the map of sensitive field names, or alternatively we could define a map/slice of field names we know we do want to log, such as the params for pagination and overall limits. Personally I would prefer this approach just so we don't need to go in and add new values for each new field we want to log (when we notice it's not present), but it's not a hill I would die on.