security - 传输级与消息级安全

标签 security wcf-security

我正在阅读一本关于 WCF 的书,作者就使用消息级安全性而不是使用传输级安全性的优点进行了辩论。无论如何,我在作者的论点中找不到任何逻辑

One limitation of transport security is that it relies on every “step” and participant in the network path having consistently configured security. In other words, if a message must travel through an intermediary before reaching its destination, there is no way to ensure that transport security has been enabled for the step after the intermediary (unless that interme- diary is fully controlled by the original service provider). If that security is not faithfully reproduced, the data may be compromised downstream.

Message security focuses on ensuring the integrity and privacy of individ- ual messages, without regard for the network. Through mechanisms such as encryption and signing via public and private keys, the message will be protected even if sent over an unprotected transport (such as plain HTTP).



一种)

If that security is not faithfully reproduced, the data may be compromised downstream.



是的,但是假设两个系统通信使用 SSL 和证书,那么它们交换的数据不能被中介解密,而只能被更改,接收者会注意到并因此拒绝数据包?!

b) 无论如何,据我了解以上引用,这意味着如果两个系统建立 SSL 连接,并且如果中间系统 S已启用 SSL 并且如果 S也归黑客所有,然后S (又名黑客)将无法拦截通过它的 SSL 流量?但如果 S没有启用 SSL,那么黑客将能够拦截 SSL 流量?那没有意义!

C)

Message security focuses on ensuring the integrity and privacy of individ- ual messages, without regard for the network. Through mechanisms such as encryption and signing via public and private keys, the message will be protected even if sent over an unprotected transport (such as plain HTTP).



这没有意义,因为传输级别的安全性也可以使用加密和证书,那么为什么在消息级别使用私钥/公钥比在传输级别使用它们更安全呢?也就是说,如果中介能够拦截 SSL 流量,为什么它也不能拦截通过消息级私钥/公钥保护的消息?

谢谢你

最佳答案

考虑 SSL 拦截的情况。

通常,如果您有一个到服务器的 SSL 加密连接,您可以相信您“确实*连接到该服务器,并且服务器的所有者已经明确地向相互信任的第三方表明了自己的身份,例如 Verisign、Entrust 或 Thawte (通过提供识别其姓名、地址、联系信息、开展业务能力等的凭据,并接收由第三方签名会签的证书)。使用 SSL,该证书向最终用户保证用户之间的流量浏览器(客户端)和服务器的 SSL 端点(可能不是服务器本身,而是安装了 SSL 证书的某些交换机、路由器或负载平衡器)是安全的。任何拦截该流量的人都会得到 gobbledygook,如果他们篡改它无论如何,流量都会被服务器拒绝。

但是 SSL 拦截在许多公司中变得越来越普遍。通过 SSL 拦截,您“请求”到(例如)www.google.com 的 HTTPS 连接,该公司的交换机/路由器/代理会向您提供一个有效证书,将 www.google.com 命名为端点(因此您的浏览器不会t 提示名称不匹配),但它不是由相互信任的第三方会签,而是由他们自己的证书颁发机构(在公司的某个地方运营)会签,您的浏览器也恰好信任它(因为它在您的公司可以控制的可信根 CA 列表)。

该公司的代理随后会与您的目标站点(在本例中为 www.google.com)建立单独的 SSL 加密连接,但中间的代理/交换机/路由器现在能够记录您的所有流量。

您仍然会在浏览器中看到一个锁定图标,因为流量使用他们自己的证书加密到您公司的内部 SSL 端点,并且流量从该端点到您的最终目的地使用目的地的 SSL 证书重新加密,但是男人在中间(代理/路由器/交换机)现在可以记录、重定向甚至篡改您的所有流量。

消息级加密将保证消息保持加密,即使在这些中间“跳跃”期间,流量本身也被解密。

负载平衡是另一个很好的例子,因为 SSL 证书通常安装在负载平衡器上,它代表 SSL 端点。然后负载平衡器负责决定将现在解密的流量发送到哪个物理机器进行处理。在最终到达可以理解和处理消息的服务端点之前,您的消息可能会像这样经过几个“跃点”。

关于security - 传输级与消息级安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4270883/

相关文章:

java - 发布数据时出错:java.lang.RuntimeException:导出限制:仅 SunJSSE::在 jboss 服务器中

wcf - 使用 TransportWithMessageCredential 时 CredentialCache.DefaultNetworkCredentials 为空

wcf - 唯一证书认证和REST服务

wcf - 使用 TcpClientCredentialType.Windows 时的加密强度是多少?

wcf - 为 wsHttpBinding 配置 WCF

amazon-web-services - 如何在 AWS 上创建真正具有最低权限的部署用户?

javascript - 有什么好的方法可以防止JavaScript多人游戏作弊?

C#:消费计划中的 Azure Functions 中不存在 key 集

c# - 如何确保 IsInRole 检查不使用缓存的凭据

spring - 我应该在哪一侧验证表单数据,客户端还是服务器端?