本文介绍了掩蔽fields子中的田野的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在将Mule中的当前消息有效载荷记录到文件中时将其屏蔽掉.我要屏蔽的字段是SOAP有效负载中的敏感值(例如,帐号或社会安全号码).这是为了消除安全风险.但是,在屏蔽它之后,我还需要稍后使用该值.

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.

我目前的做法

我将当前的#[payload]存储在一个会话中,然后使用XSLT转换器修改当前的有效负载以用* * * *替换敏感数据.现在,我可以将有效负载添加到日志中,敏感数据将不会完整显示.然后,当我需要数据时,我将从会话中读回它.

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.

这种方法有些不适.感觉更像是一种解决方法.有没有更好的方法在m子中进行遮罩?

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

推荐答案

写日志听起来并不像您必须同步进行.

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

您不能只是异步" xslt转换器和记录器吗?这将使原始消息在异步外部保持不变.

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

这篇关于掩蔽fields子中的田野的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 04:05