首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >特定的ServiceInsight通过MessageMutator处理加密消息

特定的ServiceInsight通过MessageMutator处理加密消息
EN

Stack Overflow用户
提问于 2015-08-25 17:43:31
回答 1查看 71关注 0票数 0

因此,由于各种内部原因,我无法对命令属性使用内置在加密中的NService总线,而是将其实现为MessageMutator。我有这样的代码:

代码语言:javascript
复制
public class TransportMessageEncryptionMutator : IMutateTransportMessages
{
    // Encryption helper is intialized with key stored in Key Vault.
    private readonly EncryptionHelper encryptionHelper;
    public void MutateOutgoing(LogicalMessage logicalMessage, TransportMessage transportMessage)
    {
        var encryptedBody = this.encryptionHelper.EncryptBytes(transportMessage.Body);

        // Set the body of the message to be the encrypted copy of the data.
        transportMessage.Body = encryptedBody;
    }

    public void MutateIncoming(TransportMessage transportMessage)
    {
        // Decrypt the body of the message.
        var clearBody = this.encryptionHelper.DecryptBytes(transportMessage.Body);

        // Set the body of the message to be the decrypted copy of the data and clear flag.
        transportMessage.Body = clearBody;
    }
}

这一切都很好,当它们被放入公共汽车时,所有的东西都被加密了。我想要做的是能够在查看消息时解密消息,特别是在查看ServiceInsight应用程序时。我觉得他们提供了IMutateTransportMessages接口,并在他们的站点上提供了这一事实,特别是暗示了这样一个事实:这就是如何实现完整的消息加密;将有一种机制为ServiceInsight创建一个插件来解密它。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-08-26 05:15:46

目前还没有ServiceInsight的插件模型。

您可以做的是从ServiceInsight复制加密的值,并编写一个工具为您解密。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32210676

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档