Logo
Authority management

Authority management #

Authority for cluster eco-tools #

Authority for SphereEx-Boot #

No authority control for SphereEx-Boot.

Authority for SphereEx-Console #

Role Authority Description

RolePermissionScopeOperationDescription
Super AdministratorAll PermissionsSystem administrators, users, clustersConsole User ManagementUser name: admin, console built-in, login to change the password
System AdministratorAll PermissionsUsers, ClustersConsole User ManagementCreated by super admin
General UserSpecify cluster permissionsClustersConsole User ManagementCreated by super administrator or system administrator

SphereEx-Console permissions to access components

Components / Resources
Description
Hostssh login privileges, the installation directory has
DatabaseTo monitor the db in SphereEx-Console using the monitoring center, you need to install the monitoring plugin on the host where the db is located. The monitoring plugin requires additional user assignment to access the database. Create user reference: create user ‘[mysql_monitor_user_name]’@’[IP of monitoring plugin deployment]’ identified by ‘[password]’ [with max_user_connections N];grant process,replication client,select on . to ‘[mysql_monitor_user_name]’@’[monitor_plugin_deployed_IP]’;flush privileges;
Governance CenterNone
Monitoring CenterNone
Log CenterNone

Function List

FunctionDescription
New UserAdd users to the SphereEx-Console platform
Change passwordModify cluster information
Permission ManagementManaging cluster parameters
DeleteDelete users from the SphereEx-Console platform
  • New User

Applicable scenarios

Create a SphereEx-Console administrative user.

Precautions

You have Super Administrator or System Administrator privileges.

Procedure

  1. Login to SphereEx-Console.
  2. Click Avatar->User Management at the top right corner of the home page to enter the user list.
  3. Click Add User in the upper right corner to enter the Add User page.
  4. Fill in the information, see the following table for the specific parameters.
FieldsData sourceOptional / RequiredData StorageLength LimitDescription
UserUser inputRequiredconsole mysql storage32User list verification uniqueness
PasswordUser inputRequiredconsole mysql storage6-16bitNumbers Letters Underline.
Confirm PasswordUser inputRequiredconsole mysql storageconsistent with password
RolesDropdown selectionRequiredconsole mysql storageSystem Administrator/Normal Administrator
Cluster PermissionsDropdown selectionOptionalconsole mysql storageAppears when [Role] is [General Administrator].
Optional ClusterList of clusters without permissionsOptionalconsole mysql storage
Selected ClusterList of clusters that have permissionOptionalconsole mysql storage
  1. Click OK to finish adding users.
  • Change password

Applicable scenarios

Modify the user password of SphereEx-Console.

Caution

The following is the range of password modification for users with different roles.

RoleModifiable range
Super AdministratorSelf, system administrator, general administrator
System AdministratorSelf, General Administrator
General AdministratorSelf

Operation steps

  1. Login to SphereEx-Console.
  2. Click Avatar->User Management at the top right corner of the home page to enter the user list.
  3. Click the Modify Password button to enter the Modify Password page.
  4. Fill in the information, see the following table for specific parameters.
FieldData sourceOptional/RequiredData StorageLength LimitComponentsDescription
UserAutomatic fillingRequiredconsole mysql Storage32Text BoxNon-editable
New PasswordUser inputRequiredconsole mysql Storage6-16bitText Boxnumbers letters underscores.
Confirm PasswordUser inputRequiredconsole mysql StorageText BoxConsistent with new password
  1. Click OK to finish adding users.
  • Permission Management

Applicable Scenarios

Change the user password of SphereEx-Console

Caution

You can’t modify the cluster privileges for managing normal users, and you need to log in again to refresh the privileges after the user privileges are modified.

Operation steps

  1. Login to SphereEx-Console.
  2. Click the header image at the top-right corner of the home page -> User Management to enter the user list.
  3. Click the Permissions Management button to enter the Permissions Management page.
  4. Fill in the information, see the following table for the specific parameters.
FieldsData sourceOptional / RequiredLength LimitDescription
UserUser inputRequired32User list verification uniqueness
Cluster PermissionsDrop down to selectOptionalAppears when [Role] is [General Administrator].
Optional clustersList of clusters without permissionsOptional
Selected clustersList of clusters that have permissionOptional
  1. Click OK to complete the permission adjustment.
  • Delete

Applicable scenarios

Delete the system administrator or general administrator.

Caution

To delete a user, the following is the range of users with different roles that can be deleted.

RoleRange of users that can be deleted
Super AdministratorSystem Administrator, General Administrator
System AdministratorGeneral Administrator

Operation steps

  1. Login to SphereEx-Console.
  2. Click Avatar->User Management at the top right corner of the home page to enter the user list.
  3. Click the Delete button in the Action column.
  4. Click OK in the prompt box to complete the user deletion.

Permissions for clustered components #

