mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
upd
This commit is contained in:
parent
0a063254a6
commit
0a4d07dd36
@ -73,3 +73,8 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
kerberos:
|
kerberos:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: krbnet
|
||||||
|
driver: bridge
|
||||||
|
@ -68,8 +68,8 @@ def create_server_principal(self, node):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
node.cmd("echo pwd | kinit admin/admin")
|
node.cmd("echo pwd | kinit admin/admin")
|
||||||
node.cmd(f"kadmin -w pwd -q \"add_principal -randkey HTTP/kerberos_env_{node.name}_1.kerberos_env_default\"")
|
node.cmd(f"kadmin -w pwd -q \"add_principal -randkey HTTP/kerberos_env_{node.name}_1.krbnet\"")
|
||||||
node.cmd(f"kadmin -w pwd -q \"ktadd -k /etc/krb5.keytab HTTP/kerberos_env_{node.name}_1.kerberos_env_default\"")
|
node.cmd(f"kadmin -w pwd -q \"ktadd -k /etc/krb5.keytab HTTP/kerberos_env_{node.name}_1.krbnet\"")
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
node.cmd("kdestroy")
|
node.cmd("kdestroy")
|
||||||
|
@ -16,7 +16,7 @@ def ping(self):
|
|||||||
|
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
with When(f"curl ch_{i} kerberos"):
|
with When(f"curl ch_{i} kerberos"):
|
||||||
r = ch_nodes[i].command(f"curl kerberos_env_kerberos_1 -c 1")
|
r = ch_nodes[i].command(f"curl kerberos -c 1")
|
||||||
kinit_no_keytab(node=ch_nodes[2])
|
kinit_no_keytab(node=ch_nodes[2])
|
||||||
with Then(f"return code should be 0"):
|
with Then(f"return code should be 0"):
|
||||||
assert r.exitcode == 7, error()
|
assert r.exitcode == 7, error()
|
||||||
@ -100,10 +100,8 @@ def invalid_server_ticket(self):
|
|||||||
self.context.krb_server.start()
|
self.context.krb_server.start()
|
||||||
ch_nodes[2].cmd("kdestroy")
|
ch_nodes[2].cmd("kdestroy")
|
||||||
while True:
|
while True:
|
||||||
time.sleep(1)
|
|
||||||
kinit_no_keytab(node=ch_nodes[2])
|
kinit_no_keytab(node=ch_nodes[2])
|
||||||
create_server_principal(node=ch_nodes[0])
|
create_server_principal(node=ch_nodes[0])
|
||||||
time.sleep(1)
|
|
||||||
if ch_nodes[2].cmd(test_select_query(node=ch_nodes[0])).output == "kerberos_user":
|
if ch_nodes[2].cmd(test_select_query(node=ch_nodes[0])).output == "kerberos_user":
|
||||||
break
|
break
|
||||||
debug(test_select_query(node=ch_nodes[0]))
|
debug(test_select_query(node=ch_nodes[0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user