XPanel Management System Software Manual (1) User Rights Management

Time:2022-11-25

1. System overview

[TOC]

1.1 Purpose

The XPanel management system is mainly used to manage the Kunlun Databases Cluster, monitor the current QPS of the cluster nodes and the CPU of the computer and other information.

1.2 Function overview

The DBA management system mainly includes six modules: login, homepage, system management, cluster management, computer management, and operation records.

1.3 Operating environment

The system runs in the background of apache+PHP Version 7.4.3 environment, and the front end is written in vue

1.4 Ways to obtain the code

  1. Get the code from github, git clonehttps://github.com/zettadb/Ku…
  2. The monitor file is placed in an environment with web services, then modify the database.php file under config, and change the corresponding ip and port to your own ip and port;
  3. When nodejs has been installed on this machine (if not installed, please install it yourself), open the KunlunXPanel file with cmd or your own editor, find the development environment file .env.development in the same level directory as src, and change the ip and port of VUE_APP_BASE_API to For your own ip and port, if you want to generate the environment, go to .env.production to change the ip and port; execute npm install, and then run npm run dev.

2. Function introduction

2.1 Login interface

The user needs to enter the default account name and password on the interface for the first login. The default account password is super_dba. After the first login, after the password is successfully changed, the user can enter the DBA management system platform. As shown in Figure 1 and Figure 2.
Note) Login security rules:

  1. When users use xpanel, they must log in before doing any other operations;
  2. For the first login, the default user password is super_dba;
  3. After super_dba logs in, the password must be changed before other operations can be performed, as shown in Figure 2;
  4. For security reasons, any user must change the default password after logging in for the first time before doing other operations. If you are not the super_dba user, modify the password as shown in Figure 2-1, 2;
  5. Except for the default password, the password rules are: a combination of uppercase and lowercase letters + numbers + special characters, and the length must be 8-12 characters.

XPanel Management System Software Manual (1) User Rights Management
figure 1

XPanel Management System Software Manual (1) User Rights Management
figure 2

XPanel Management System Software Manual (1) User Rights Management
Figure 2-1

2.2 Home page

The home page is an interface for statistical information, which mainly collects statistical data and status information of clusters and devices
As shown in Figure 3.

XPanel Management System Software Manual (1) User Rights Management
image 3

2.3 System Management

System management includes three modules: user management, role management and authorization management.

2.3.1 User Management

User management is divided into adding users, editing users and deleting users. It is used to manage and collect user information, so that after the user is authorized, he can directly use the account to log in to operate the management system.

2.3.1.1 Add a new user

Enter the user management interface, click the Add button, enter the account password, mobile phone and other information, and click OK. As shown in Figure 4. A prompt message will appear after success, as shown in Figure 5.

XPanel Management System Software Manual (1) User Rights Management
Figure 4

XPanel Management System Software Manual (1) User Rights Management
Figure 5

2.3.1.2 Edit User

Click the edit button of the corresponding row to edit or correct the data in the row. Before clicking confirm, the user will verify whether the system user account and mobile phone number are duplicated. If they are duplicated, the editing operation is not allowed. As shown in Figure 6 and Figure 7.

XPanel Management System Software Manual (1) User Rights Management
Image 6

XPanel Management System Software Manual (1) User Rights Management
Figure 7

2.3.1.3 Delete user

Find a user you want to delete, and click the delete button in the corresponding row to delete the user. After deletion, the user’s information and authorization information will disappear permanently. Since the information cannot be recovered, please confirm that it is correct before proceeding. If there are too many user data, you can use the search button to search through the user’s account. As shown in Figure 8, Figure 9, and Figure 10.
Note): Since super_dba is the highest default administrator authority of the system, the user information can only be edited, and deletion is not allowed.

XPanel Management System Software Manual (1) User Rights Management
Figure 8

XPanel Management System Software Manual (1) User Rights Management
Figure 9

XPanel Management System Software Manual (1) User Rights Management
Figure 10

2.3.2 Role Management

Role management includes adding roles, editing roles, and deleting roles. In the design, roles are a collection of permissions. The highest level of roles is super_dba, which has the highest role including system management. Other new roles only have permissions and are only allowed in the cluster. and computer range.

2.3.2.1 Adding new roles

Enter the role management interface, click the Add button, enter the role information and check the permission, and click OK. As shown in Figure 11. A prompt message will appear after success, as shown in Figure 12.

XPanel Management System Software Manual (1) User Rights Management
Figure 11

XPanel Management System Software Manual (1) User Rights Management
Figure 12

2.3.2.2 Edit Role

If the previously added role needs to be changed, you can find the corresponding role in the role management and edit it. Role editing is a modification operation performed when an administrator makes a mistake or a role needs to change permissions. You can view the updated role information in Details or Edit. As shown in Figure 13, Figure 14, and Figure 15.

