如何实现移动应用的高安全性?
自从开始了解移动计算以来,我经常错过有关安全性的讨论。然而,在我看来,这是移动计算的一个主要话题。开发安全的移动应用程序有几个方面:
- 如何在设备和服务器之间创建保存通信?
- 如何识别设备以及如何在移动设备上验证用户?
- 如何处理设备被盗的可能性以及随后滥用设备上存储的数据和授予设备的访问权限?
可能还有更多,但我认为这些是关键问题。到目前为止我已经想出了这个解决方案:
- SSL。
- 使用OAuth授予对设备的访问权限,然后存储AES加密的访问令牌。在允许用户访问应用程序之前,通过请求解密密钥(很可能是 PIN,因为这些在移动设备上更容易输入)来检查用户的身份。
- 如果数据存储不可避免,请使用AES 加密。使用 2 中提到的密钥,或者将解密密钥存储在服务器上,并让应用程序每次都从那里请求它。如果被盗,请撤销 OAuth 密钥。 (这也将防止窃贼从服务器检索解密密钥。)
您是否发现这种方法有任何缺陷或认为该策略有任何可以改进的地方?我试图在可用性和安全性之间找到平衡,因为它们似乎是对立的概念。
注意:这是一个一般概念,不是专门为某个操作系统设计的。
Since starting to learn about mobile computing I frequently missed discussions about security. However, it seems to me that this is a major topic for mobile computing. There are certain aspects to developing a secure mobile application:
- How to create save communication between device and server?
- How to identify a device and how to authenticate a user on a mobile device?
- How to handle the possibility of device theft and ensuing misuse of data stored on the device and access granted to the device?
There are probably more, but those are the key questions, I think. So far I have come up with this solution:
- SSL.
- Use OAuth to grant access to the device, then store the access token AES-encrypted. Check the user's identity before allowing him access to the app by requesting the decryption key (most likely a PIN as those are more easy to enter on a mobile device).
- If storage of data is unavoidable, use AES encryption. Either use the key mentioned in 2. or alternatively store the decryption key on the server and have the app request it from there every time. In case of theft revoke the OAuth key. (This will also prevent the thief to retrieve the decryption key from the server.)
Do you see any flaws in this approach or see any points where the strategy could be improved? I tried to find a balance between usability and security, as it seems they are opposing concepts.
Note: This is meant as a general concept, not specifically designed for one operating system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是开放式的并且非常笼统,所以 SO 可能不是最好的地方。您真的认为可以用 3 个要点来概括这一点吗?如果不指定具体的指导方针、参数和实践,您甚至无法尝试承诺安全性。
所以,是的,有很多潜在缺陷,答案很简单:事情没那么简单。
This is open-ended and very general, so SO might not be the best place. Do you really think you can summarize this in 3 bullet points? You cannot even try to promise security without specifying concrete guidelines, parameters and practices.
So, yes, lots of potential flaws, and the answer is simple: it's not that simple.