Skip to content

Do not log full request when bad response code is received#79

Merged
jesperfj merged 2 commits intojesperfj:masterfrom
faf0-addepar:faf0/log-url-only
Jul 25, 2020
Merged

Do not log full request when bad response code is received#79
jesperfj merged 2 commits intojesperfj:masterfrom
faf0-addepar:faf0/log-url-only

Conversation

@faf0-addepar
Copy link
Contributor

@faf0-addepar faf0-addepar commented Oct 22, 2019

The request object potentially contains sensitive information. For
requests resulting in a bad response code, log only the response code
and the request method and URL.

The request object potentially contains sensitive information. For
requests resulting in a bad response code, log only the response code
and the request URL.
@faf0-addepar
Copy link
Contributor Author

@jesperfj please review when you have a moment

@jesperfj
Copy link
Owner

Thanks for this pull. I think this is good "hygiene" change. But it could make it harder to debug problems. In your opinion, would some people have a harder time debugging the cause of the error when they cannot see the full request? Should we solve that with a logger.debug type approach? (turn on more verbose logging to get the full request)

@jesperfj jesperfj merged commit 3dbcb6c into jesperfj:master Jul 25, 2020
@jesperfj
Copy link
Owner

This is now released to 0.0.43

@faf0-addepar
Copy link
Contributor Author

In your opinion, would some people have a harder time debugging the cause of the error when they cannot see the full request? Should we solve that with a logger.debug type approach? (turn on more verbose logging to get the full request)

That's possible, but at a minimum authentication headers should always be removed: #76 . Also, PII should be removed. It might be hard to enumerate where sensitive information such as PII can be present, so there is some risk with debug logging.

@faf0-addepar faf0-addepar deleted the faf0/log-url-only branch July 28, 2020 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants