【问题标题】:protecting and signing messages in WCF在 WCF 中保护和签名消息
【发布时间】:2012-09-12 09:40:13
【问题描述】:

我是这个奇妙网站的新成员,这是我在这里的第一个问题.. 我希望我能找到解决方案..

我正在构建一个网站,我需要保护客户端和服务器之间的通信。

我应该在实现中使用 WCF。

我的项目要求:

  • 使用 WCF
  • 绑定:ws2007HttpBinding
  • 安全性:HTTPS
  • 客户:签名

我应该使用 HTTPS 来保护通信,并且我应该让客户端签署消息(这很重要)。

我在服务器和客户端都安装了证书但我不知道如何让客户端签署消息。

我无法在 wcf 中使用消息安全性,因为我需要 HTTPS。任何人都可以帮助我了解 TransportWithMessageCredential 用于签名以及如何实现这样的事情?

这是服务器的app.config的一部分:

<bindings>
    <ws2007HttpBinding>
        <binding name="ServiceWS2007HttpBindingConfg">
            <security mode="TransportWithMessageCredential">
                <transport clientCredentialType="None" />
                <message clientCredentialType="Certificate" negotiateServiceCredential="false" />
            </security>
        </binding>
    </ws2007HttpBinding>
</bindings>
<services>
    <service name="Service">
        <endpoint address="https://MAHER-PC/EBPP/Service.svc" binding="ws2007HttpBinding"
         bindingConfiguration="ServiceWS2007HttpBindingConfg" contract="IService" />
    </service>
</services>

谢谢....

【问题讨论】:

    标签: wcf wcf-security x509certificate digital-signature


    【解决方案1】:

    取决于你打算签署什么。

    一个好的起点是查看在服务合同中为您的服务设置 ProtectionLevel。

    信息:

    http://msdn.microsoft.com/en-gb/library/aa347692.aspx

    如何:

    http://msdn.microsoft.com/en-gb/library/aa347791.aspx

    【讨论】:

      猜你喜欢
      • 2016-07-29
      • 2011-11-03
      • 2010-12-16
      • 1970-01-01
      • 2011-11-15
      • 1970-01-01
      • 2011-07-24
      • 1970-01-01
      • 2016-08-14
      相关资源
      最近更新 更多