[ 
https://issues.apache.org/jira/browse/KNOX-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082393#comment-18082393
 ] 

ASF subversion and git services commented on KNOX-3310:
-------------------------------------------------------

Commit 762593a265865b8bcb98f65d6d7ed2b7bdf31d14 in knox's branch 
refs/heads/knox_idf from Sandor Molnar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=762593a26 ]

KNOX-3310: Fix redundant ALIAS_PASSPHRASE assignment and improve logging (#1216)

> 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
>            Priority: Critical
>             Fix For: 3.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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)

Reply via email to