为了安全起见分割mysql数据库
我使用sql(主要是mysql)多年,但没有达到专业标准,所以我正在寻找正确的方向。
我目前正在设计一个网络应用程序,它将在一组表中收集用户的姓名/地址/电子邮件等,以及在另一组表中收集其他个人信息。这些最自然地驻留在一个数据库中,但我一直在考虑将用户联系信息拆分到单独服务器上的一个数据库中,并将所有其他信息拆分到另一个数据库/服务器中,理论上黑客必须破坏这两个系统得到任何非常有用的东西。
我断断续续地搜索了几个星期,但到目前为止还没有发现这种类型的设计被讨论得太多。一般都是这样做的吗?是不是太过分了?是否有一种设计方法可以实现它,或者我必须自己完成这一切?
我确实发现分割数据库是一种合法的安全措施吗?,我猜是说这种方法可能有点矫枉过正。
I have used sql (mostly mysql) for years but not to a professional standard, so I'm looking for a shove in the right direction.
I am currently designing a web app that will collect user's names/addresses/emails etc in one set of tables, as well as other personal information in another set of tables. These would most naturally reside in one database, but I've been considering splitting the user contact information in one database on a separate server and all the other information into another database/server, the theory being that a hacker would have to break both systems to get anything very useful.
I've done searches off and on for a few weeks and haven't found this type of design discussed much so far. Is this generally done? Is it overkill? Is there a design method to approach it, or will I have to roll it all on my own?
I did find Is splitting databases a legitimate security measure? which I guess is saying that this approach is likely overkill.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我倾向于认为这太过分了。
请检查我对此问题的回答:在2个数据库之间共享用户
I tend to think this is overkill.
Please check my answer on this question: Sharing users between 2 databases
恕我直言,这似乎是错误的。通过将数据拆分到 2 个 DB,您只会增加复杂性,而不会带来合理的安全收益。
我认为这就是可以使用数据加密的地方。根据用户凭据生成加密密钥,并根据用户请求加密/解密敏感数据。由于私有数据必须仅向该用户显示,因此一切都应该没问题。
IMHO that seems to be wrong. By splitting data across 2 DB you will only increase complexity without reasonable security profits.
I think this is where data encryption can be used. Generate encryption key based on user credentials and encrypt/decrypt sensible data by user requests. Since private data must be shown only to that user, everything should be ok.
这是我之前使用的方法:
Server1:DB
Server2:SC
DB位于公众可以访问的网络域中,但无法访问SC
SC 位于公众无法访问的网络域中,但可以访问 SC
DB 是您存储所有相关信息的地方,包括“真正重要的内容”。
SC 以指定的时间间隔(我使用了 5 秒)检查数据库中它可能想要监视的任何表中的任何新记录(有作业或计划任务)并加密重要信息。
虽然我使用的是 SQL Server 2005 并且能够在两个域中工作(私有(内部)和公共(用于客户端访问),并且我刚刚分享的是精简版(删除了尽可能多的 MSSQL 专有部分)、简化版版本,经过一些努力,我认为可以在 mysql 中重新创建类似的东西,特别是如果您可以将两个数据库托管在单独的物理计算机上,
虽然许多人也会认为这是矫枉过正,但这个想法已经实现了,它的成本更高。 ,并且需要更多在数据报告时间工作,但客户很满意。
Here's an approach I used before:
Server1: DB
Server2: SC
DB is in a network domain that is accessible by the public, but cannot access SC
SC is in a network domain that is not accessible by the public, but can access SC
DB is where you stored all pertinent information, including the 'really important stuff'.
At a specified interval (I used 5 seconds) SC checks DB for any new records in any table it may want to monitor (there is a job or scheduled task) and encrypts the important information.
Although I was utilizing SQL Server 2005 and was able to work in two domains (a private(intern al) and public(for client access) and that what I just shared was a stripped down (removed as much MSSQL-exclusive parts), simplified version, with some effort I think it would be possible to recreate something similar in mysql, especially if you can host your two databases in separate, physical machines.
While many will also think this is overkill, this idea had been implemented. It costs more, and requires more work when it's data reporting time but the clients were pleased.