How to filter sensitive data from your logs

- J.D. Meier, Carlos Farre, Jason Taylor, Prashant Bansode, Steve Gregersen, Madhu Sundararajan, Rob Boucher

You can use message filters to log messages that match the filter criteria. For example you could use a message filter to remove personally identifiable information (PII) before it can get into log files.

Filters support the full XPath syntax. The following code shows how to configure a filter that records only messages that have a SOAP Header section.
<messageLogging logEntireMessage="true"
    logMalformedMessages="true" 
    logMessagesAtServiceLevel="true"
    logMessagesAtTransportLevel="true"
    maxMessagesToLog="420">
    <filters>
        <add nodeQuota="10" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                 /soap:Envelope/soap:Header
        </add>
     </filters>
</messageLogging>

Filters provide a safety feature using the nodeQuota attribute, which limits the maximum number of nodes in the XPath DOM that can be examined to match the filter.

Additional Resources

Last edited Jun 13, 2008 at 5:29 PM by prashantbansode, version 1

Comments

No comments yet.