mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #53416 from ClickHouse/vdimir/test_distributed_inter_server_secret_analyzer
This commit is contained in:
commit
652416c8ef
@ -5,24 +5,6 @@ test_distributed_ddl/test.py::test_default_database[configs_secure]
|
|||||||
test_distributed_ddl/test.py::test_on_server_fail[configs]
|
test_distributed_ddl/test.py::test_on_server_fail[configs]
|
||||||
test_distributed_ddl/test.py::test_on_server_fail[configs_secure]
|
test_distributed_ddl/test.py::test_on_server_fail[configs_secure]
|
||||||
test_distributed_insert_backward_compatibility/test.py::test_distributed_in_tuple
|
test_distributed_insert_backward_compatibility/test.py::test_distributed_in_tuple
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_inline_settings_secure_cluster[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_inline_settings_secure_cluster[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_inline_settings_secure_cluster[pass-foo]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_protocol_settings_secure_cluster[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_protocol_settings_secure_cluster[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_per_user_protocol_settings_secure_cluster[pass-foo]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_insecure_cluster[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_insecure_cluster[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_insecure_cluster[pass-foo]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster[pass-foo]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_from_backward[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_from_backward[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_from_backward[pass-foo]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_with_backward[default-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_with_backward[nopass-]
|
|
||||||
test_distributed_inter_server_secret/test.py::test_user_secure_cluster_with_backward[pass-foo]
|
|
||||||
test_distributed_load_balancing/test.py::test_distributed_replica_max_ignored_errors
|
test_distributed_load_balancing/test.py::test_distributed_replica_max_ignored_errors
|
||||||
test_distributed_load_balancing/test.py::test_load_balancing_default
|
test_distributed_load_balancing/test.py::test_load_balancing_default
|
||||||
test_distributed_load_balancing/test.py::test_load_balancing_priority_round_robin[dist_priority]
|
test_distributed_load_balancing/test.py::test_load_balancing_priority_round_robin[dist_priority]
|
||||||
|
@ -110,10 +110,6 @@ def start_cluster():
|
|||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
|
|
||||||
def query_with_id(node, id_, query, **kwargs):
|
|
||||||
return node.query("WITH '{}' AS __id {}".format(id_, query), **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
# @return -- [user, initial_user]
|
# @return -- [user, initial_user]
|
||||||
def get_query_user_info(node, query_pattern):
|
def get_query_user_info(node, query_pattern):
|
||||||
node.query("SYSTEM FLUSH LOGS")
|
node.query("SYSTEM FLUSH LOGS")
|
||||||
@ -334,7 +330,7 @@ def test_secure_disagree_insert():
|
|||||||
@users
|
@users
|
||||||
def test_user_insecure_cluster(user, password):
|
def test_user_insecure_cluster(user, password):
|
||||||
id_ = "query-dist_insecure-" + user
|
id_ = "query-dist_insecure-" + user
|
||||||
query_with_id(n1, id_, "SELECT * FROM dist_insecure", user=user, password=password)
|
n1.query(f"SELECT *, '{id_}' FROM dist_insecure", user=user, password=password)
|
||||||
assert get_query_user_info(n1, id_) == [
|
assert get_query_user_info(n1, id_) == [
|
||||||
user,
|
user,
|
||||||
user,
|
user,
|
||||||
@ -345,7 +341,7 @@ def test_user_insecure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_user_secure_cluster(user, password):
|
def test_user_secure_cluster(user, password):
|
||||||
id_ = "query-dist_secure-" + user
|
id_ = "query-dist_secure-" + user
|
||||||
query_with_id(n1, id_, "SELECT * FROM dist_secure", user=user, password=password)
|
n1.query(f"SELECT *, '{id_}' FROM dist_secure", user=user, password=password)
|
||||||
assert get_query_user_info(n1, id_) == [user, user]
|
assert get_query_user_info(n1, id_) == [user, user]
|
||||||
assert get_query_user_info(n2, id_) == [user, user]
|
assert get_query_user_info(n2, id_) == [user, user]
|
||||||
|
|
||||||
@ -353,11 +349,9 @@ def test_user_secure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_per_user_inline_settings_insecure_cluster(user, password):
|
def test_per_user_inline_settings_insecure_cluster(user, password):
|
||||||
id_ = "query-ddl-settings-dist_insecure-" + user
|
id_ = "query-ddl-settings-dist_insecure-" + user
|
||||||
query_with_id(
|
n1.query(
|
||||||
n1,
|
f"""
|
||||||
id_,
|
SELECT *, '{id_}' FROM dist_insecure
|
||||||
"""
|
|
||||||
SELECT * FROM dist_insecure
|
|
||||||
SETTINGS
|
SETTINGS
|
||||||
prefer_localhost_replica=0,
|
prefer_localhost_replica=0,
|
||||||
max_memory_usage_for_user=1e9,
|
max_memory_usage_for_user=1e9,
|
||||||
@ -372,11 +366,9 @@ def test_per_user_inline_settings_insecure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_per_user_inline_settings_secure_cluster(user, password):
|
def test_per_user_inline_settings_secure_cluster(user, password):
|
||||||
id_ = "query-ddl-settings-dist_secure-" + user
|
id_ = "query-ddl-settings-dist_secure-" + user
|
||||||
query_with_id(
|
n1.query(
|
||||||
n1,
|
f"""
|
||||||
id_,
|
SELECT *, '{id_}' FROM dist_secure
|
||||||
"""
|
|
||||||
SELECT * FROM dist_secure
|
|
||||||
SETTINGS
|
SETTINGS
|
||||||
prefer_localhost_replica=0,
|
prefer_localhost_replica=0,
|
||||||
max_memory_usage_for_user=1e9,
|
max_memory_usage_for_user=1e9,
|
||||||
@ -393,10 +385,8 @@ def test_per_user_inline_settings_secure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_per_user_protocol_settings_insecure_cluster(user, password):
|
def test_per_user_protocol_settings_insecure_cluster(user, password):
|
||||||
id_ = "query-protocol-settings-dist_insecure-" + user
|
id_ = "query-protocol-settings-dist_insecure-" + user
|
||||||
query_with_id(
|
n1.query(
|
||||||
n1,
|
f"SELECT *, '{id_}' FROM dist_insecure",
|
||||||
id_,
|
|
||||||
"SELECT * FROM dist_insecure",
|
|
||||||
user=user,
|
user=user,
|
||||||
password=password,
|
password=password,
|
||||||
settings={
|
settings={
|
||||||
@ -411,10 +401,8 @@ def test_per_user_protocol_settings_insecure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_per_user_protocol_settings_secure_cluster(user, password):
|
def test_per_user_protocol_settings_secure_cluster(user, password):
|
||||||
id_ = "query-protocol-settings-dist_secure-" + user
|
id_ = "query-protocol-settings-dist_secure-" + user
|
||||||
query_with_id(
|
n1.query(
|
||||||
n1,
|
f"SELECT *, '{id_}' FROM dist_secure",
|
||||||
id_,
|
|
||||||
"SELECT * FROM dist_secure",
|
|
||||||
user=user,
|
user=user,
|
||||||
password=password,
|
password=password,
|
||||||
settings={
|
settings={
|
||||||
@ -431,8 +419,8 @@ def test_per_user_protocol_settings_secure_cluster(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_user_secure_cluster_with_backward(user, password):
|
def test_user_secure_cluster_with_backward(user, password):
|
||||||
id_ = "with-backward-query-dist_secure-" + user
|
id_ = "with-backward-query-dist_secure-" + user
|
||||||
query_with_id(
|
n1.query(
|
||||||
n1, id_, "SELECT * FROM dist_secure_backward", user=user, password=password
|
f"SELECT *, '{id_}' FROM dist_secure_backward", user=user, password=password
|
||||||
)
|
)
|
||||||
assert get_query_user_info(n1, id_) == [user, user]
|
assert get_query_user_info(n1, id_) == [user, user]
|
||||||
assert get_query_user_info(backward, id_) == [user, user]
|
assert get_query_user_info(backward, id_) == [user, user]
|
||||||
@ -441,13 +429,7 @@ def test_user_secure_cluster_with_backward(user, password):
|
|||||||
@users
|
@users
|
||||||
def test_user_secure_cluster_from_backward(user, password):
|
def test_user_secure_cluster_from_backward(user, password):
|
||||||
id_ = "from-backward-query-dist_secure-" + user
|
id_ = "from-backward-query-dist_secure-" + user
|
||||||
query_with_id(
|
backward.query(f"SELECT *, '{id_}' FROM dist_secure", user=user, password=password)
|
||||||
backward,
|
|
||||||
id_,
|
|
||||||
"SELECT * FROM dist_secure_backward",
|
|
||||||
user=user,
|
|
||||||
password=password,
|
|
||||||
)
|
|
||||||
assert get_query_user_info(n1, id_) == [user, user]
|
assert get_query_user_info(n1, id_) == [user, user]
|
||||||
assert get_query_user_info(backward, id_) == [user, user]
|
assert get_query_user_info(backward, id_) == [user, user]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user