TryGhost / Ignition

Basic configuration and tooling shared across applications
MIT License
16 stars 21 forks source link

REDACT Sensitive data rather than remove it. #88

Closed pysysops closed 5 years ago

pysysops commented 5 years ago

Currently removeSensitiveData : https://github.com/TryGhost/Ignition/blob/457541806647adea6f01443b1cb0863198030789/lib/logging/GhostLogger.js#L271-L289

Strips away headers and values. I'd like to recommend we replace the value with 'REDACTED' instead as we may be missing valuable context when troubleshooting issues. For example: request with an authorization header and one without are 2 totally different problems. When we strip it away in the logs, was it ever there...

pysysops commented 5 years ago

I'd allowing the ability to configure whether we log the body content or not as for some applications, that may be useful.