WCF Debug Log Confidential Information

I am studying the security implications associated with disabling logging in WCF, in particular, what information it can / will log and if there are any configurations that can be made to mitigate it.

Say, if we create a DataContract with the Password property, which is part of the WCF operation, I need to know whether the property will be written in clear text when logging is enabled for requests and responses, and a service exception on any of the layers will reveal all this.

Other considerations may be related to each other. Using SSL or messages prevents this logging or any special binding, behavior, or sniffer configurations to intercept and possibly clear the logs.

The reason is that the client needs logs written to disk so as not to contain their client passwords, as less secure people in the company can read them.

thanks

+4
source share
2 answers

You must distinguish between MessageLogging and Tracing. Your sensitive data seems to be part of the message data. Therefore, when you turn on message logging, you will see your sensitive data in text form in your logs.

Tracing, on the other hand, is more related to WCF infrastructure events. The content of your posts will not be recorded there.

Also with exceptions thrown by the WCF runtime: they will never contain any message data. By default, exceptions provided to the client contain absolutely no information for security reasons. You must explicitly include the data that you want to send to the client in the event of an exception.

I'm not sure how to intercept logging and tracing, but WCF is certainly very extensible, so I'm sure there is an extension point to insert your TracingBehavior somewhere in the infrastructure.

+1
source

I think you should create a custom listener to track PII information - this is a good article about some of the best (section: Registering Confidential Information) - since it appears, you also use WebHost. I believe that regardless of SSL, PII will be logged, but there are ways to prevent unauthorized access.

0
source

Source: https://habr.com/ru/post/1333126/


All Articles