8000 Expand FIPS TLS e2e coverage with host-run cipher probes and broader listener rejection checks by Elmo33 · Pull Request #2031 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content
8000
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/e2e/kubectl.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ def run_shell(cmd, timeout=600, ok_to_fail=False, shell=None, retry_transient=Fa
assert code == 0, error()


def delete_kind(kind, name, ns=None, ok_to_fail=False, shell=None):
def delete_kind(kind, name, ns=None, ok_to_fail=False, shell=None, wait=True):
with When(f"Delete {kind} {name}"):
wait_flag = "" if wait else "--wait=false"
launch(
f"delete {kind} {name} -v 5 --now --timeout=600s",
f"delete {kind} {name} -v 5 --now --timeout=600s {wait_flag}".strip(),
ns=ns,
timeout=600,
ok_to_fail=ok_to_fail,
Expand Down Expand Up @@ -233,7 +234,7 @@ def delete_all(kind, ns=None):
# OR mid-restart — e.g. chopconf in test_030008)
# makes `kubectl delete --timeout` exit non-zero; we recover via
# the force-clear loop below, so this must not raise here.
delete_kind(kind, name, ns=ns, ok_to_fail=True)
delete_kind(kind, name, ns=ns, ok_to_fail=True, wait=False)
# Stuck/re-attached finalizer recovery. The operator can RE-ATTACH
# a finalizer after a clear while it is restarting, so a single
# wait_object would race the restart and raise. Re-clear + re-delete
Expand All @@ -244,7 +245,7 @@ def delete_all(kind, ns=None):
if get_count(kind, name=name, ns=ns) == 0:
break
force_clear_finalizers(kind, name, ns=ns)
delete_kind(kind, name, ns=ns, ok_to_fail=True)
delete_kind(kind, name, ns=ns, ok_to_fail=True, wait=False)
# Only sleep if another re-check follows; skip on the last
# attempt so a genuinely-stuck CR hits the final wait_object
# (the authoritative leak assertion) without an extra wait.
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/manifests/chi/test-030003.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ spec:
<dhParamsFile>/etc/clickhouse-server/secrets.d/dhparam.pem/clickhouse-certs/dhparam.pem</dhParamsFile>
<!-- Server-auth TLS only: clients validate this certificate; the server does not require client certificates (not mTLS). -->
<verificationMode>none</verificationMode>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1</disableProtocols>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1,tlsv1_2</disableProtocols>
<cipherSuites>TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384</cipherSuites>
</server>
<client>
<caConfig>/etc/clickhouse-server/secrets.d/ca.crt/clickhouse-certs/ca.crt</caConfig>
<loadDefaultCAFile>false</loadDefaultCAFile>
<verificationMode>strict</verificationMode>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1</disableProtocols>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1,tlsv1_2</disableProtocols>
<cipherSuites>TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384</cipherSuites>
</client>
</openSSL>
Expand Down
33 changes: 33 additions & 0 deletions tests/e2e/manifests/chi/test-030017-chi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation"
metadata:
name: test-030017-chi
spec:
# chi-...-0-0.<ns>.127.0.0.1.nip.io → 127.0.0.1 on the host; operator Ping(:8443)
# hits local openssl s_server, not a real ClickHouse HTTPS listener.
namespaceDomainPattern: "%s.127.0.0.1.nip.io"
reconcile:
host:
wait:
exclude: "no"
queries: "no"
probes:
startup: "no"
readiness: "no"
templates:
podTemplates:
- name: clickhouse
spec:
containers:
- name: clickhouse
image: altinity/clickhouse-server:25.3.8.30001.altinityfips
configuration:
clusters:
- name: default
secure: "yes"
insecure: "no"
templates:
podTemplate: clickhouse
layout:
shardsCount: 1
replicasCount: 1
4 changes: 2 additions & 2 deletions tests/e2e/manifests/chk/test-030003.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ spec:
<privateKeyFile>/etc/clickhouse-server/secrets.d/server.key/clickhouse-certs/server.key</privateKeyFile>
<!-- Server-auth TLS only: clients validate this certificate; the server does not require client certificates (not mTLS). -->
<verificationMode>none</verificationMode>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1</disableProtocols>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1,tlsv1_2</disableProtocols>
<cipherSuites>TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384</cipherSuites>
</server>
<client>
<caConfig>/etc/clickhouse-server/secrets.d/ca.crt/clickhouse-certs/ca.crt</caConfig>
<loadDefaultCAFile>false</loadDefaultCAFile>
<verificationMode>strict</verificationMode>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1</disableProtocols>
<disableProtocols>sslv2,sslv3,tlsv1,tlsv1_1,tlsv1_2</disableProtocols>
<cipherSuites>TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384</cipherSuites>
</client>
</openSSL>
Expand Down
30 changes: 0 additions & 30 deletions tests/e2e/run_tests_acvp_local.sh

This file was deleted.

Loading
Loading
0