Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Doris Permission Role

Updated on 2024-12-13 GMT+08:00

The Doris permission management system implements row-level fine-grained permission control and role-based permission access control.

NOTE:
  • Only clusters of MRS 3.3.0 and later versions support role assignment on FusionInsight Manager. If the cluster is of MRS 3.3.0 or earlier, you need to connect to the database as user root (the default password is empty) regardless of whether Kerberos authentication is enabled.
  • In MRS 3.5.0 and later versions, if Kerberos authentication is disabled for the cluster (the cluster is in normal mode), you can also create a user on FusionInsight Manager and bind the user to a role to obtain the required permission.

Prerequisite

  • The Doris service is running properly.
  • The role name cannot be operator or admin.
  • When Kerberos authentication is enabled for the cluster (the cluster is in security mode), it takes about 2 minutes for the permission to take effect after the Doris permission is successfully assigned.

Adding the Doris Role

  1. Log in to FusionInsight Manager and choose System > Permission > Role. On the displayed page, click Create Role.
  1. Specify Role Name. In the Configure Resource Permission area, click the cluster name. On the displayed service list page, click the Doris service.

    Determine whether to create a role with the Doris administrator rights based on service requirements.

    NOTE:
    • The Doris administrator has all the rights except the node operation rights.
    • Role Name: The name of the role to be added cannot contain hyphens (-) and cannot start with a digit.
    • If yes, go to 3.
    • If no, go to 4.

  2. Select Doris Admin Privilege and click OK.
  3. Click Doris Read Write Privileges and select Select, Drop, Load, Alter, Create, or Grant for the corresponding resource.

    Determine whether to grant the permission based on the service requirements.

  4. After the authorization is complete, click OK.

Adding a User and Binding the User to the Doris Role

  1. Log in to FusionInsight Managerr and choose System > Permission > User and click Create.

    • Username: Enter the name of the user you want to create.
    • User Type:
      • If Kerberos authentication is enabled for the cluster (the cluster is in security mode), select Human-Machine.
      • If Kerberos authentication is disabled for the cluster (the cluster is in normal mode), select Machine-Machine.
    • Password and Confirm New Password: Enter a password for the human-machine user and enter it again.
    • Role: Click Add. In the displayed dialog box, select a role with the Doris permission and click OK.
    NOTE:
    • Username: The username to be added cannot contain hyphens (-). Otherwise, the authentication fails.
    • Password: The password cannot contain special characters $, ., and #. Otherwise, the authentication will fail.

  2. Click OK.
  3. Use the newly created user to connect to the Doris service.

    • Kerberos authentication is enabled for the cluster (the cluster is in security mode)
      1. Log in to FusionInsight Manager as the new human-machine user and change the initial password.
      2. Log in to the node where the MySQL client is installed and use the new username and new password to connect to the Doris service.

        export LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1

        mysql -udorisuser -P -PConnection port for FE queries -hIP address of the Doris FE instance

        Enter the password for logging in to the database.

        NOTE:
        • To obtain the query connection port of the Doris FE instance, you can log in to FusionInsight Manager, choose Cluster > Services > Doris > Configurations, and query the value of query_port of the Doris service.
        • To obtain the IP address of the Doris FE instance, log in to FusionInsight Manager of the MRS cluster and choose Cluster > Services > Doris > Instances to view the service IP address of any FE instance.
        • You can also use the MySQL connection software or Doris web UI to connect to the database.
    • Kerberos authentication is disabled for the cluster (the cluster is in normal mode)
      1. Log in to the node where the MySQL client is installed and connect to the Doris service as user admin.

        mysql -uadmin-PConnection port for FE queries -hIP address of the Doris FE instance

        NOTE:

        The default password of user admin is empty.

      2. Set a password for the machine-machine user.

        SET PASSWORD FOR 'Machine-Machine Username' = PASSWORD('xxx')

      3. Connect to Doris on the MySQL client using the machine-machine user.

        mysql -uMachine-machine username -p-PConnection port for FE queries -hIP address of the Doris FE instance

        Enter the password of the user.

Adding a Role and Binding It to a User (Kerberos authentication is disabled for the cluster (the cluster is in normal mode))

This operation applies only to versions earlier than MRS 3.5.0.

  1. Log in to the node where the MySQL client is installed and connect to the Doris service as user admin.

    mysql -uadmin -PDatabase connection port -hIP address of Doris FE instance

    NOTE:
    • The default password of user admin is empty.
    • The database connection port is the query connection port of the Doris FE. You can also log in to FusionInsight Manager, choose Cluster > Services > Doris > Configurations, and query the value of query_port of the Doris service.
    • To obtain the IP address of the Doris FE instance, log in to FusionInsight Manager of the MRS cluster and choose Cluster > Services > Doris > Instances to view the IP address of any FE instance.
    • You can also use the MySQL connection software or Doris WebUI to connect to the database.

  2. Run the following command to create a role:

    CREATE ROLE dorisrole;

  3. Run the following command to grant permissions to the role. For details about the permissions, see About Doris User Permissions. For example, to grant the ADMIN_PRIV permission to the role, run the following command:

    GRANT ADMIN_PRIV ON *.*.* TO ROLE 'dorisrole';

  4. Create a user.

    • Create a user and grant the user a role.

      CREATE USER 'dorisuser'@'%' IDENTIFIED BY 'password' DEFAULT ROLE 'dorisrole';

    • Create a user, add a password expiration policy, and grant the user a role.

      For example, run the following commands to create the dorisuser user, set the user password to expire in 180 days, and grant the user the dorisrole:

      CREATE USER 'dorisuser'@'%' IDENTIFIED BY 'password' PASSWORD_EXPIRE INTERVAL 180 DAY;

      GRANT 'dorisrole' TO 'dorisuser'@'%';

      NOTE:
      • If Kerberos authentication is disabled for the cluster (the cluster is in normal mode), the user password never expires by default, which poses security risks. You are advised to set a password expiration policy to request the user to change the password periodically.
      • After the password expires, the user is unavailable. You must change the password as a user with the same level of rights as the Doris user.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback