Disable the creation of bean jsonBodyFieldsFilter from LogbookAutoConfiguration
I would like to disable the creation of jsonBodyFieldsFilter from LogbookAutoConfiguration so I am able to create my own BodyFilter which allows for a more flexible obfuscation (such as partial obfuscation) of the fields declared in logbook.obfuscate.json-body-fields instead of using a fixed replacement. The filter can be any implementation of BodyFilter.
Not sure whether this can be considered a bug or a feature. Perhaps a possible fix would be introducing @ConditionalOnProperty where we can define a property to disable it?
- Version used: 3.9.0
I happen to come across this issue, and I've asked in discussion something that seems similar: https://github.com/zalando/logbook/discussions/1840.
Just linking this here, because I think you're asking for even more flexibility, which seems to be even better than having a fallback to BodyFilter.none().
The fix for the issue (https://github.com/zalando/logbook/pull/2007) will be added to the next release. Resolving it (to get it to the release notes), feel free to reopen, if it's not fully addressed.