[英]WCF Restful Service with Service certificate
I have develop a securized WCF Service with wsHttpBinding using ssl and a SERVICE certificate (not a client certificate, but a service one!). 我已经使用ssl和SERVICE证书 (不是客户端证书,而是服务证书!)开发了带有wsHttpBinding的安全WCF服务。 Only clients storing the self signed certificate in their certificate store will be allowed to consume the service.
只有将自签名证书存储在其证书存储区中的客户端才能使用该服务。
I used a configuration similar as : 我使用的配置类似于:
<security mode="Transport">
<transport clientCredentialType="None" />
<message clientCredentialType="None" negotiateServiceCredential="true" />
</security>
<behaviors>
<serviceBehaviors>
<behavior name="CertificateServiceBehavior">
<serviceCredentials>
...
<serviceCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" findValue="server" />
</serviceCredentials>
...
</behavior>
</serviceBehaviors>
</behaviors>
I am quite new to WCF Securisation. 我对WCF Securisation很陌生。 I've search a lot a bout securisation but i need you to help me out with my questions.
我已经搜索了很多关于证券化的信息,但是我需要您帮助我解决我的问题。
Today I was asked to securize a WCF Restful service. 今天,我被要求购买WCF Restful服务的证券。
Looking over internet I have found that we could : 查看互联网,我发现我们可以:
My questions are: 我的问题是:
a) From my first example at the beginning, I have assumed that when we setup a service certificate, this isto securize a wcf service at the message level (in comparaison with transport, as ssl is taking care of transport). a)从我的第一个示例开始,我假设当我们设置服务证书时,这是为了在消息级别上证券化wcf服务(与传输进行比较,因为ssl负责传输)。 Please correct me if i am wrong ?
如果我错了,请纠正我?
b) For WCF Restful Service, the binding we use is WebHttpBinding. b)对于WCF Restful Service,我们使用的绑定是WebHttpBinding。 According to http://msdn.microsoft.com/fr-fr/library/bb412176%28v=vs.110%29.aspx there is no element under :
根据http://msdn.microsoft.com/fr-fr/library/bb412176%28v=vs.110%29.aspx,下面没有元素:
<security mode="None/Transport/TransportCredentialOnly">
// here there is only <transport> available with clientCredential="certificate" available.
</security>
So, could we setup a service certificate for a restful Service? 那么,我们可以为宁静的服务设置服务证书吗?
Thanks for helping ! 感谢您的帮助!
Admittedly, I had a bit of difficulty understanding the details of your question, but discerned (hopefully correctly) that you are looking for recommendations to secure your WCF service with certificates. 诚然,我在理解您的问题的细节方面有些困难,但是(希望是正确的)辨认出您正在寻找建议以证书保护WCF服务。 When facing a similar consideration, our team found that the following MSDN article provided a comprehensive and easy to understand walk-through of Message Security with Mutual Certificates.
当面临类似的考虑时,我们的团队发现以下MSDN文章提供了使用互证书的消息安全性的全面且易于理解的演练。
http://msdn.microsoft.com/en-us/library/ms733102(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/ms733102(v=vs.110).aspx
The article clearly indicates the necessary requirements and provides code and configuration examples. 本文清楚地指出了必要的要求,并提供了代码和配置示例。
Regards, 问候,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.