mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge remote-tracking branch 'origin/named-collections-fix-access' into named-collections-fix-access
This commit is contained in:
commit
84ea48b555
@ -14,6 +14,7 @@ instance = cluster.add_instance(
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def start_cluster():
|
||||
try:
|
||||
|
@ -377,7 +377,7 @@ def test_introspection():
|
||||
instance.query("GRANT SELECT ON test.table TO A")
|
||||
instance.query("GRANT CREATE ON *.* TO B WITH GRANT OPTION")
|
||||
|
||||
all_access_except_show_named_collections="SHOW, SELECT, INSERT, ALTER, CREATE, DROP, TRUNCATE, OPTIMIZE, BACKUP, KILL QUERY, KILL TRANSACTION, MOVE PARTITION BETWEEN SHARDS, CREATE USER, ALTER USER, DROP USER, CREATE ROLE, ALTER ROLE, DROP ROLE, ROLE ADMIN, CREATE ROW POLICY, ALTER ROW POLICY, DROP ROW POLICY, CREATE QUOTA, ALTER QUOTA, DROP QUOTA, CREATE SETTINGS PROFILE, ALTER SETTINGS PROFILE, DROP SETTINGS PROFILE, SHOW ACCESS, SYSTEM, dictGet, INTROSPECTION, SOURCES, CLUSTER"
|
||||
all_access_except_show_named_collections = "SHOW, SELECT, INSERT, ALTER, CREATE, DROP, TRUNCATE, OPTIMIZE, BACKUP, KILL QUERY, KILL TRANSACTION, MOVE PARTITION BETWEEN SHARDS, CREATE USER, ALTER USER, DROP USER, CREATE ROLE, ALTER ROLE, DROP ROLE, ROLE ADMIN, CREATE ROW POLICY, ALTER ROW POLICY, DROP ROW POLICY, CREATE QUOTA, ALTER QUOTA, DROP QUOTA, CREATE SETTINGS PROFILE, ALTER SETTINGS PROFILE, DROP SETTINGS PROFILE, SHOW ACCESS, SYSTEM, dictGet, INTROSPECTION, SOURCES, CLUSTER"
|
||||
|
||||
assert instance.query("SHOW USERS") == TSV(["A", "B", "default"])
|
||||
assert instance.query("SHOW CREATE USERS A") == TSV(["CREATE USER A"])
|
||||
|
@ -8,17 +8,26 @@ cluster = ClickHouseCluster(__file__)
|
||||
node1 = cluster.add_instance(
|
||||
"node1",
|
||||
main_configs=["configs/config.d/remote_servers.xml"],
|
||||
user_configs=["configs/users.d/allow_introspection_functions.xml", "configs/users.d/users.xml"],
|
||||
user_configs=[
|
||||
"configs/users.d/allow_introspection_functions.xml",
|
||||
"configs/users.d/users.xml",
|
||||
],
|
||||
)
|
||||
node2 = cluster.add_instance(
|
||||
"node2",
|
||||
main_configs=["configs/config.d/remote_servers.xml"],
|
||||
user_configs=["configs/users.d/allow_introspection_functions.xml", "configs/users.d/users.xml"],
|
||||
user_configs=[
|
||||
"configs/users.d/allow_introspection_functions.xml",
|
||||
"configs/users.d/users.xml",
|
||||
],
|
||||
)
|
||||
distributed = cluster.add_instance(
|
||||
"distributed",
|
||||
main_configs=["configs/config.d/remote_servers.xml"],
|
||||
user_configs=["configs/users.d/allow_introspection_functions.xml", "configs/users.d/users.xml"],
|
||||
user_configs=[
|
||||
"configs/users.d/allow_introspection_functions.xml",
|
||||
"configs/users.d/users.xml",
|
||||
],
|
||||
stay_alive=True,
|
||||
)
|
||||
|
||||
|
@ -89,7 +89,7 @@ SHOW ROW POLICIES ['SHOW POLICIES','SHOW CREATE ROW POLICY','SHOW CREATE POLICY'
|
||||
SHOW QUOTAS ['SHOW CREATE QUOTA'] GLOBAL SHOW ACCESS
|
||||
SHOW SETTINGS PROFILES ['SHOW PROFILES','SHOW CREATE SETTINGS PROFILE','SHOW CREATE PROFILE'] GLOBAL SHOW ACCESS
|
||||
SHOW ACCESS [] \N ACCESS MANAGEMENT
|
||||
SHOW NAMED COLLECTIONS ['SHOW NAMED COLLECTIONS'] \N ACCESS MANAGEMENT
|
||||
SHOW NAMED COLLECTIONS ['SHOW NAMED COLLECTIONS'] GLOBAL ACCESS MANAGEMENT
|
||||
ACCESS MANAGEMENT [] \N ALL
|
||||
SYSTEM SHUTDOWN ['SYSTEM KILL','SHUTDOWN'] GLOBAL SYSTEM
|
||||
SYSTEM DROP DNS CACHE ['SYSTEM DROP DNS','DROP DNS CACHE','DROP DNS'] GLOBAL SYSTEM DROP CACHE
|
||||
|
Loading…
Reference in New Issue
Block a user