I am currently working on an application that uses Apache CXF to make requests to a third party. We need to log every request that is being sent. The issue is, many of these requests contain sensitive data that cannot be logged. The data itself is usually encrypted before being sent, but we can't even log the encrypted value.
A super easy solution would be to create a "blacklist" of fields that shouldn't be logged. The problem with this is it is easy to miss a field in a constantly growing application.
What I want to do is figure out a way to "whitelist" fields that should be logged.
It seems complicated, but I can't be the only person that has ever needed to do this.