You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by sm...@apache.org on 2026/04/28 09:50:26 UTC

(knox) branch master updated: KNOX-3310: Fix redundant ALIAS_PASSPHRASE assignment and improve logging (#1216)

This is an automated email from the ASF dual-hosted git repository.

smolnar82 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 762593a26 KNOX-3310: Fix redundant ALIAS_PASSPHRASE assignment and improve logging (#1216)
762593a26 is described below

commit 762593a265865b8bcb98f65d6d7ed2b7bdf31d14
Author: Sandor Molnar <sm...@apache.org>
AuthorDate: Tue Apr 28 11:50:20 2026 +0200

    KNOX-3310: Fix redundant ALIAS_PASSPHRASE assignment and improve logging (#1216)
---
 gateway-docker/src/main/resources/docker/gateway-entrypoint.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gateway-docker/src/main/resources/docker/gateway-entrypoint.sh b/gateway-docker/src/main/resources/docker/gateway-entrypoint.sh
index 015dbe2fa..2cb0277a3 100755
--- a/gateway-docker/src/main/resources/docker/gateway-entrypoint.sh
+++ b/gateway-docker/src/main/resources/docker/gateway-entrypoint.sh
@@ -42,10 +42,10 @@ set -o pipefail
 
 ## Helper function used to import certs into truststore
 ## Function takes cert file as argument
+## At this time ALIAS_PASSPHRASE is already initialized
 importMultipleCerts() {
   FILE=$1
   local import_failed=0
-  ALIAS_PASSPHRASE=$(/bin/cat "${KEYSTORE_PASSWORD_FILE}")
   # number of certs in the PEM file
   CERTS=$(/bin/grep 'END CERTIFICATE' "$FILE"| /usr/bin/wc -l)
   # For every cert in the PEM file, extract it and import into the JKS keystore
@@ -139,10 +139,11 @@ fi
 
 if [[ -n ${KEYSTORE_PASSWORD_FILE} ]] && [[ -f ${KEYSTORE_PASSWORD_FILE} ]]
 then
-  echo "Using provided keystore password file"
+  echo "Setting ALIAS_PASSPHRASE from provided keystore password file: ${KEYSTORE_PASSWORD_FILE}"
   ALIAS_PASSPHRASE=$(/bin/cat "${KEYSTORE_PASSWORD_FILE}" 2> /dev/null)
 else
    # If keystore password is not provided use master secret as alias passphrase
+   echo "Setting ALIAS_PASSPHRASE to MASTER_SECRET"
    ALIAS_PASSPHRASE="${MASTER_SECRET}"
 fi