Simple Permission Model Practice
Simple permissions model
Objective: Customize Role objects based on specific functions. These tailored Roles come with predefined permission sets. The user list for each customized Role can be modified using the GRANT
and REVOKE
commands, simplifying the complex permission management process.
Note: Implement the simple permission model immediately after creating the database. If users or other data already exist, ensure the permissions associated with those objects are properly managed.
Customized Role List
Customized Role | Description | Comment |
---|---|---|
database_admin | Manage all objects in the database, add and delete users | |
database_devops | Manage all objects in the database, including creating and deleting Schema, Table, etc. | |
database_writer | Write access to tables and views in the current database | |
database_reader | Read access to tables and views in the current database |
Creating Roles
Check Role Inheritance
Initialize Permissions for User
Execute the following operations for each existing user: (Please replace the user in the command with the intended target user)
Adding and Deleting Users
Once you've added a new user, setting up their permissions is necessary.
User Authorization
To manage user role permissions effectively, start by assigning the role of database_admin.