Skip to content

Commit 1c595ef

Browse files
fix: enhance CA certificate handling in entrypoint script
Updated the entrypoint script to improve the detection and processing of custom CA certificates. The script now correctly identifies both regular files and symbolic links with a '.crt' extension, ensuring that all relevant certificates are included in the keystore. This change enhances the robustness of the CA certificate setup process.
1 parent 126f557 commit 1c595ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deploy/docker/fs/opt/appsmith/entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ setup-custom-ca-certificates() (
366366
tlog "Looks like you have some '.pem' files in your 'ca-certs' folder. Please rename them to '.crt' to be picked up automatically.".
367367
fi
368368

369-
if ! [[ -d "$stacks_ca_certs_path" && "$(find "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' | wc -l)" -gt 0 ]]; then
369+
if ! [[ -d "$stacks_ca_certs_path" && "$(find "$stacks_ca_certs_path" -maxdepth 1 -type f -o -type l -name '*.crt' | wc -l)" -gt 0 ]]; then
370370
tlog "No custom CA certificates found."
371371
return
372372
fi
@@ -378,8 +378,8 @@ setup-custom-ca-certificates() (
378378
-srcstorepass changeit \
379379
-deststorepass changeit
380380

381-
# Add the custom CA certificates to the store.
382-
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \
381+
# Add the custom CA certificates to the store, following symlinks
382+
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -o -type l -name '*.crt' \
383383
-print \
384384
-exec keytool -import -alias '{}' -noprompt -keystore "$store" -file '{}' -storepass changeit ';'
385385

0 commit comments

Comments
 (0)