[英]protecting and signing messages in WCF
I'm a new member in this fantastic website and this is my first question here .. I wish I can find the solution.. 我是这个梦幻般网站的新成员,这是我在这里的第一个问题..我希望我能找到解决方法。
I'm building a website and I need to secure the communications between clients and the server. 我正在建立一个网站,并且需要保护客户端和服务器之间的通信安全。
I should Use WCF in the implementation. 我应该在实现中使用WCF。
My project's requirements : 我的项目需求:
I should use HTTPS for securing the communications and I should make the client sign the message (it's important). 我应该使用HTTPS来确保通信的安全,并且应该让客户端对消息进行签名(这很重要)。
I install certificates in both server and Client But I don't knoe how to make the clients sign the message. 我在服务器和客户端中都安装了证书,但是我不知道如何使客户端对消息进行签名。
I can't use message security in the wcf because I need HTTPS. 我需要HTTPS,因此无法在wcf中使用消息安全性。 Anyone can help me to know what is the TransportWithMessageCredential do for signing and how to implement such a thing??
任何人都可以帮助我了解TransportWithMessageCredential用于签名的方式以及如何实现这种方式?
Here is part of the app.config of the server: 这是服务器的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>
thanks.... 谢谢....
Depends on what you're planning to sign. 取决于您打算签名的内容。
A good place to start would be to have a look at setting the ProtectionLevel for your service in the service contract. 一个好的开始是看一下在服务合同中为您的服务设置ProtectionLevel。
Information: 信息:
http://msdn.microsoft.com/en-gb/library/aa347692.aspx http://msdn.microsoft.com/en-gb/library/aa347692.aspx
How to: 如何:
http://msdn.microsoft.com/en-gb/library/aa347791.aspx http://msdn.microsoft.com/en-gb/library/aa347791.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.