This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 92ab9be5a54 branch-3.0: [case](auth)grant usage_priv to user when in
vault mode #47316 (#48413)
92ab9be5a54 is described below
commit 92ab9be5a541cb95d72fd99822d1e388150cdedc
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Mar 10 12:04:00 2025 +0800
branch-3.0: [case](auth)grant usage_priv to user when in vault mode #47316
(#48413)
Cherry-picked from #47316
Co-authored-by: zhangdong <[email protected]>
---
regression-test/suites/auth_call/test_ddl_job_auth.groovy | 12 +++++++-----
regression-test/suites/auth_call/test_ddl_mtmv_auth.groovy | 10 ++++++----
.../suites/auth_call/test_ddl_table_auth.groovy | 14 ++++++++------
3 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/regression-test/suites/auth_call/test_ddl_job_auth.groovy
b/regression-test/suites/auth_call/test_ddl_job_auth.groovy
index ef758026377..bbc554cec30 100644
--- a/regression-test/suites/auth_call/test_ddl_job_auth.groovy
+++ b/regression-test/suites/auth_call/test_ddl_job_auth.groovy
@@ -25,6 +25,10 @@ suite("test_ddl_job_auth","p0,auth_call") {
String tableNameDst = 'test_ddl_job_auth_tb_dst'
String jobName = 'test_ddl_job_auth_job'
+ try_sql("DROP USER ${user}")
+ try_sql """drop database if exists ${dbName}"""
+ try_sql("""DROP JOB where jobName='${jobName}';""")
+ sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
@@ -32,11 +36,9 @@ suite("test_ddl_job_auth","p0,auth_call") {
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER `${validCluster}` TO ${user}""";
}
-
- try_sql("DROP USER ${user}")
- try_sql """drop database if exists ${dbName}"""
- try_sql("""DROP JOB where jobName='${jobName}';""")
- sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
+ if (enableStoragevault()) {
+ sql """GRANT usage_priv ON STORAGE VAULT '%' TO ${user}""";
+ }
sql """grant select_priv on regression_test to ${user}"""
sql """create database ${dbName}"""
sql """create table ${dbName}.${tableName} (
diff --git a/regression-test/suites/auth_call/test_ddl_mtmv_auth.groovy
b/regression-test/suites/auth_call/test_ddl_mtmv_auth.groovy
index 160b6b840b0..6e1dd011b93 100644
--- a/regression-test/suites/auth_call/test_ddl_mtmv_auth.groovy
+++ b/regression-test/suites/auth_call/test_ddl_mtmv_auth.groovy
@@ -25,6 +25,9 @@ suite("test_ddl_mtmv_auth","p0,auth_call") {
String mtmvName = 'test_ddl_mtmv_auth_mtmv'
String mtmvNameNew = 'test_ddl_mtmv_auth_mtmv_new'
+ try_sql("DROP USER ${user}")
+ try_sql """drop database if exists ${dbName}"""
+ sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
@@ -32,10 +35,9 @@ suite("test_ddl_mtmv_auth","p0,auth_call") {
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER `${validCluster}` TO ${user}""";
}
-
- try_sql("DROP USER ${user}")
- try_sql """drop database if exists ${dbName}"""
- sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
+ if (enableStoragevault()) {
+ sql """GRANT usage_priv ON STORAGE VAULT '%' TO ${user}""";
+ }
sql """grant select_priv on regression_test to ${user}"""
sql """create database ${dbName}"""
sql """create table ${dbName}.${tableName} (
diff --git a/regression-test/suites/auth_call/test_ddl_table_auth.groovy
b/regression-test/suites/auth_call/test_ddl_table_auth.groovy
index 47ac4e07abc..f285d3f03c5 100644
--- a/regression-test/suites/auth_call/test_ddl_table_auth.groovy
+++ b/regression-test/suites/auth_call/test_ddl_table_auth.groovy
@@ -28,6 +28,11 @@ suite("test_ddl_table_auth","p0,auth_call") {
String cteSelectDstDb = 'test_ddl_table_cte_select_dst_db'
String cteSelectDstTb = 'test_ddl_table_cte_select_dst_tb'
+ try_sql("DROP USER ${user}")
+ try_sql """drop database if exists ${dbName}"""
+ try_sql """drop database if exists ${cteLikeDstDb}"""
+ try_sql """drop database if exists ${cteSelectDstDb}"""
+ sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
@@ -35,12 +40,9 @@ suite("test_ddl_table_auth","p0,auth_call") {
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER `${validCluster}` TO ${user}""";
}
-
- try_sql("DROP USER ${user}")
- try_sql """drop database if exists ${dbName}"""
- try_sql """drop database if exists ${cteLikeDstDb}"""
- try_sql """drop database if exists ${cteSelectDstDb}"""
- sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'"""
+ if (enableStoragevault()) {
+ sql """GRANT usage_priv ON STORAGE VAULT '%' TO ${user}""";
+ }
sql """grant select_priv on regression_test to ${user}"""
sql """create database ${dbName}"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]