I'm building a MySQL DB for a web app which will be written in Python. I wanted to segregate the users functions to provide better security and maybe improve performance. I'm thinking to do it in this way: 2 sets of tables:
- 1 Table for app user management
- 1 Set of table for storing the information
I want to create 4 mysql users to access and manipulate the data from the app:
- 1 user with Select rights for the Users Table
- 1 user with Insert/update rights for the Users table
- 1 user with Select rights for the set of tables storing the information
- 1 user with Insert/update rights for the set of tables storing the information
So each of the Python modules reading/writting each of the tables will use the required user.
My reasoning is that if a user or insert field gets compromised by whatever the reason, the damage and information that can be manipulated/obtained will be limited. It shouldn't complicate the app, as it will be only using the right connection to the DB and you only do it once per module.
Would that be overkill? Can it impact the performance? Any other thoughts?