Basic components of RBAC
In the RBAC model, there are three basic components: users, roles, and permissions.
RBAC controls user permissions by defining role permissions and granting a role to a user. RBAC logically separates users from rights and greatly facilitates permission management
User: Each User is identified by a unique UID and is granted a different role
Role: Different roles have different rights
Permission: Access Permission
User-role mapping: Mapping between users and roles
Role-permission mapping: mapping between roles and permissions
This section describes the RBAC permission assignment process
Create permission point –> Permission function implementation –> Wait for assignment
Create roles –> Bind permissions (assign permissions based on roles)
Create a user –> Add roles to the user if necessary
After you add a role to a user, you have permissions bound to the role
Example: namely, according to the figure above: create a user named Zhang SAN –> grant the group leader of the department –> have the rights of the group leader (view staff management, add attendance information, etc.)