mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Replace yandex to clickhouse in configs
This commit is contained in:
parent
85cdd2cf75
commit
cba6e39fe5
@ -316,7 +316,7 @@ class Dictionary(object):
|
||||
with open(self.config_path, 'w') as result:
|
||||
if 'direct' not in self.structure.layout.get_str():
|
||||
result.write('''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<dictionary>
|
||||
<lifetime>
|
||||
<min>{min_lifetime}</min>
|
||||
@ -328,7 +328,7 @@ class Dictionary(object):
|
||||
{source}
|
||||
</source>
|
||||
</dictionary>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''.format(
|
||||
min_lifetime=self.min_lifetime,
|
||||
max_lifetime=self.max_lifetime,
|
||||
@ -338,7 +338,7 @@ class Dictionary(object):
|
||||
))
|
||||
else:
|
||||
result.write('''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<dictionary>
|
||||
<name>{name}</name>
|
||||
{structure}
|
||||
@ -346,7 +346,7 @@ class Dictionary(object):
|
||||
{source}
|
||||
</source>
|
||||
</dictionary>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''.format(
|
||||
min_lifetime=self.min_lifetime,
|
||||
max_lifetime=self.max_lifetime,
|
||||
|
@ -17,9 +17,9 @@ def copy_file_to_container(local_path, dist_path, container_id):
|
||||
os.system("docker cp {local} {cont_id}:{dist}".format(local=local_path, cont_id=container_id, dist=dist_path))
|
||||
|
||||
|
||||
config = '''<yandex>
|
||||
config = '''<clickhouse>
|
||||
<models_config>/etc/clickhouse-server/model/{model_config}</models_config>
|
||||
</yandex>'''
|
||||
</clickhouse>'''
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
@ -19,7 +19,7 @@ def start_cluster():
|
||||
def make_storage_with_key(id):
|
||||
node.exec_in_container(["bash", "-c" , """cat > /etc/clickhouse-server/config.d/storage_keys_config.xml << EOF
|
||||
<?xml version="1.0"?>
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<encryption_codecs>
|
||||
<aes_128_gcm_siv>
|
||||
<key_hex id="0">83e84e9a4eb11535c0670dc62d808ee0</key_hex>
|
||||
@ -32,7 +32,7 @@ def make_storage_with_key(id):
|
||||
<current_key_id>{cur_id}</current_key_id>
|
||||
</aes_256_gcm_siv>
|
||||
</encryption_codecs>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
EOF""".format(cur_id=id)])
|
||||
node.query("SYSTEM RELOAD CONFIG")
|
||||
|
||||
|
@ -58,13 +58,13 @@ def test_login_as_dropped_user_xml():
|
||||
instance.exec_in_container(["bash", "-c" , """
|
||||
cat > /etc/clickhouse-server/users.d/user_c.xml << EOF
|
||||
<?xml version="1.0"?>
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<users>
|
||||
<C>
|
||||
<no_password/>
|
||||
</C>
|
||||
</users>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
EOF"""])
|
||||
|
||||
assert_eq_with_retry(instance, "SELECT name FROM system.users WHERE name='C'", "C")
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<mysql1>
|
||||
<user>root</user>
|
||||
@ -22,4 +22,4 @@
|
||||
<table>test_table</table>
|
||||
</mysql3>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<postgres1>
|
||||
<user>postgres</user>
|
||||
@ -31,4 +31,4 @@
|
||||
<host>postgres1</host>
|
||||
</postgres4>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -44,7 +44,7 @@ def generate_structure():
|
||||
|
||||
def generate_dictionaries(path, structure):
|
||||
dictionary_skeleton = '''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<dictionary>
|
||||
<name>{name}</name>
|
||||
|
||||
@ -69,7 +69,7 @@ def generate_dictionaries(path, structure):
|
||||
{parent}
|
||||
</structure>
|
||||
</dictionary>
|
||||
</yandex>'''
|
||||
</clickhouse>'''
|
||||
attribute_skeleton = '''
|
||||
<attribute>
|
||||
<name>%s_</name>
|
||||
|
@ -115,7 +115,7 @@ def test_add_key():
|
||||
def make_storage_policy_with_keys(policy_name, keys):
|
||||
node.exec_in_container(["bash", "-c" , """cat > /etc/clickhouse-server/config.d/storage_policy_{policy_name}.xml << EOF
|
||||
<?xml version="1.0"?>
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<storage_configuration>
|
||||
<disks>
|
||||
<{policy_name}_disk>
|
||||
@ -135,7 +135,7 @@ def test_add_key():
|
||||
</{policy_name}>
|
||||
</policies>
|
||||
</storage_configuration>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
EOF""".format(policy_name=policy_name, keys=keys)])
|
||||
node.query("SYSTEM RELOAD CONFIG")
|
||||
|
||||
|
@ -46,14 +46,14 @@ def started_cluster():
|
||||
cluster.shutdown()
|
||||
|
||||
|
||||
config = '''<yandex>
|
||||
config = '''<clickhouse>
|
||||
<profiles>
|
||||
<default>
|
||||
<sleep_in_send_tables_status_ms>{sleep_in_send_tables_status_ms}</sleep_in_send_tables_status_ms>
|
||||
<sleep_in_send_data_ms>{sleep_in_send_data_ms}</sleep_in_send_data_ms>
|
||||
</default>
|
||||
</profiles>
|
||||
</yandex>'''
|
||||
</clickhouse>'''
|
||||
|
||||
|
||||
def check_query(expected_replica, receive_timeout=300):
|
||||
|
@ -45,14 +45,14 @@ def started_cluster():
|
||||
cluster.shutdown()
|
||||
|
||||
|
||||
config = '''<yandex>
|
||||
config = '''<clickhouse>
|
||||
<profiles>
|
||||
<default>
|
||||
<sleep_in_send_tables_status_ms>{sleep_in_send_tables_status_ms}</sleep_in_send_tables_status_ms>
|
||||
<sleep_in_send_data_ms>{sleep_in_send_data_ms}</sleep_in_send_data_ms>
|
||||
</default>
|
||||
</profiles>
|
||||
</yandex>'''
|
||||
</clickhouse>'''
|
||||
|
||||
|
||||
QUERY_1 = "SELECT count() FROM distributed"
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<mysql1>
|
||||
<user>root</user>
|
||||
@ -22,4 +22,4 @@
|
||||
<table>test_table</table>
|
||||
</mysql3>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<postgres1>
|
||||
<user>postgres</user>
|
||||
@ -20,4 +20,4 @@
|
||||
<database>postgres</database>
|
||||
</postgres3>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<url1>
|
||||
<headers>
|
||||
@ -13,4 +13,4 @@
|
||||
</headers>
|
||||
</url1>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -31,7 +31,7 @@ def test_reload_auxiliary_zookeepers(start_cluster):
|
||||
)
|
||||
|
||||
# Add an auxiliary zookeeper
|
||||
new_config = """<yandex>
|
||||
new_config = """<clickhouse>
|
||||
<zookeeper>
|
||||
<node index="1">
|
||||
<host>zoo1</host>
|
||||
@ -59,7 +59,7 @@ def test_reload_auxiliary_zookeepers(start_cluster):
|
||||
</node>
|
||||
</zookeeper2>
|
||||
</auxiliary_zookeepers>
|
||||
</yandex>"""
|
||||
</clickhouse>"""
|
||||
node.replace_config("/etc/clickhouse-server/conf.d/zookeeper_config.xml", new_config)
|
||||
|
||||
node.query("SYSTEM RELOAD CONFIG")
|
||||
@ -72,7 +72,7 @@ def test_reload_auxiliary_zookeepers(start_cluster):
|
||||
node.query("ALTER TABLE simple2 ATTACH PARTITION '2020-08-27';")
|
||||
assert node.query("SELECT id FROM simple2").strip() == "1"
|
||||
|
||||
new_config = """<yandex>
|
||||
new_config = """<clickhouse>
|
||||
<zookeeper>
|
||||
<node index="1">
|
||||
<host>zoo2</host>
|
||||
@ -80,7 +80,7 @@ def test_reload_auxiliary_zookeepers(start_cluster):
|
||||
</node>
|
||||
<session_timeout_ms>2000</session_timeout_ms>
|
||||
</zookeeper>
|
||||
</yandex>"""
|
||||
</clickhouse>"""
|
||||
node.replace_config("/etc/clickhouse-server/conf.d/zookeeper_config.xml", new_config)
|
||||
node.query("SYSTEM RELOAD CONFIG")
|
||||
time.sleep(5)
|
||||
|
@ -36,7 +36,7 @@ def started_cluster():
|
||||
|
||||
|
||||
base_config = '''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<remote_servers>
|
||||
<test_cluster>
|
||||
<shard>
|
||||
@ -65,11 +65,11 @@ base_config = '''
|
||||
</shard>
|
||||
</test_cluster2>
|
||||
</remote_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''
|
||||
|
||||
test_config1 = '''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<remote_servers>
|
||||
<test_cluster>
|
||||
<shard>
|
||||
@ -94,11 +94,11 @@ test_config1 = '''
|
||||
</shard>
|
||||
</test_cluster2>
|
||||
</remote_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''
|
||||
|
||||
test_config2 = '''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<remote_servers>
|
||||
<test_cluster>
|
||||
<shard>
|
||||
@ -114,11 +114,11 @@ test_config2 = '''
|
||||
</shard>
|
||||
</test_cluster>
|
||||
</remote_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''
|
||||
|
||||
test_config3 = '''
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<remote_servers>
|
||||
<test_cluster>
|
||||
<shard>
|
||||
@ -156,7 +156,7 @@ test_config3 = '''
|
||||
</shard>
|
||||
</test_cluster3>
|
||||
</remote_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
'''
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ def test_reload_zookeeper(start_cluster):
|
||||
|
||||
## remove zoo2, zoo3 from configs
|
||||
new_config = """
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<zookeeper>
|
||||
<node index="1">
|
||||
<host>zoo1</host>
|
||||
@ -79,7 +79,7 @@ def test_reload_zookeeper(start_cluster):
|
||||
|
||||
## set config to zoo2, server will be normal
|
||||
new_config = """
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<zookeeper>
|
||||
<node index="1">
|
||||
<host>zoo2</host>
|
||||
@ -87,7 +87,7 @@ def test_reload_zookeeper(start_cluster):
|
||||
</node>
|
||||
<session_timeout_ms>2000</session_timeout_ms>
|
||||
</zookeeper>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
"""
|
||||
node.replace_config("/etc/clickhouse-server/conf.d/zookeeper.xml", new_config)
|
||||
node.query("SYSTEM RELOAD CONFIG")
|
||||
|
@ -66,7 +66,7 @@ def add_disk(node, name, path, separate_file=False):
|
||||
tree = ET.parse(os.path.join(node.config_d_dir, "storage_configuration.xml"))
|
||||
except:
|
||||
tree = ET.ElementTree(
|
||||
ET.fromstring('<yandex><storage_configuration><disks/><policies/></storage_configuration></yandex>'))
|
||||
ET.fromstring('<clickhouse><storage_configuration><disks/><policies/></storage_configuration></clickhouse>'))
|
||||
root = tree.getroot()
|
||||
new_disk = ET.Element(name)
|
||||
new_path = ET.Element("path")
|
||||
@ -90,7 +90,7 @@ def update_disk(node, name, path, keep_free_space_bytes, separate_file=False):
|
||||
os.path.join(node.config_d_dir, "storage_configuration.xml"))
|
||||
except:
|
||||
tree = ET.ElementTree(
|
||||
ET.fromstring('<yandex><storage_configuration><disks/><policies/></storage_configuration></yandex>'))
|
||||
ET.fromstring('<clickhouse><storage_configuration><disks/><policies/></storage_configuration></clickhouse>'))
|
||||
|
||||
root = tree.getroot()
|
||||
disk = root.find("storage_configuration").find("disks").find(name)
|
||||
|
@ -114,7 +114,7 @@ def test_different_credentials(different_credentials_cluster):
|
||||
assert node6.query("SELECT id FROM test_table order by id") == '222\n'
|
||||
|
||||
add_old = """
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<interserver_http_port>9009</interserver_http_port>
|
||||
<interserver_http_credentials>
|
||||
<user>admin</user>
|
||||
@ -128,7 +128,7 @@ def test_different_credentials(different_credentials_cluster):
|
||||
<password>333</password>
|
||||
</old>
|
||||
</interserver_http_credentials>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
"""
|
||||
|
||||
node5.replace_config("/etc/clickhouse-server/config.d/credentials1.xml", add_old)
|
||||
@ -173,14 +173,14 @@ def test_credentials_and_no_credentials(credentials_and_no_credentials_cluster):
|
||||
assert node8.query("SELECT id FROM test_table order by id") == '222\n'
|
||||
|
||||
allow_empty = """
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<interserver_http_port>9009</interserver_http_port>
|
||||
<interserver_http_credentials>
|
||||
<user>admin</user>
|
||||
<password>222</password>
|
||||
<allow_empty>true</allow_empty>
|
||||
</interserver_http_credentials>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
"""
|
||||
|
||||
# change state: Flip node7 to mixed auth/non-auth (allow node8)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<rocksdb>
|
||||
<options>
|
||||
<max_background_jobs>8</max_background_jobs>
|
||||
@ -19,4 +19,4 @@
|
||||
</table>
|
||||
</tables>
|
||||
</rocksdb>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -9,13 +9,13 @@ cluster = ClickHouseCluster(__file__)
|
||||
|
||||
NODES = {'node' + str(i): None for i in (1, 2)}
|
||||
|
||||
config = '''<yandex>
|
||||
config = '''<clickhouse>
|
||||
<profiles>
|
||||
<default>
|
||||
<sleep_in_send_data_ms>{sleep_in_send_data_ms}</sleep_in_send_data_ms>
|
||||
</default>
|
||||
</profiles>
|
||||
</yandex>'''
|
||||
</clickhouse>'''
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<mongo1>
|
||||
<user>root</user>
|
||||
@ -9,4 +9,4 @@
|
||||
<table>simple_table</table>
|
||||
</mongo1>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<mysql1>
|
||||
<user>root</user>
|
||||
@ -22,4 +22,4 @@
|
||||
<table>test_table</table>
|
||||
</mysql3>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<postgres1>
|
||||
<user>postgres</user>
|
||||
@ -30,4 +30,4 @@
|
||||
<table>test_replicas</table>
|
||||
</postgres4>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<named_collections>
|
||||
<s3_conf1>
|
||||
<url>http://minio1:9001/root/test_table</url>
|
||||
@ -6,4 +6,4 @@
|
||||
<secret_access_key>minio123</secret_access_key>
|
||||
</s3_conf1>
|
||||
</named_collections>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
|
@ -97,7 +97,7 @@ def test_DROP_DNS_CACHE(started_cluster):
|
||||
|
||||
|
||||
def test_RELOAD_CONFIG_AND_MACROS(started_cluster):
|
||||
macros = "<yandex><macros><mac>ro</mac></macros></yandex>"
|
||||
macros = "<clickhouse><macros><mac>ro</mac></macros></clickhouse>"
|
||||
create_macros = 'echo "{}" > /etc/clickhouse-server/config.d/macros.xml'.format(macros)
|
||||
|
||||
instance = cluster.instances['ch1']
|
||||
|
@ -27,8 +27,8 @@ function read_src_data {
|
||||
}
|
||||
|
||||
function set_vertical_alg {
|
||||
echo "<yandex><merge_tree><enable_vertical_merge_algorithm>$1</enable_vertical_merge_algorithm></merge_tree></yandex>" | sudo tee /etc/clickhouse-server/conf.d/enable_vertical_merge_algorithm.xml >/dev/null
|
||||
echo "<yandex><merge_tree><vertical_merge_algorithm_min_rows_to_activate>0</vertical_merge_algorithm_min_rows_to_activate></merge_tree></yandex>" | sudo tee /etc/clickhouse-server/conf.d/vertical_merge_algorithm_min_rows_to_activate.xml >/dev/null
|
||||
echo "<clickhouse><merge_tree><enable_vertical_merge_algorithm>$1</enable_vertical_merge_algorithm></merge_tree></clickhouse>" | sudo tee /etc/clickhouse-server/conf.d/enable_vertical_merge_algorithm.xml >/dev/null
|
||||
echo "<clickhouse><merge_tree><vertical_merge_algorithm_min_rows_to_activate>0</vertical_merge_algorithm_min_rows_to_activate></merge_tree></clickhouse>" | sudo tee /etc/clickhouse-server/conf.d/vertical_merge_algorithm_min_rows_to_activate.xml >/dev/null
|
||||
}
|
||||
|
||||
function set_and_restart {
|
||||
|
@ -108,26 +108,26 @@ version: 1.0
|
||||
[ClickHouse] SHALL reject [Kerberos] authentication in case user is properly configured for using Kerberos, but Kerberos itself is not enabled in `config.xml`. For example:
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos />
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos>
|
||||
<principal>HTTP/clickhouse.example.com@EXAMPLE.COM</principal>
|
||||
</kerberos>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos>
|
||||
<realm>EXAMPLE.COM</realm>
|
||||
</kerberos>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-016.Kerberos.Configuration.MultipleKerberosSections
|
||||
@ -163,7 +163,7 @@ version: 1.0
|
||||
[ClickHouse] SHALL accept [Kerberos] authentication for a user that is configured in `users.xml` and has [Kerberos] enabled, i.e.:
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<users>
|
||||
<!- ... -->
|
||||
@ -174,7 +174,7 @@ version: 1.0
|
||||
</kerberos>
|
||||
</my_user>
|
||||
</users>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-016.Kerberos.ValidUser.RBACConfiguredUser
|
||||
|
@ -64,26 +64,26 @@ RQ_SRS_016_Kerberos_Configuration_KerberosNotEnabled = Requirement(
|
||||
'[ClickHouse] SHALL reject [Kerberos] authentication in case user is properly configured for using Kerberos, but Kerberos itself is not enabled in `config.xml`. For example:\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <!- ... -->\n'
|
||||
' <kerberos />\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <!- ... -->\n'
|
||||
' <kerberos>\n'
|
||||
' <principal>HTTP/clickhouse.example.com@EXAMPLE.COM</principal>\n'
|
||||
' </kerberos>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <!- ... -->\n'
|
||||
' <kerberos>\n'
|
||||
' <realm>EXAMPLE.COM</realm>\n'
|
||||
' </kerberos>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -177,7 +177,7 @@ RQ_SRS_016_Kerberos_ValidUser_XMLConfiguredUser = Requirement(
|
||||
'[ClickHouse] SHALL accept [Kerberos] authentication for a user that is configured in `users.xml` and has [Kerberos] enabled, i.e.:\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <!- ... -->\n'
|
||||
' <users>\n'
|
||||
' <!- ... -->\n'
|
||||
@ -188,7 +188,7 @@ RQ_SRS_016_Kerberos_ValidUser_XMLConfiguredUser = Requirement(
|
||||
' </kerberos>\n'
|
||||
' </my_user>\n'
|
||||
' </users>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -626,26 +626,26 @@ version: 1.0
|
||||
[ClickHouse] SHALL reject [Kerberos] authentication in case user is properly configured for using Kerberos, but Kerberos itself is not enabled in `config.xml`. For example:
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos />
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos>
|
||||
<principal>HTTP/clickhouse.example.com@EXAMPLE.COM</principal>
|
||||
</kerberos>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<kerberos>
|
||||
<realm>EXAMPLE.COM</realm>
|
||||
</kerberos>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-016.Kerberos.Configuration.MultipleKerberosSections
|
||||
@ -681,7 +681,7 @@ version: 1.0
|
||||
[ClickHouse] SHALL accept [Kerberos] authentication for a user that is configured in `users.xml` and has [Kerberos] enabled, i.e.:
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<!- ... -->
|
||||
<users>
|
||||
<!- ... -->
|
||||
@ -692,7 +692,7 @@ version: 1.0
|
||||
</kerberos>
|
||||
</my_user>
|
||||
</users>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-016.Kerberos.ValidUser.RBACConfiguredUser
|
||||
|
@ -31,10 +31,10 @@ def xml_parse_file(filename):
|
||||
def create_default_config(filename):
|
||||
contents = ""
|
||||
if "kerberos_users.xml" in filename:
|
||||
contents = "<yandex><users><kerberos_user><kerberos><realm>EXAMPLE.COM" \
|
||||
"</realm></kerberos></kerberos_user></users></yandex>"
|
||||
contents = "<clickhouse><users><kerberos_user><kerberos><realm>EXAMPLE.COM" \
|
||||
"</realm></kerberos></kerberos_user></users></clickhouse>"
|
||||
elif "kerberos.xml" in filename:
|
||||
contents = "<yandex><kerberos><realm>EXAMPLE.COM</realm></kerberos></yandex>"
|
||||
contents = "<clickhouse><kerberos><realm>EXAMPLE.COM</realm></kerberos></clickhouse>"
|
||||
|
||||
with open(filename, "w") as f:
|
||||
f.write(contents)
|
||||
@ -104,7 +104,7 @@ def temp_erase(self, node, filename=None):
|
||||
try:
|
||||
with Then("I overwrite file to be dummy"):
|
||||
with open(filename, 'w') as f:
|
||||
f.write("<yandex></yandex>\n")
|
||||
f.write("<clickhouse></clickhouse>\n")
|
||||
node.restart()
|
||||
yield
|
||||
finally:
|
||||
|
@ -19,7 +19,7 @@ def kerberos_not_enabled(self):
|
||||
config_path = f"kerberos/configs/{ch_nodes[0].name}/config.d/kerberos.xml"
|
||||
|
||||
def modify_file(root):
|
||||
return xmltree.fromstring("<yandex></yandex>")
|
||||
return xmltree.fromstring("<clickhouse></clickhouse>")
|
||||
|
||||
check_wrong_config(node=ch_nodes[0], client=ch_nodes[2], config_path=config_path, modify_file=modify_file,
|
||||
output="Kerberos is not enabled")
|
||||
|
@ -442,7 +442,7 @@ version: 2.0
|
||||
configuration file or of any configuration file inside the `config.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<my_ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -458,7 +458,7 @@ configuration file or of any configuration file inside the `config.d` directory.
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</my_ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-007.LDAP.Configuration.User.RBAC
|
||||
@ -478,7 +478,7 @@ version: 1.0
|
||||
an [LDAP] server inside the `users.xml` file or any configuration file inside the `users.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<users>
|
||||
<user_name>
|
||||
<ldap>
|
||||
@ -486,7 +486,7 @@ an [LDAP] server inside the `users.xml` file or any configuration file inside th
|
||||
</ldap>
|
||||
</user_name>
|
||||
</users>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-007.LDAP.Configuration.User.Name.Empty
|
||||
|
@ -867,7 +867,7 @@ RQ_SRS_007_LDAP_Configuration_Server_Syntax = Requirement(
|
||||
'configuration file or of any configuration file inside the `config.d` directory.\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <my_ldap_server>\n'
|
||||
' <host>localhost</host>\n'
|
||||
' <port>636</port>\n'
|
||||
@ -883,7 +883,7 @@ RQ_SRS_007_LDAP_Configuration_Server_Syntax = Requirement(
|
||||
' <tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>\n'
|
||||
' <tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>\n'
|
||||
' </my_ldap_server>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -923,7 +923,7 @@ RQ_SRS_007_LDAP_Configuration_User_Syntax = Requirement(
|
||||
'an [LDAP] server inside the `users.xml` file or any configuration file inside the `users.d` directory.\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <users>\n'
|
||||
' <user_name>\n'
|
||||
' <ldap>\n'
|
||||
@ -931,7 +931,7 @@ RQ_SRS_007_LDAP_Configuration_User_Syntax = Requirement(
|
||||
' </ldap>\n'
|
||||
' </user_name>\n'
|
||||
' </users>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -1815,7 +1815,7 @@ version: 2.0
|
||||
configuration file or of any configuration file inside the `config.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<my_ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -1831,7 +1831,7 @@ configuration file or of any configuration file inside the `config.d` directory.
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</my_ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-007.LDAP.Configuration.User.RBAC
|
||||
@ -1851,7 +1851,7 @@ version: 1.0
|
||||
an [LDAP] server inside the `users.xml` file or any configuration file inside the `users.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<users>
|
||||
<user_name>
|
||||
<ldap>
|
||||
@ -1859,7 +1859,7 @@ an [LDAP] server inside the `users.xml` file or any configuration file inside th
|
||||
</ldap>
|
||||
</user_name>
|
||||
</users>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### RQ.SRS-007.LDAP.Configuration.User.Name.Empty
|
||||
|
@ -194,7 +194,7 @@ def create_ldap_servers_config_content(servers, config_d_dir="/etc/clickhouse-se
|
||||
path = os.path.join(config_d_dir, config_file)
|
||||
name = config_file
|
||||
|
||||
root = xmltree.fromstring("<yandex><ldap_servers></ldap_servers></yandex>")
|
||||
root = xmltree.fromstring("<clickhouse><ldap_servers></ldap_servers></clickhouse>")
|
||||
xml_servers = root.find("ldap_servers")
|
||||
xml_servers.append(xmltree.Comment(text=f"LDAP servers {uid}"))
|
||||
|
||||
@ -231,7 +231,7 @@ def create_ldap_users_config_content(*users, config_d_dir="/etc/clickhouse-serve
|
||||
path = os.path.join(config_d_dir, config_file)
|
||||
name = config_file
|
||||
|
||||
root = xmltree.fromstring("<yandex><users></users></yandex>")
|
||||
root = xmltree.fromstring("<clickhouse><users></users></clickhouse>")
|
||||
xml_users = root.find("users")
|
||||
xml_users.append(xmltree.Comment(text=f"LDAP users {uid}"))
|
||||
|
||||
|
@ -254,7 +254,7 @@ def invalid_verification_cooldown_value(self, invalid_value, timeout=300):
|
||||
def syntax(self):
|
||||
"""Check that server configuration with valid syntax can be loaded.
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -270,7 +270,7 @@ def syntax(self):
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
"""
|
||||
servers = {
|
||||
|
@ -611,7 +611,7 @@ version: 2.0
|
||||
configuration file or of any configuration file inside the `config.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<my_ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -627,7 +627,7 @@ configuration file or of any configuration file inside the `config.d` directory.
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</my_ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.LDAPUserDirectory
|
||||
@ -649,7 +649,7 @@ version: 1.0
|
||||
[ClickHouse] SHALL support `<ldap>` section with the following syntax
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<user_directories>
|
||||
<ldap>
|
||||
<server>my_ldap_server</server>
|
||||
@ -659,7 +659,7 @@ version: 1.0
|
||||
</roles>
|
||||
</ldap>
|
||||
</user_directories>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server
|
||||
|
@ -1166,7 +1166,7 @@ RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Syntax = Requirement(
|
||||
'configuration file or of any configuration file inside the `config.d` directory.\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <my_ldap_server>\n'
|
||||
' <host>localhost</host>\n'
|
||||
' <port>636</port>\n'
|
||||
@ -1182,7 +1182,7 @@ RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Syntax = Requirement(
|
||||
' <tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>\n'
|
||||
' <tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>\n'
|
||||
' </my_ldap_server>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -1234,7 +1234,7 @@ RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Syntax = Requirement(
|
||||
'[ClickHouse] SHALL support `<ldap>` section with the following syntax\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <user_directories>\n'
|
||||
' <ldap>\n'
|
||||
' <server>my_ldap_server</server>\n'
|
||||
@ -1244,7 +1244,7 @@ RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Syntax = Requirement(
|
||||
' </roles>\n'
|
||||
' </ldap>\n'
|
||||
' </user_directories>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -2403,7 +2403,7 @@ version: 2.0
|
||||
configuration file or of any configuration file inside the `config.d` directory.
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<my_ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -2419,7 +2419,7 @@ configuration file or of any configuration file inside the `config.d` directory.
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</my_ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.LDAPUserDirectory
|
||||
@ -2441,7 +2441,7 @@ version: 1.0
|
||||
[ClickHouse] SHALL support `<ldap>` section with the following syntax
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<user_directories>
|
||||
<ldap>
|
||||
<server>my_ldap_server</server>
|
||||
@ -2451,7 +2451,7 @@ version: 1.0
|
||||
</roles>
|
||||
</ldap>
|
||||
</user_directories>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server
|
||||
|
@ -93,7 +93,7 @@ def create_entries_ldap_external_user_directory_config_content(entries, config_d
|
||||
path = os.path.join(config_d_dir, config_file)
|
||||
name = config_file
|
||||
|
||||
root = xmltree.fromstring("<yandex><user_directories></user_directories></yandex>")
|
||||
root = xmltree.fromstring("<clickhouse><user_directories></user_directories></clickhouse>")
|
||||
xml_user_directories = root.find("user_directories")
|
||||
xml_user_directories.append(xmltree.Comment(text=f"LDAP external user directories {uid}"))
|
||||
|
||||
|
@ -268,7 +268,7 @@ def invalid_verification_cooldown_value(self, invalid_value, timeout=300):
|
||||
def syntax(self):
|
||||
"""Check that server configuration with valid syntax can be loaded.
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<ldap_server>
|
||||
<host>localhost</host>
|
||||
<port>636</port>
|
||||
@ -284,7 +284,7 @@ def syntax(self):
|
||||
<tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>
|
||||
<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>
|
||||
</ldap_server>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
"""
|
||||
servers = {
|
||||
|
@ -306,7 +306,7 @@ with the actual user name during each authentication attempt.
|
||||
For example,
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<ldap_servers>
|
||||
<my_ldap_server>
|
||||
<!-- ... -->
|
||||
@ -314,7 +314,7 @@ For example,
|
||||
<!-- ... -->
|
||||
</my_ldap_server>
|
||||
</ldap_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-014.LDAP.RoleMapping.Configuration.Server.BindDN.ConflictWith.AuthDN
|
||||
@ -397,7 +397,7 @@ of the `config.xml`.
|
||||
For example,
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<user_directories>
|
||||
<ldap>
|
||||
<!-- ... -->
|
||||
@ -410,7 +410,7 @@ For example,
|
||||
</role_mapping>
|
||||
</ldap>
|
||||
</user_directories>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### Special Characters Escaping
|
||||
|
@ -456,7 +456,7 @@ RQ_SRS_014_LDAP_RoleMapping_Configuration_Server_BindDN = Requirement(
|
||||
'For example, \n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <ldap_servers>\n'
|
||||
' <my_ldap_server>\n'
|
||||
' <!-- ... -->\n'
|
||||
@ -464,7 +464,7 @@ RQ_SRS_014_LDAP_RoleMapping_Configuration_Server_BindDN = Requirement(
|
||||
' <!-- ... -->\n'
|
||||
' </my_ldap_server>\n'
|
||||
' </ldap_servers>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -601,7 +601,7 @@ RQ_SRS_014_LDAP_RoleMapping_Configuration_UserDirectory_RoleMapping_Syntax = Req
|
||||
'For example,\n'
|
||||
'\n'
|
||||
'```xml\n'
|
||||
'<yandex>\n'
|
||||
'<clickhouse>\n'
|
||||
' <user_directories>\n'
|
||||
' <ldap>\n'
|
||||
' <!-- ... -->\n'
|
||||
@ -614,7 +614,7 @@ RQ_SRS_014_LDAP_RoleMapping_Configuration_UserDirectory_RoleMapping_Syntax = Req
|
||||
' </role_mapping>\n'
|
||||
' </ldap>\n'
|
||||
' </user_directories>\n'
|
||||
'</yandex>\n'
|
||||
'</clickhouse>\n'
|
||||
'```\n'
|
||||
'\n'
|
||||
),
|
||||
@ -1366,7 +1366,7 @@ with the actual user name during each authentication attempt.
|
||||
For example,
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<ldap_servers>
|
||||
<my_ldap_server>
|
||||
<!-- ... -->
|
||||
@ -1374,7 +1374,7 @@ For example,
|
||||
<!-- ... -->
|
||||
</my_ldap_server>
|
||||
</ldap_servers>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
##### RQ.SRS-014.LDAP.RoleMapping.Configuration.Server.BindDN.ConflictWith.AuthDN
|
||||
@ -1457,7 +1457,7 @@ of the `config.xml`.
|
||||
For example,
|
||||
|
||||
```xml
|
||||
<yandex>
|
||||
<clickhouse>
|
||||
<user_directories>
|
||||
<ldap>
|
||||
<!-- ... -->
|
||||
@ -1470,7 +1470,7 @@ For example,
|
||||
</role_mapping>
|
||||
</ldap>
|
||||
</user_directories>
|
||||
</yandex>
|
||||
</clickhouse>
|
||||
```
|
||||
|
||||
#### Special Characters Escaping
|
||||
|
Loading…
Reference in New Issue
Block a user