我正在尝试在使用 MySQL 开发的 webapp 上模拟行级安全性。
使用此方法:使用所需的表创建一个数据库,其中将存储与所有用户有关的数据,并对表的列进行适当的索引。
根据用户 ID 为特定用户创建 mysql“视图”。
为了实现行级安全性,我还必须为每个用户创建 mysql 帐户并设置视图的“授予”权限。
对于 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.