Skip to content

Commit 87ad834

Browse files
committed
refactor(qdrant): switch CA and leaf private keys to ECDSA P-256
RSA keys are unnecessarily large for internal PKI. ECDSA P-256 provides equivalent security with smaller key material, faster TLS handshakes, and smaller certificates — beneficial for high-frequency p2p connections. CA retains rotationPolicy: Never (root CA stability). Leaf uses rotationPolicy: Always (new key on every renewal). Assisted-By: Claude <[email protected]> Signed-off-by: Arsolitt <[email protected]>
1 parent 51b5d27 commit 87ad834

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

‎packages/apps/qdrant/templates/certmanager.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ spec:
2626
name: {{ .Release.Name }}-selfsigned
2727
isCA: true
2828
privateKey:
29+
algorithm: ECDSA
30+
size: 256
2931
rotationPolicy: Never
3032
---
3133
apiVersion: cert-manager.io/v1
@@ -50,6 +52,10 @@ spec:
5052
issuerRef:
5153
name: {{ .Release.Name }}-ca
5254
commonName: {{ .Release.Name }}
55+
privateKey:
56+
algorithm: ECDSA
57+
size: 256
58+
rotationPolicy: Always
5359
# server auth: required for REST (6333) and gRPC (6334) TLS endpoints.
5460
# client auth: required for p2p mTLS — Qdrant uses ca_cert for peer
5561
# verification when cluster.p2p.enable_tls is true (see qdrant.yaml).

‎packages/apps/qdrant/tests/certmanager_test.yaml‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,75 @@ tests:
576576
path: spec.dnsNames
577577
content: "test-qdrant-1.test-qdrant-headless"
578578
documentIndex: 3
579+
580+
#######################################################
581+
# ECDSA P-256 private keys (issue ECDSA) #
582+
#######################################################
583+
584+
- it: CA Certificate uses ECDSA P-256 private key algorithm
585+
release:
586+
name: test-qdrant
587+
namespace: tenant-test
588+
set:
589+
tls:
590+
enabled: true
591+
_cluster:
592+
cluster-domain: cozy.local
593+
asserts:
594+
- equal:
595+
path: spec.privateKey.algorithm
596+
value: ECDSA
597+
documentIndex: 1
598+
- equal:
599+
path: spec.privateKey.size
600+
value: 256
601+
documentIndex: 1
602+
603+
- it: leaf Certificate uses ECDSA P-256 private key algorithm
604+
release:
605+
name: test-qdrant
606+
namespace: tenant-test
607+
set:
608+
tls:
609+
enabled: true
610+
_cluster:
611+
cluster-domain: cozy.local
612+
asserts:
613+
- equal:
614+
path: spec.privateKey.algorithm
615+
value: ECDSA
616+
documentIndex: 3
617+
- equal:
618+
path: spec.privateKey.size
619+
value: 256
620+
documentIndex: 3
621+
622+
- it: CA Certificate rotationPolicy is Never
623+
release:
624+
name: test-qdrant
625+
namespace: tenant-test
626+
set:
627+
tls:
628+
enabled: true
629+
_cluster:
630+
cluster-domain: cozy.local
631+
asserts:
632+
- equal:
633+
path: spec.privateKey.rotationPolicy
634+
value: Never
635+
documentIndex: 1
636+
637+
- it: leaf Certificate rotationPolicy is Always
638+
release:
639+
name: test-qdrant
640+
namespace: tenant-test
641+
set:
642+
tls:
643+
enabled: true
644+
_cluster:
645+
cluster-domain: cozy.local
646+
asserts:
647+
- equal:
648+
path: spec.privateKey.rotationPolicy
649+
value: Always
650+
documentIndex: 3

0 commit comments

Comments
 (0)