Sandor Molnar created KNOX-3310:
-----------------------------------
Summary: Fix redundant and buggy ALIAS_PASSPHRASE assignment in
gateway-entrypoint.sh
Key: KNOX-3310
URL: https://issues.apache.org/jira/browse/KNOX-3310
Project: Apache Knox
Issue Type: Bug
Components: docker
Affects Versions: 3.0.0
Reporter: Sandor Molnar
Assignee: Sandor Molnar
Fix For: 3.0.0
The importMultipleCerts function in gateway-entrypoint.sh contained a redundant
assignment of ALIAS_PASSPHRASE. This assignment was problematic for several
reasons:
1. *Redundancy:* The variable is already correctly initialized at lines
140–147 with proper fallback logic to MASTER_SECRET.
2. *Fragility:* Because set -e is active, the line /bin/cat
"${KEYSTORE_PASSWORD_FILE}" would cause the entire entrypoint script to exit
immediately if KEYSTORE_PASSWORD_FILE was not provided or was empty.
3. *Lack of Fallback:* This specific assignment lacked the logic to use
MASTER_SECRET as a fallback, which the global assignment handles correctly.
Removing this line ensures the function uses the already correctly initialized
global variable and prevents unnecessary container crashes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)