From b477d9c33d8d5b0a6d2882b3586e868a12019547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 3 Nov 2020 14:59:15 +0100 Subject: [PATCH] ceph: add support for VAULT_TLS_SERVER_NAME MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now support VAULT_TLS_SERVER_NAME which represents the name to use as the SNI host when connecting via TLS. This is typically needed when a single host has multiple certificates, same as virtual hosts but for SSL certificates. Signed-off-by: Sébastien Han --- pkg/operator/ceph/cluster/osd/spec.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/operator/ceph/cluster/osd/spec.go b/pkg/operator/ceph/cluster/osd/spec.go index f58d061ff..e99fa1e46 100644 --- a/pkg/operator/ceph/cluster/osd/spec.go +++ b/pkg/operator/ceph/cluster/osd/spec.go @@ -182,6 +182,12 @@ if [ -n "$VAULT_CLIENT_KEY" ]; then ARGS+=(--key "${VAULT_CLIENT_KEY}") fi +# For a request to any host/port, connect to VAULT_TLS_SERVER_NAME:request's original port instead +# Used for SNI validation and correct certificate matching +if [ -n "$VAULT_TLS_SERVER_NAME" ]; then + ARGS+=(--connect-to ::"${VAULT_TLS_SERVER_NAME}":) +fi + # Check KV backend if [ -z "$VAULT_BACKEND" ]; then VAULT_BACKEND=$VAULT_DEFAULT_BACKEND