starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[pipe load] The user does not have insert permission, but pipe load can import data into the table

Open huoyue-git opened this issue 2 years ago • 1 comments

Steps to reproduce the behavior (Required)

create user and grant

create database pipe_load_db;
use pipe_load_db
 create table customer
        (
            c_customer_sk             integer               not null,
            c_customer_id             char(16)              not null,
            c_current_cdemo_sk        integer                       ,
            c_current_hdemo_sk        integer                       ,
            c_current_addr_sk         integer                       ,
            c_first_shipto_date_sk    integer                       ,
            c_first_sales_date_sk     integer                       ,
            c_salutation              char(10)                      ,
            c_first_name              char(20)                      ,
            c_last_name               char(30)                      ,
            c_preferred_cust_flag     char(1)                       ,
            c_birth_day               integer                       ,
            c_birth_month             integer                       ,
            c_birth_year              integer                       ,
            c_birth_country           varchar(20)                   ,
            c_login                   char(13)                      ,
            c_email_address           char(50)                      ,
            c_last_review_date        char(10)
        )
        duplicate key (c_customer_sk)
        distributed by hash(c_customer_sk) buckets 5
        properties(
            "replication_num" = "3"
        );
create user user_pipe_load identified by '123456';
GRANT CREATE PIPE ON database pipe_load_db TO USER user_pipe_load;

use new user connect SR

use pipe_load_db ;
show tables ;
 CREATE PIPE pipe_load_01
PROPERTIES
(
"auto_ingest"="true")
AS insert into customer  select * from files("path" = "hdfs://xxx.xx.xxx.xxx:9000/xxx/table_function/orc/customer/*",
"format" = "orc"
);

image

image

image

Expected behavior (Required)

create pipe load failed,user haven‘t insert permission

Real behavior (Required)

create pipe load successfully and imported successfully

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version() mysql> select current_version(); +--------------------+ | current_version() | +--------------------+ | branch-3.2-02293a6 | +--------------------+ 1 row in set (0.00 sec)

huoyue-git avatar Nov 03 '23 07:11 huoyue-git

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

github-actions[bot] avatar May 06 '24 11:05 github-actions[bot]