连接两台服务器并防止 MITM 攻击的最佳方法

发布于 2024-11-08 12:11:20 字数 175 浏览 0 评论 0原文

您认为通过 C# Web 服务连接两台服务器的最佳方式是什么? 我不想使用 SSL,因为它会消耗大量服务器 CPU,并且我不想在计算机上添加更多负载。而且,它的速度也比较慢。

也许 OAuth2、WS-Security 或任何自定义服务(例如发送令牌(nonce+时间戳))可能是为了防止重新发送攻击。感谢您的任何建议。

What do you think is the best way to connect two servers through a C# web service?
I don't want to use SSL, because it consumes to much server CPU and I don't want to add more load on the machines. And besides, it's slower.

Perhaps OAuth2, WS-Security or any custom service like sending tokens (nonce+timestamp) maybe to prevent resend attacks. Thanks for any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情痴 2024-11-15 12:11:20

我的赌注仍然是 SSL。使用客户端证书来验证传入的请求。它被大规模用于保护敏感信息交换,特别适合防范 MITM。

SSL 的开销很可能不会显着影响您的 CPU 使用率,您测量过吗?如果您正在处理大量的小请求,那么握手可能会成为一个问题,但如果我理解正确的话,您只有两台服务器,在这种情况下,开销(如果我对 SSL/TLS 的理解是正确的)将在生命周期内摊销SSL 会话的。

简短的回答:添加 SSL 不太可能对您的 CPU 使用率产生不利影响,但在得出结论之前您应该始终分析您的场景。

更多阅读

My bet would still be on SSL. Use client certificates in order to verify incomming requests. It's in use on a large scale to protect sensitive information exchange and is especially well suited to protect against MITM.

The overhead of SSL will most likely not affect your CPU-usage noticably, have you measured? The handshake might be an issue if you're handling large amounts of small requests but if I understand you correctly you only have two servers and in that case that overhead (if my understanding of SSL/TLS is correct) will be amortized over the lifetime of the SSL session.

Short answer: It's unlikely that your CPU-usage will be adversly affected by adding SSL but you should always profile your scenario before jumping to conclusions.

More reading

依 靠 2024-11-15 12:11:20

WS-Security 具有相互身份验证和消息签名。该模式要求发送服务器具有接收方的证书(public ky)。然后,发送方可以通过验证签名来检查响应是否未被篡改,并可以检查用于签署响应的签名证书对于接收方来说是否正确。

WS-Security has mutual authentication and message signing. This mode requires that the sending server has a certificate (public ky) of the receiver. The sender can then check that the response has not been tampered with by verifying the signature and can check that the signing certificate use to sign the response was the correct one for receiver.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文