使用 ws-security 签署消息时要签署什么

发布于 2024-09-03 03:06:49 字数 259 浏览 3 评论 0原文

我正在向我的 Web 服务添加安全性,并选择签署 TimestampToken

在阅读文档时,我发现了很多示例,其中他们对 SOAP 消息的 Body 进行签名。

我的问题是:什么是最好的签名?

据我了解,如果 Body 非常大,则签署 Body 可能会导致性能问题。

谢谢。

I am adding security to my web service and chose to sign the Timestamp and Token.

While reading docs I found a lot of examples where they sign the Body of the SOAP message.

My question is: what is best to sign?

From what I understand signing the Body could lead to performance issues if the Body is pretty large.

Thanks.

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

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

发布评论

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

评论(2

以往的大感动 2024-09-10 03:06:49

您绝对应该签署整个消息正文。

XMLDSIG 对中定义的引用部分的摘要执行。与 PKI 操作相比,在大型主体中运行 SHA1 等哈希算法只需很少的时间。您不应该担心性能。

You should definitely sign the whole message body.

XMLDSIG is performed on the digests of referenced parts defined in <SignedInfo>. Running a hash algorithm like SHA1 through a large body takes very little time compared with the PKI operations. You shouldn't worry about performance.

孤凫 2024-09-10 03:06:49

如果客户端通过 HTTPS 向服务器发送 WS-Secure SOAP 请求,我的理解是,即使有人嗅探流量,他们也无法解密以查看 SOAP 消息,因此无法对其进行修改。所以我认为没有必要使用双向 SSL。

当通过 HTTPS 使用 WS-Secure 时,我们是否可以不让 HTTPS 负责加密,而只使用 WS-Secure 进行身份验证(即签署 SOAP 消息的某些部分,时间戳、正文或其他内容)?

If a client sends a WS-Secure SOAP request to the server over HTTPS my understanding is that even if someone sniffed the traffic they cannot decrypt it to look at the SOAP message and therefore cannot tinker with it. So I don't see the need for two-way SSL.

When using WS-Secure over HTTPS can we not let the HTTPS take care of encryption and simply use WS-Secure for authentication (ie signing some part of the SOAP message either timestamp or body or something else) ?

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