Permissions to access components.

Component NamePermissions of the component itselfPermissions for cluster access to use componentsSphereEx-Console access to componentsMonitoring plugin access components
HostNoneNonessh login privileges, read/write privileges for the installerssh login privileges, read/write privileges for the installer
DatabaseNoneDepending on the user’s access to the underlying dbDepending on the user’s access to the underlying db
Create user reference.:
create user ‘[mysql_monitor_user_name]’@’[Monitoring plug-ins deployed byIP]’ identified by ‘[password]’ [with max_user_connections N];
Governance CenterNoneNoneNoneNone
Monitoring CenterNoneNoneNoneNone
Log CenterNoneNoneNoneNone

Cluster Permissions #

Cluster rights management, i.e., rights management of computing nodes.

RolesFunctionsScopeOperationDescription
Super User (root)Top privilegesClusterDistSQLCan not be deleted, can modify the password. Write to governance center after modification, not write back to local file
- First time to start with local file, explicit text is risky
General user/roleObject-level permissionsLogic DatabaseDistSQLRestrict the permission to add, delete, and change objects in the logical library

Permissions Grading #

DBPlusEngine-Proxy privilege hierarchy is similar to the standard database privileges, with global privileges, library-level object privileges, table-level object privileges, and column-level object privileges.

DBPlusEngine-Proxy permissions consist of operation + operation object, which are combined in the following way.

Authorized Items
SELECTINSERTUPDATEDELETECREATEDROPALTERINDEXCREATE_USERSUPER
Global Permissions✔️✔️✔️✔️✔️✔️✔️✔️✔️✔️
Object permissions/library✔️✔️✔️✔️✔️✔️✔️✔️//
Object permissions/table✔️✔️✔️✔️✔️✔️✔️✔️//
Object permissions/columns✔️✔️✔️///////
Authorized Items
CREATEALTERDROPSHOW
RESOURCE✔️✔️✔️✔️
SHARDING✔️✔️✔️✔️
READWRITE_SPLITTING✔️✔️✔️✔️
ENCRYPT✔️✔️✔️✔️
DB_DISCOVERY✔️✔️✔️✔️
SHADOW✔️✔️✔️✔️
SINGLE_TABLE✔️✔️✔️✔️
  • Global privileges

Global privilege means that the authorization granted to the user does not distinguish the target object, and the user can perform corresponding operations on any logical library or logical table.

For example, the following command gives the global INSERT, SELECT, UPDATE and DELETE privileges to user ‘sharding’@’%’, which enables the user to perform DML operations on any table in any logical library.

-- The following two statements are equivalent
GRANT DIST INSERT,SELECT,UPDATE,DELETE TO 'sharding'@'%';
GRANT DIST INSERT,SELECT,UPDATE,DELETE TO sharding;

For example, the following command gives the global SHOW SHARDING permission to user ‘sharding’@’%’, which enables the user to perform SHOW operations on sharding rules in any logical library.

GRANT DIST SHOW SHARDING TO 'sharding'@'%';

Also, because DistSQL has a large number of authorization items, for granting multiple authorization items at once, you can use syntax types as authorization items. For example, if the following command grants global SHOW privileges for all operation objects to user ‘sharding’@’%’, the user will be able to perform SHOW operations on any operation object in any logical library.

GRANT DIST RQL SHARDING TO 'sharding'@'%';

Note that the global privileges include two special privileges: CREATE_USER and SUPER.

In particular, users who have been granted the CREATE_USER authorization can perform the following actions.

OperationDescription
CREATE USERCreate User
ALTER USERModifyUser
DROP USERDelete User
CREATE ROLECreate Character
DROP ROLEDelete Role
REVOKE ALL PRIVILEGESRevoke all authorizations for a user or role

SUPER represents the highest privilege of the database system. By default, the initial user configured before the start of ShardingSphere has the SUPER authorization.

  • Object privileges

Object privileges are privileges that are restricted in scope and do not allow the user to perform operations outside the scope of the privilege.

The scope of object privileges can be all logical libraries, or it can specify single or multiple logical libraries and the tables and columns in the libraries.

For example, the following command grants all permissions for the t_order table in the logical library sharding_db to the user ‘sharding’@’%’, after which the user can perform operations on the sharding_db.t_order table. However, this user can not operate on other tables in sharding_db without additional authorization.

GRANT DIST ALL ON sharding_db.t_order TO sharding;

For example, the following command grants the user ‘sharding’@’%’ permission to create and modify the sharding rule t_order in the logical library sharding_db, after which the user can perform create and modify operations on the sharding_db.t_order rule. However, this user can not manipulate other rules in sharding_db without additional authorization.

GRANT DIST CREATE SHARDING, ALTER SHARDING ON sharding_db.t_order TO 'sharding'@'%';

DistSQL 清单 #

Refer DistSQL User Management