保护双工 WCF MSMQ
我正在构建一个系统,其中多个客户端通过 WCF 使用双工 MSMQ 连接到中央服务器(更新发送到服务器,消息定期推送到多个客户端)。
我如何最好地保护这种情况?双工 WCF 的性质有效地使每个客户端成为服务器。这是否意味着要确保每个渠道的安全,每个客户都需要花费 1200 美元购买威瑞信证书?
I'm building a system where several clients are connected to a central server by WCF using duplex MSMQ (updates are sent to the server, messages are periodically pushed out to several clients).
How do I best secure this scenario? The nature of duplex WCF effectively makes each client a server. Does that mean to secure each channel every client needs to shell out $1200 for a verisign cert?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 MSMQ 绑定使用常规 MSMQ 队列,因此您可以使用标准 MSMQ 队列安全模型来实现安全性。您需要确保将安全模式设置为“传输”,然后根据需要允许或限制对队列的访问。
创建队列时,您可以设置权限来控制谁可以使用 Active Directory 或 Windows 帐户发送、接收或从队列中删除。我可以通过几分钟谷歌搜索找到的唯一资源是 MSMQ for .NET Developers - 描述一些有关设置权限的信息。
请阅读通过传输安全保护邮件以及< a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.netmsmqbinding.aspx" rel="nofollow">NetMsmqBinding 文档。
因此,您应该以同一用户身份运行服务,或者确保所有用户都在单个 AD 组中,等等,然后仅向该用户/组授予队列权限(发送权限?)。
Because MSMQ binding uses regular MSMQ queues, you can implement security using the standard MSMQ queue security model. You need to make sure you set security mode to 'Transport', and then allow or restrict access to the queue as appropriate.
When you create a queue you can set permissions which govern who can send, receive, or remove from the queue using active directory or Windows accounts. The only resource I can find with a few minutes googling is MSMQ for .NET Developers - describes a little about setting permissions.
Have a read of Securing Messages with Transport Security and the examples in the NetMsmqBinding documentation.
So you should either run your services as the same user, or ensure all the users are in a single AD group, etc and then grant queue permissions (send permission?) to that user / group only.