如何使用 SOAP 验证用户身份?
我们是否必须将用户名/密码与 SOAP 消息一起发送? 在这种情况下,我的数据库服务器每次都必须运行查询来进行身份验证。
有没有一种基于令牌的身份验证方法?如果有人能指出我正确的方向,那将非常有帮助。
Do we have to send username/password along with the SOAP message ?
In that case, my database server will have to run a query every time to authenticate.
Is there a method for token based authentication ? It would be really helpful if someone could point me in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我们的环境中,是的。但我们使用的是执行身份验证的 Cisco 和/或第 7 层网关,因此当它到达应用程序服务器时,它位于内部网络上并且受信任。
或者,您可以传递用户名/密码和某种令牌字符串。你的服务器会查看令牌并查看它是否通过“嗅探”测试(太旧?零长度?校验和错误?来自错误的 IP?)如果嗅探正常,那就没问题。如果不行(通常为空),则使用用户 ID/密码进行身份验证,生成具有当前时间戳的新令牌,并使用其 IP 地址(或其他内容)生成新令牌。也许可以在其中添加一个 GUID 以确保唯一性。如果他们没有任何有效信息(令牌错误、用户 ID/密码丢失),则发回质询,以便他们可以使用用户 ID/密码重新提交。
In our environment, yes. But we're using Cisco and/or Layer7 gateways which perform the authentication, so by the time it gets to the application server, it's on the internal network and trusted.
Alternately, you could pass a userid/password and some sort of Token string. Your server would look at the token and see if it passes a "sniff" test (too old? Zero length? Checksum bad? coming from wrong IP?) if it sniffs ok, it's ok. If it's not ok (typically blank), then use the userid/password to authenticate, generate a new token with a current timestamp, and use their IP addr (or something) to generate the new token. Maybe throw a GUID in there for uniqueness. If they don't have anything valid (token bad, userid/password missing), then send a challenge back, so they can re-submit with userid/password onboard.