当明文密码未存储在 Web 服务生产商上时,PasswordDigest 的替代方案是什么?
场景:
Web 服务生产者仅在数据库中存储密码的 SHA-1 哈希值。我们需要使用用户名/密码组合来验证 Web 服务用户。
Web 服务安全UsernameToken Profile 允许我们为此目的添加肥皂标头:
该元素是 WSS 中引入:SOAP 消息 安全文件作为一种方式 提供用户名。
在元素内,a 元素可能是 指定的。密码类型 密码文本和密码摘要是 不限于实际密码, 虽然这是一个常见的情况。 (146-151)< /a>
PasswordText 密码类型意味着密码以纯文本形式通过线路发送,如果我们不使用传输级别安全机制,这将是一个安全问题。 PasswordDigest 避免发送纯文本密码并发送哈希值。但为了避免重放攻击(即攻击者使用窃听来捕获散列密码并通过另一个请求重新发送),PasswordDigest 在计算散列之前向密码添加时间戳和随机数。此添加导致以下限制:
请注意,PasswordDigest 只能 如果使用纯文本密码(或 密码等效)可用 向请求者和请求者双方 接受者。 (196-197)< /a>
但在我们的例子中,我们没有纯文本密码。 我的问题是:除了在服务器上提供纯文本密码之外,我们还有什么替代方法?
Scenario:
Web-service producer have only SHA-1 hash of passwords stored in database. We need to authenticate Web-service users using User Name/Password combination.
Web Services Security UsernameToken Profile allows us to add soap headers for this purpose:
The element is
introduced in the WSS: SOAP Message
Security documents as a way of
providing a username.Within element, a
element may be
specified. Passwords of type
PasswordText and PasswordDigest are
not limited to actual passwords,
although this is a common case.
(146-151)
PasswordText password type means that password is sent over the wire as plain text which is a security issue if we are not using Transport Level Security mechanisms. PasswordDigest avoids sending plain text passwords and sends a hash. But to avoid replay attack (i-e attacker using wiretap to capture the hashed password and resend it with another request) the PasswordDigest adds a timestamp and a random number to password before computing the hash. This addition results in following restriction:
Note that PasswordDigest can only
be used if the plain text password (or
password equivalent) is available
to both the requestor and the
recipient. (196-197)
But in our case we do not have plain text password.
My question is: what alternates do we have other that to make plain text passwords available on the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SHA-1 可以完美地用作“明文”密码。
The SHA-1 can be perfectly used as a "plaintext" password.