Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ FIPS_CLASSPATH="\${FIPS_CLASSPATH%:}"
# If FIPS_CLASSPATH is not empty, prepend it to classpath with colon as delim
CLASSPATH="\${FIPS_CLASSPATH:+\${FIPS_CLASSPATH}:}/app/resources:/app/classes:/app/localLibs/*:/app/orgLibs/*:/app/externalLibs/*"
echo "Using the classpath \$CLASSPATH"

# Check for trust store password file
if [ ! -z "\$TRUST_STORE_PWD_FILE" ] && [ -f "\$TRUST_STORE_PWD_FILE" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do it using environment variable as well? secret can be mounted both as file or env variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the security scanners flagged mounting secret as env variable

TRUST_STORE_PASSWORD=\$(cat "\$TRUST_STORE_PWD_FILE")
JAVA_OPTS="\$JAVA_OPTS -Djavax.net.ssl.trustStorePassword=\$TRUST_STORE_PASSWORD"
fi

exec java ${defaultJvmOpts.substring(1, defaultJvmOpts.length()-1)} \$JAVA_OPTS \$FIPS_JAVA_OPTS -classpath \${CLASSPATH} ${mainClassName} \$@