为跨平台 WCF 服务选择什么身份验证?
您建议该服务采用什么类型的身份验证:
- 作为 WCF 实现并通过以下方式公开 varios enpoints(包括 XML-RPC)
- 必须能够被各种跨平台客户端轻松使用,
为什么?
我知道的选项有:
- 基于表单的 IIS 托管 WCF 身份验证(易于实现,但跨平台支持很糟糕,而且它不是 REST)
- 每次调用时发送纯文本用户名/密码(易于实现 )在任何平台上使用,但完全不安全)
- 使用基于票证的身份验证,当用户名和密码用于创建在一段时间内有效并随每个请求传递的票证时(可以被任何客户端轻松使用,但API模型与这种类型的安全性绑定)
感谢您的宝贵时间!
What type of authentication would you suggest for the service that is:
- implemented as WCF and exposed via
varios enpoints (including XML-RPC) - has to be consumed easily by various cross-platform clients
Why?
Options that I'm aware of are:
- Forms-based authentication for IIS-hosted WCF (easy to implement, but has horrible cross-platform support, plus it is not REST)
- Sending plain-text username/pwd with every call (easy to use on any platform, but totally unsecure)
- Using ticket-based authentication, when username&pwd are used to create a ticket that is valid for some time and is passed with every request (can be consumed by any client easily, but the API model is bound to this type of security)
Thanks for your time!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
既然您提到了 REST,我假设通过 HTTP,您可以查看 HTTP 摘要身份验证。
但是,请记住 XML-RPC 不是 RESTful。 如果您选择 WS/RPC,您可能需要了解 WS-Security。
Since you mention REST, i assume over HTTP, you could look at HTTP Digest Authentication.
However, keep in mind that XML-RPC is not RESTful. If you are going the way of WS/RPC, you might want to look at WS-Security.
最后,我选择了最简单的方法:Web 服务被实现为简单的无状态 SOAP 服务,其中用户名和密码随每个请求一起传递。
产品页面
In the end I've picked the simplest approach: Web services are implemented as simple stateless SOAP services, where username and password get passed with every request.
Product page