WCF 安全和 NetTcpBinding
我在 MS -WCF 的培训套件中读到,默认情况下所有绑定都提供网络安全性,开发人员无需执行任何操作即可实现安全性。
我对此有一个疑问:-我使用了 netTcpBinding 并且我将各种对象从客户端发送到服务器。发送对象时,我们在对象的属性之一中发送一个特殊的 guid,在处理请求之前我们会在服务器上再次验证该属性。
我想知道所有漏洞都涉及哪些,如果不明确执行任何安全操作,即不应用传输级别安全性。
还有一点我们在 Internet 上使用 NetTcpBinding。
I have read in Training Kit of MS -WCF that all the bindings by default provide network security that is developer has to do nothing for implementing security.
I have one query over this :- I have used netTcpBinding and i send various objects from client to server. When sending objects we send a special guid in one of the properties of object which we again verify at Server before processing the request.
I will like to know what all vulnerabilities are involved, if do not do anything explicitly for Security, that is no transport level security is applied.
One more point we are using NetTcpBinding at Internet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
netTcpBinding 通常用于可能有点对点通信的 Intranet,因此传输安全性可能就足够了。
如果您通过网络进行操作,那么您将需要启用消息级安全性来保护端到端流量(传输安全性仅保护 1 跳的内容)。 netTcpBinding 的默认安全性是传输安全性,因此您需要更改它。
在这两种情况下,都实现了消息隐私(加密)、完整性(防篡改)和部分身份验证。
NetTcpBinding 我相信默认为 Windows 身份验证 - 因此您将需要域中或实际上服务计算机上的帐户(如果在工作组中操作)与客户端的 Windows 凭据匹配。
请注意,如果需要,您可以以编程方式更改来自客户端的请求凭据,并在打开客户端代理之前以编程方式设置它们。
还可以实现可靠的消息传递。
netTcpBinding is normally used for Intranet where you are likely to have point to point comms so transport security is probably adequate.
If you are operating over the web then you will want to enable Message level security to secure the end to end traffic (transport security will only secure the content for 1 hop). The default security for netTcpBinding is transport security so you need to change this.
In both cases message privacy (encryption), integrity(against tampering) and partial authentication is achieved.
NetTcpBinding I believe defaults to Windows authentication - so you will need an account in a domain or actually on the Service machine (if operating in a Workgroup) matching the Windows credentials of the client.
Note that you can programmatically change request the credentials from the client and set them programmatically before opening the client proxy if need be.
Also enable reliable messaging.