当受信任的客户端/服务器群通过 Internet 进行通信时,WCF 安全
我有一些通过互联网运行 ASP.NET 应用程序的专用服务器。所有服务器都是完全可信的(都属于同一家公司)并且需要以安全的方式相互通信。它们不是域或工作组的一部分,也不应该是。
每个服务器都充当某些 WCF
服务的客户端和服务器。这些服务很少(每台服务器 1-2 个)且很轻(每次调用时传输少量数据)。
我可以使用自签名 SSL
证书或 X509
。我正在寻找某种方法来确保互联网上的任何人都无法调用服务器上的 WCF
服务。未来将添加新服务器。
我读到了有关 WCF
的内容,但现在我很困惑,是否使用自签名 SSL 证书是个好主意(目前非自签名不是一个选项),要使用哪个绑定,使用哪种安全模式、使用哪种身份验证方法... 我需要一些提示才能开始(请提供示例链接。
I have some dedicated servers running ASP.NET applications over internet. All servers are fully trusted (all belongs to the same company) and need to communicate to each other in a secure way. They are not part of a domain or work group and should not be.
Each server acts as both client and server of some WCF
services. These services are few (1-2 per server) and light (a little data is transferred on each call).
I can use self-signed SSL
certificates or X509
. I'm looking for some way to make sure nobody from internet can call a WCF
service on a server. New server would be added in the future.
I read about WCF
but now I'm confused, is it good idea to use self-signed SSL certificates or not (non self-signed is not an option at the moment), which binding to use, which security mode to use, which authentication method to use...
I need some hints to start (please provide a link to a sample.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将使用基于证书的身份验证,其中客户端和服务器都经过身份验证。
为了使事情更安全,不要使用自签名证书。
如果您的公司已经有证书服务器:向每个服务器颁发证书,并指定客户端和服务都需要提供由您的证书服务器颁发的证书作为身份验证配置。
I would use a certificate-based authentication where both client and server are authenticated.
To make things more secure, do not use self sign certificates.
If your company already have a certificate server: issue certificates to each of your server and specify as an authentication configuration that both client and services need to present a certificate issued by your certificate server.
WCF 安全性是一个大话题,但还有一些其他非 WCF 特定方法可以保护服务:
WCF security is a big topic, but there are some other non-WCF specific ways you can secure the service: