Hello <@U0A71G31CDV>, can I grant the right to cre...
# questions-and-troubleshooting
g
Hello @Rocky, can I grant the right to create/drop/alter pipes to a specific user to a specific database ?
r
Yes, you can grant the rights to create, drop, and alter pipes to a specific user for a specific database. Pipes were introduced in StarRocks v3.2, and their privileges are managed within the StarRocks RBAC (Role-Based Access Control) system. 1. Granting the right to Create Pipes The
CREATE PIPE
privilege is granted at the Database level. This allows a user to create new pipe objects within that specific database.
Copy code
sql
GRANT CREATE PIPE ON DATABASE <database_name> TO USER <user_identity>;
2. Granting the right to Drop or Alter Pipes To manage existing pipes (Drop, Alter, Suspend, Resume), you grant privileges on the Pipe objects themselves. You can grant these for a specific pipe or for all pipes within a database. * For all pipes in a database:
Copy code
sql
    GRANT ALTER, DROP ON ALL PIPES IN DATABASE <database_name> TO USER <user_identity>;
* For a specific pipe:
Copy code
sql
    GRANT ALTER, DROP ON PIPE <database_name>.<pipe_name> TO USER <user_identity>;
Summary of Pipe Privileges Object Type | Privilege | Description DATABASE |
CREATE PIPE
| Allows creating a new pipe in the database. PIPE |
ALTER
| Allows modifying a pipe (ALTER PIPE) or its state (SUSPEND/RESUME). PIPE |
DROP
| Allows deleting a pipe. PIPE |
USAGE
| Allows viewing pipe info or status. Note: To actually load data using a pipe, the user will also need
INSERT
privileges on the destination table and appropriate access to the external storage (like S3 or HDFS). Referencessql-reference/sql-statements/loading_unloading/pipe/CREATE_PIPE.mdsql-reference/sql-statements/account-management/GRANT.mdsql-reference/information_schema/pipes.mdsql-reference/sql-statements/loading_unloading/pipe/DROP_PIPE.md
1