如何验证Web服务invokation的由来 [英] How to validate the origin of a web service invokation

查看:150
本文介绍了如何验证Web服务invokation的由来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设你有一个移动应用程序(Windows手机或Android),使用SOAP连接哟后端。

Suppose you have a mobile application (Windows Phone or Android) that connects yo your back-end using SOAP.

有关使它容易,让我们说,我们必须用C#实现的Web服务。该服务器公开以下方法:

For making it easy, let's say that we have a Web Service implemented in C#. The server exposes the following method:

[WebMethod]
public string SayHallo() { return "Hallo Client"; }

从服务器的角度来看,你不能告诉你来电者是你的移动应用程序或开发人员要调试您的Web服务或黑客试图扭​​转工程师/开发后端。

From the server perspective, you can't tell if the caller is your mobile application or a developer trying to debug your web service or a hacker trying to reverse engineer/exploit your back-end.

如何才能识别的Web服务调用的来源是应用程序?任何人使用WSDL可以调用WS。

How can one identify that the origin of the web service call is THE application? as anyone with the WSDL can invoke the WS.

我知道我可以执行一些标准的安全措施,以Web服务这样的:

I know I can implement some standard security measures to the web service like:

  • 实施HTTPS的服务器上,这样的消息出行加密和窃听的危险性降低。
  • 登入在客户端使用摘要/散列算法的要求,验证服务器的签名,并拒绝未正确签名的消息。
  • 在编写自定义标题中的HTTP请求。反正头可以模​​拟。

然而,任何经验丰富的黑客或谁知道签名算法开发人员,仍然可以产生很好签,好了,格式化的消息。还是一个非常好的黑客可以拆卸的应用程序,并可以访问隐藏的诀窍我的最高机密的通信协议。

However, any well experienced hacker or a developer who knows the signing algorithm, could still generate a well signed, well, formatted message. Or a really good hacker could disassemble the application and get access to the hidden know-how of my "top secret" communications protocol.

任何想法如何使SayHallo()方法只回答来请求我的移动应用程序所做的?

Any ideas how to make the SayHallo() method to answer ONLY to request made from my mobile application?

我们正在运行中的移动应用的上下文中,与硬件访问,有可能是一些可以做利用硬件能力

We are running in the context of a mobile application, with hardware access, there could be something that can be done exploiting the hardware capabilities.

如果有人想知道,我想就如何使一个移动应用程序足够安全敏感的应用,如银行业务,例如。

If someone wonders, I'm thinking on how to make a mobile app secure enough for sensitive applications like banking, for example.

感谢您的想法。

推荐答案

如果您想验证用户是这两个的移动 他们说,他们谁的是那么最好的方法是利用网络。发送推送通知与您希望用户通过使用哈希键:

If you want to verify that a user is both mobile and who they say they are then the best way is to leverage the network. Send a push notification with the hashed key that you want the user to use via:

  • APN iOS版

  • APN for iOS

类似城市飞艇为Windows Phone

something like urban airship for windows phone

GCM 为Android。

这篇关于如何验证Web服务invokation的由来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