简体   繁体   中英

How to mask sensitive details logged by org.mule.module.http.internal.HttpMessageLogger in Mule server

Our application is running on Mule 3.8.4 runtime and when we enable or set to DEBUG mode for org.mule.module.http.internal.HttpMessageLogger in log4j as below, we are able to see the HTTP logs being printed which contains payload details.

Now the concern here is when it comes to sensitive API related to SPI information they too get logged if log level SET to DEBUG mode. Is there any way we can capture the logs and before getting printed to Mule servers so that we mask those sensitive details.

That debug level is call HTTP Wire logging . It will print what is being sent and received at the socket level. There is no provision for filtering information.

I don't recommend this, but given that the log is implemented in log4j2 you could try to implement a Regex filter , but you will have to test how it affects the performance of the application, and it will be probably very limited in functionality.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM