Masking of fields in Mule

故事扮演 提交于 2019-12-24 07:57:45

问题


I want to be able to mask a certain field from the current message payload in Mule, when logging it to a file. The field I want to mask is a sensitive value (say account number, or social security number) in a SOAP payload. This is to eliminate security risks. However, I also need to use the value later, after masking it.

My current approach

I am storing the current #[payload] in a session, and then modifying the current payload to replace the sensitive data by * * * *, using an XSLT transformer. Now, I can add the payload to a log, and the sensitive data will not be shown in its entirety. Then when I need the data, I am reading it back from the session.

Something does not feel right about this method. It feels more like a workaround. Is there a better way to do masking in mule?


回答1:


Writting to a log doesn't sound like something you have to do synchronously.

Can't you just "async" the xslt transformer and the logger? That would leave the original message untouched outside the async.



来源:https://stackoverflow.com/questions/10466303/masking-of-fields-in-mule

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!