-
Notifications
You must be signed in to change notification settings - Fork 389
Description
If ObjectMapperWrapper encounters a deserialisation error, it unconditionally dumps the entire json into the message of an IllegalArgumentException, which, if unexpected, will often make its way into the logs.
This is extremely ill-advised:
Json in the production database will often contain private or sensitive data that should not be accessible to everyone with access to the techincal logs.
Jackson does the same thing by default (although truncating the content a little), but it can at least be easily configured not to (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION)
But this is of little help when the library using it logs it again by itself.
Logback-level pattern-based masking is not suitable for redacting large and arbitrary jsob clobs.
Please provide a config to omit json-content from these errors, to limit data-leakage via logs.
Or maybe even better: drop it entirely, and leave content-logging it to the root-cause message from jackson, which is more informative about what is wrong anyway, even with content-quoting turned off.