Add the "access_management" option to users.xml which enables a user to manage access rights.

The option is turned off by default.
This commit is contained in:
Vitaly Baranov 2020-04-06 11:06:17 +03:00
parent 423fa5087a
commit b71ff6160a
16 changed files with 59 additions and 23 deletions

View File

@ -83,6 +83,9 @@
<!-- Quota for user. -->
<quota>default</quota>
<!-- User can create other users and grant rights to them. -->
<!-- <access_management>1</access_management> -->
</default>
</users>

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -2,7 +2,7 @@ import pytest
from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__)
instance = cluster.add_instance('instance')
instance = cluster.add_instance('instance', config_dir="configs")
@pytest.fixture(scope="module", autouse=True)

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<yandex>
<profiles>
<default>
</default>
</profiles>
<users>
<default>
<password></password>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>default</profile>
</default>
</users>
</yandex>

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -12,7 +12,6 @@
</networks>
<profile>default</profile>
<quota>myQuota</quota>
<allow_quota_management>true</allow_quota_management>
</default>
</users>
</yandex>

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -13,7 +13,6 @@
</networks>
<profile>default</profile>
<quota>default</quota>
<allow_row_policy_management>true</allow_row_policy_management>
</default>
<another>
<password/>

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -8,9 +8,9 @@ from helpers.test_tools import assert_eq_with_retry
cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance('node1')
node2 = cluster.add_instance('node2')
distributed = cluster.add_instance('distributed', main_configs=['configs/remote_servers.xml'])
node1 = cluster.add_instance('node1', config_dir="configs")
node2 = cluster.add_instance('node2', config_dir="configs")
distributed = cluster.add_instance('distributed', config_dir="configs")
@pytest.fixture(scope="module")

View File

@ -0,0 +1,7 @@
<yandex>
<users>
<default>
<access_management>1</access_management>
</default>
</users>
</yandex>

View File

@ -2,7 +2,7 @@ import pytest
from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__)
instance = cluster.add_instance('instance')
instance = cluster.add_instance('instance', config_dir="configs")
@pytest.fixture(scope="module", autouse=True)

View File

@ -193,6 +193,8 @@ ServerThread.DEFAULT_USERS_CONFIG = \
<profile>default</profile>
<quota>default</quota>
<access_management>1</access_management>
</default>
<readonly>