XPanel Management System Software Manual (1) User Rights Management
Figure 13

XPanel Management System Software Manual (1) User Rights Management
Figure 14

XPanel Management System Software Manual (1) User Rights Management
Figure 15

2.3.2.3 Delete role

If you need to delete a certain role due to business needs, you can find the corresponding role and click the delete button to delete it. As shown in Figure 16 and Figure 17.
Note): Since the deletion takes effect immediately and the information cannot be retrieved, please proceed with caution.

XPanel Management System Software Manual (1) User Rights Management
Figure 16

XPanel Management System Software Manual (1) User Rights Management
Figure 17

2.3.3 Authorization Management

Authorization management is mainly responsible for granting certain permissions to users. There is a many-to-many relationship between users and permissions, that is, one user can be assigned multiple roles, and one role can be assigned to multiple users. When a user has multiple permissions, the permissions obtained when logging in are combined and granted to the user for login authorization, achieving the highest level of treatment for user permissions.

2.3.3.1 Add authorization

When adding authorization, click the Add button, select the user account, role name, validity period type, whether to apply to all clusters, and click OK after filling in the information. For example, I granted the super_dba role to test002, which is valid until 0:00 on March 24, 2022, and applied to all clusters, as shown in Figure 18; after successful authorization, it is shown in Figure 19.

XPanel Management System Software Manual (1) User Rights Management
Figure 18

XPanel Management System Software Manual (1) User Rights Management
Figure 19

  1. User accounts come from the collection of all users in user management; role names come from the collection of all roles in role management; as shown in Figure 20 and Figure 21;

XPanel Management System Software Manual (1) User Rights Management
Figure 20

XPanel Management System Software Manual (1) User Rights Management
Figure 21

  1. There are two types of validity period, permanent and time period. When the validity period type is selected as time period, the start and end time selection will appear. At this time, at least one of the two times cannot be empty; as shown in Figure 22 and Figure 23;

XPanel Management System Software Manual (1) User Rights Management
Figure 22

XPanel Management System Software Manual (1) User Rights Management
Figure 23

  1. Whether to apply to all clusters is selected to mean that all clusters can be operated on the relevant authority. When selecting No, check the corresponding cluster to operate the checked cluster; as shown in Figure 24.
    Note): The same user and the same role can only be assigned once, as shown in Figure 25.

XPanel Management System Software Manual (1) User Rights Management
Figure 24

XPanel Management System Software Manual (1) User Rights Management
Figure 25

2.3.3.2 Authorization to edit

Editing the authorization is to update the authorization information. For example, I need to put the newly authorized test002
When the validity period type of the information is changed from time period to permanent, the specific operation is shown in Figure 26 and Figure 27.
Note): In order to avoid multiple authorizations for the same user and the same role, when editing the authorization, the user account and role name cannot be edited. If the two correspondences are incorrectly filled in when adding, please delete and add again.

XPanel Management System Software Manual (1) User Rights Management
Figure 26

XPanel Management System Software Manual (1) User Rights Management
Figure 27

2.3.3.3 Delete Authorization

Delete the authorization information as needed. Click the delete button on the right side of the corresponding data to delete the information. As shown in Figure 28 and Figure 29.
Note): Authorization information cannot be retrieved after deletion, please operate with caution.

XPanel Management System Software Manual (1) User Rights Management
Figure 28

XPanel Management System Software Manual (1) User Rights Management
Figure 29

END

Kunlun Database is a HTAP NewSQL distributed database management system that can meet users’ all-round needs for storage, management and utilization of massive relational data.

The experience of application developers and DBAs using Kunlun Database is almost the same as that of stand-alone MySQL and stand-alone PostgreSQL, because first of all, Kunlun Database supports the dual protocol of PostgreSQL and MySQL, supports the DML syntax and functions of standard SQL:2011, and the support of PostgreSQL and MySQL for standard SQL. expand. At the same time, the Kunlun database cluster supports horizontal elastic expansion, automatic data splitting, distributed transaction processing and distributed query processing, robust fault tolerance and disaster recovery capabilities, perfect and intuitive monitoring and analysis alarm capabilities, cluster data backup and recovery, and other commonly used DBA data management and operations. All these functions do not require any coding work on the application system side, nor does it require DBA manual intervention, and the non-stop service will not affect the normal operation of the business.

Kunlun Database has comprehensive OLAP data analysis capabilities, has passed the TPC-H and TPC-DS standard test sets, and can analyze the latest business data in real time to help users discover the value of data. Kunlun Database supports the deployment of public cloud and private cloud environments, can seamlessly cooperate with cloud infrastructure such as docker and k8s, and can easily build cloud database services.

Please visithttp://www.zettadb.com/Get more information and download Kunlun database software, documents and materials.

The KunlunBase project has been open sourced

【GitHub:】
https://github.com/zettadb

【Gitee:】
https://gitee.com/zettadb