在第 3 方托管的 MySQL 服务器中存储加密机密数据的最佳实践是什么?
我正在为自己开发(作为 PHP 5.2 + MySQL 应用程序)一个个人信息管理器 Web 应用程序,该应用程序将托管在共享主机(如 bluehost 或 dreamhost)上,并存储大量非常机密的个人数据,包括密码等数据、个人私钥、财务详细信息、联系人信息等。如何最好地保护这些数据?
我发现以下弱点:
- 黑客或托管管理员对主机的物理访问。
- 嗅探主机和客户端之间的解密数据。
- 在实际发送之前嗅探主机上的解密数据。
显而易见的解决方案:
- 在客户端(在 JavaScript 或 Java 小程序中)加密和解密,服务器仅使用已加密的数据进行操作。
- 使用 HTTPS。
- 参见§1。
是否有更好的想法和已知的良好实现,包括。有什么框架吗?
我对以下语言感兴趣:PHP(5.3 或 5.2)、Ruby、C#4、JavsScript (Firefox 3.7)、Java (1.6)。
I am developing (as A PHP 5.2 + MySQL application) a personal information manager web application for my own which is meant to be hosted on a shared hosting (like bluehost or dreamhost) and to store lots of very confidential personal data including those like passwords, personal private keys, financial details, contacts, etc. How do I best protect this data?
I see the folowing weak points:
- Physical access to host by hackers or hosting administrators.
- Sniffing the decrypted data between the host and the client.
- Sniffing the decrypted data on the host before it is actually sent.
And obvious solutions:
- Encrypt and decrypt on client side (in a JavaScript or Java applet), a server operates with already encrypted data only.
- Use HTTPS.
- See §1.
Are there any better ideas and known good implementations, incl. any frameworks out there?
I am interested in the following languages: PHP (5.3 or 5.2), Ruby, C#4, JavsScript (Firefox 3.7), Java (1.6).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据我所知,您在这里没有太多选择:
使用操作系统本机解决方案(如果有)。
GNU/linux 有一些东西。
使用第三方解决方案。那个我
最了解的是Gazzang
但您不应将您的设置限制为仅使用其中一种解决方案。安全性不仅仅是加密数据文件。您还应该注意谁可以访问您的数据库服务器等。
To my knoledge, you do not have many option here:
use the OS native solution (if any).
GNU/linux has something.
use third-party solution. The one I
know best is Gazzang
But you should not restrict your setup to just one of these solution. Security is more than just encrypting data files. You should also take care who can access your database server, etc.
我认为你永远不能信任共享主机。他们可以自由地访问和查看它,但这不太可能/应该这样做,但是您肯定面临着共享数据的风险已经。
不过,在编码部分,您应该注意安全问题,例如sql注入和使用某种加密算法存储密码。
What I think is that you can never trust on shared hosting. They have access to it and view it at their free will but this is not most likely/should be done, however you are definitely on a risk of sharing your data already.
On the coding part though, you should take care of security issues such as sql injection and storing password using some encryption algorithm.
如果您不信任托管服务商,则必须在本地计算机上使用强密码对敏感数据进行加密,并仅将密码存储在托管服务商的数据库中。
其他一切都可能会将您的敏感数据暴露给托管服务商。
If you don't trust your hoster, you have to encrypt your sensitive data with a strong cipher at your local machine and store only the cryptogram in the database of the hoster.
Everything else could expose your sensitive data to the hoster.