ASP.NET、WCF:如何对调用应用程序进行身份验证?不是用户,而是应用程序本身
由于一些原因,我工作的那群人不想使用证书,也不喜欢任何人都可以通过有效登录来访问服务的想法。
我的问题是如何在不使用证书的情况下将应用程序验证为适合与这些 wfc 服务一起使用的官方应用程序?
他们试图避免出现这样的情况:好奇的客户足够聪明,能够检索服务调用,并拥有足够的基础设施来构建自己的客户端来使用它们。
For a few reasons, the bunch I'm working for don't want to use certificates and don't like the idea of a service that can be accessed by anybody with a valid logon.
My question is how can I authenticate an application as being an official application suited for use with these wfc services without using certificates?
They are trying to avoid a situation where inquisitive customers are clever enough to retrieve the service calls and have enough infrastructure to build their own clients to use them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这是很难实现的。如果您公开服务,您只是说“嘿,如果您有有效的凭据,您可以使用以下一些功能”。调用应用程序的标识只是消息中发送的另一个数据。因此,如果您有聪明的客户,拥有有效的凭据和有效的 IP(如果您使用某些过滤器),他可以从自己的应用程序发送相同的标识。如果您创建一些巧妙的算法来创建随机有效的应用程序 ID,您仍然会将该算法与您的客户端应用程序一起提供,因此您需要进行混淆以保护其代码免受逆向工程的影响。
I think this is hardly achievable. If you expose service you are just saying "Hey, here is some functionality you can use if you have valid credentials". Identification of calling application is just another data send in a message. So if you have clever customer who has valid credentials and valid IP (if you use some filter) he can just send the same identification from his own application. If you create some clever algorithm for creating random valid application ID you would still ship that algorithm with your client application so you would need obfuscation to secure its code from reverse engineering.
我们在一项工作中使用了幻数方案,将生成的幻数与一系列 IP 配对。然而,我们也使用用户名密码只是一种想法。
We used a magic number scheme in one job where we paired a generated magic number with a range of IPs. However we also used username passwords just one idea.