我想模拟我使用MySQL开发的webapp上的行级安全性。Webapp:Mysql:行级安全性。 PRO /利弊?更好的方法来做到这一点?
使用此方法:使用所需的表创建数据库,其中与所有用户有关的数据将通过适当索引表中的列进行存储。
根据用户标识为特定用户创建mysql'视图'。
为了实现行级别的安全性,我还必须为每个用户创建一个mysql帐户,并为这些视图设置“grant”权限。
对于Web界面,将使用基于PHP的MVC框架。
但是,根据我的研究:
1] Having separate mysql account per user "make the webapp less secure".
2] Having separate mysql account per user "increases the disk I/O".
问题:
1] How does creating mysql user per webapp user make the webapp less secure?
2] Does the disk I/O increase considerably?
3] Is there a better way to implement row-level-security in MySQL?
4] What are the pros/cons of implementing row-level-security by the above method?
为什么我在查看行级安全?
I need row level security because there are rows which will be shared between multiple users & have 1 or 2 owners to it. Only these owners can delete/modify them.
而不是嘲笑我,你能建议我能做什么/读吗? – ThinkingMonkey
这不是在嘲笑你,但我很抱歉,如果它看起来像那样。我只是想知道为什么你甚至试图这样做。为什么你甚至需要“行级安全性”,这样做的理由是什么,以及通过这样做有什么预防?至于磁盘I/O,创建用户,视图等并不会影响磁盘I/O,因此您不必担心这一点(除非每天都有成千上万的新用户,这会累加到磁盘I上/ O处理视图时)。 –
我需要'行级安全性',因为有多行将被多个用户共享,并有1或2个所有者。只有这些所有者才能删除/修改它们。 ***如果你知道我可以在哪里了解更好的方法,那么建议他们。*** – ThinkingMonkey