mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 17:22:43 +02:00
[bitnami/ejbca] Release 9.3.7-debian-12-r13 (#94119)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -8,7 +8,7 @@ ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security"
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2026-05-23T07:25:59Z" \
|
||||
org.opencontainers.image.created="2026-06-01T13:20:14Z" \
|
||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
||||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/ejbca/README.md" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/ejbca" \
|
||||
@@ -29,20 +29,20 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
|
||||
DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \
|
||||
mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
|
||||
COMPONENTS=( \
|
||||
"wildfly-32.0.1-26-linux-${OS_ARCH}-debian-12" \
|
||||
"wildfly-32.0.1-27-linux-${OS_ARCH}-debian-12" \
|
||||
"jre-21.0.11-11-1-linux-${OS_ARCH}-debian-12" \
|
||||
"mysql-client-12.2.2-0-linux-${OS_ARCH}-debian-12" \
|
||||
"mysql-client-12.3.2-0-linux-${OS_ARCH}-debian-12" \
|
||||
"ejbca-9.3.7-0-linux-${OS_ARCH}-debian-12" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
|
||||
fi ; \
|
||||
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
|
||||
sha256sum -c "/opt/bitnami/checksums/${COMPONENT}.tar.gz.sha256" ; \
|
||||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
|
||||
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
|
||||
done
|
||||
rm -rf "${COMPONENT}".tar.gz ; \
|
||||
done ; \
|
||||
rm -rf /opt/bitnami/checksums ;
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
RUN chmod g+rwX /opt/bitnami
|
||||
@@ -54,7 +54,7 @@ RUN /opt/bitnami/scripts/ejbca/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/java/postunpack.sh
|
||||
ENV APP_VERSION="9.3.7" \
|
||||
BITNAMI_APP_NAME="ejbca" \
|
||||
IMAGE_REVISION="12" \
|
||||
IMAGE_REVISION="13" \
|
||||
JAVA_HOME="/opt/bitnami/java" \
|
||||
PATH="/opt/bitnami/wildfly/bin:/opt/bitnami/java/bin:/opt/bitnami/mysql/bin:/opt/bitnami/ejbca/bin:$PATH"
|
||||
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
689914521689cf16111ef6bd36afa9d737ec77da87fb44f239b2626d14b1d774 ejbca-9.3.7-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
bed41f858a8043701f6dd91f3dacfd29206de118534e53cf402760218500e2a0 ejbca-9.3.7-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
190f3814d0362c10bc2373945a5fe00ff46aa2980ac2224528a32c7766a2b72d jre-21.0.11-11-1-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
08f71653cfeafd8e168835acfa95678ad52649c0b8c3512d285cedead2ea0a62 jre-21.0.11-11-1-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
5b884dec9384b513fa919005e7db53fc817949bcbc3e88c61e49d12af6753a08 mysql-client-12.3.2-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
c6cd215fe18568f3015248adc87362e42edc3a9d342ec31be0ddc6e1abbf7c25 mysql-client-12.3.2-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
840f88fc1fb8768bfa9d104fd2567a0eaa15b062b968b144c2cbf99ad4ee403c wildfly-32.0.1-27-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
103e3962f377176ec22b9e21aaee4ab75976f0282c95dd533dd0a1d24ac8121a wildfly-32.0.1-27-linux-arm64-debian-12.tar.gz
|
||||
@@ -139,3 +139,40 @@ wait_for_log_entry() {
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Creates a secure temporary file containing the provided secret
|
||||
# Arguments:
|
||||
# $1 - secret to write to the temporary file
|
||||
# Returns:
|
||||
# String
|
||||
#########################
|
||||
credential_to_temp_file() {
|
||||
local secret="$1"
|
||||
local tmp_file
|
||||
|
||||
# Use mktemp with a specific prefix for easier debugging if something lingers
|
||||
if ! tmp_file=$(mktemp "${TMPDIR:-/tmp}/at.cred.XXXXXXXX"); then
|
||||
echo "Error: Failed to create temp file" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Restrict permissions before writing the secret
|
||||
chmod 0600 "$tmp_file"
|
||||
# Write secret and ensure it's flushed to disk
|
||||
printf "%s" "$secret" > "$tmp_file"
|
||||
# Output the filename so the caller can capture it
|
||||
echo "$tmp_file"
|
||||
}
|
||||
|
||||
########################
|
||||
# Cleans up temporary files created by credential_to_temp_file
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
cleanup_credentials() {
|
||||
debug "Cleaning up temporary files containing credentials"
|
||||
rm -rf "${TMPDIR:-/tmp}"/at.cred.*
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@ relativize() {
|
||||
# -d|--dir-mode - mode for files.
|
||||
# -u|--user - user
|
||||
# -g|--group - group
|
||||
# -n|--no-dereference - do not follow symlinks (use for runtime root chown of daemon-writable dirs)
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
@@ -140,6 +141,7 @@ configure_permissions_ownership() {
|
||||
local file_mode=""
|
||||
local user=""
|
||||
local group=""
|
||||
local follow_symlinks="yes"
|
||||
|
||||
# Validate arguments
|
||||
shift 1
|
||||
@@ -161,6 +163,9 @@ configure_permissions_ownership() {
|
||||
shift
|
||||
group="${1:?missing group}"
|
||||
;;
|
||||
-n | --no-dereference)
|
||||
follow_symlinks="no"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command line flag $1" >&2
|
||||
return 1
|
||||
@@ -169,22 +174,29 @@ configure_permissions_ownership() {
|
||||
shift
|
||||
done
|
||||
|
||||
# -L: follow symlinks and emits the target path
|
||||
# This is dangerous at runtime, given a co-located lower-privileged process with write access
|
||||
# to the target path can redirect the chown/chmod to arbitrary paths. Example:
|
||||
# Lower-privileged process run: ln -s /etc /tmp/etc
|
||||
# Then, setup.sh runs: configure_permissions_ownership --dir-mode 775 /tmp
|
||||
local find_L_flag=(); [[ "$follow_symlinks" == "yes" ]] && find_L_flag=("-L")
|
||||
# -h: changes symlink inode ownership without touching the target.
|
||||
local chown_flags=(); [[ "$follow_symlinks" == "no" ]] && chown_flags=("-h")
|
||||
read -r -a filepaths <<<"$paths"
|
||||
for p in "${filepaths[@]}"; do
|
||||
if [[ -e "$p" ]]; then
|
||||
find -L "$p" -printf ""
|
||||
if [[ -n $dir_mode ]]; then
|
||||
find -L "$p" -type d ! -perm "$dir_mode" -print0 | xargs -r -0 chmod "$dir_mode"
|
||||
find "${find_L_flag[@]}" "$p" -not -type l -type d ! -perm "$dir_mode" -print0 | xargs -r -0 chmod "$dir_mode"
|
||||
fi
|
||||
if [[ -n $file_mode ]]; then
|
||||
find -L "$p" -type f ! -perm "$file_mode" -print0 | xargs -r -0 chmod "$file_mode"
|
||||
find "${find_L_flag[@]}" "$p" -not -type l -type f ! -perm "$file_mode" -print0 | xargs -r -0 chmod "$file_mode"
|
||||
fi
|
||||
if [[ -n $user ]] && [[ -n $group ]]; then
|
||||
find -L "$p" -print0 | xargs -r -0 chown "${user}:${group}"
|
||||
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chown "${chown_flags[@]}" "${user}:${group}"
|
||||
elif [[ -n $user ]] && [[ -z $group ]]; then
|
||||
find -L "$p" -print0 | xargs -r -0 chown "${user}"
|
||||
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chown "${chown_flags[@]}" "${user}"
|
||||
elif [[ -z $user ]] && [[ -n $group ]]; then
|
||||
find -L "$p" -print0 | xargs -r -0 chgrp "${group}"
|
||||
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chgrp "${chown_flags[@]}" "${group}"
|
||||
fi
|
||||
else
|
||||
stderr_print "$p does not exist"
|
||||
|
||||
@@ -18,6 +18,9 @@ set -o pipefail
|
||||
# Ensure ejbca environment variables are valid
|
||||
ejbca_validate
|
||||
|
||||
# Ensure we clean up temporary files when this script ends
|
||||
trap cleanup_credentials EXIT
|
||||
|
||||
# Ensure ejbca is initialized
|
||||
ejbca_initialize
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load Generic Libraries
|
||||
. /opt/bitnami/scripts/libfile.sh
|
||||
. /opt/bitnami/scripts/libfs.sh
|
||||
. /opt/bitnami/scripts/liblog.sh
|
||||
. /opt/bitnami/scripts/libos.sh
|
||||
. /opt/bitnami/scripts/libvalidations.sh
|
||||
. /opt/bitnami/scripts/libpersistence.sh
|
||||
. /opt/bitnami/scripts/libservice.sh
|
||||
. /opt/bitnami/scripts/libfile.sh
|
||||
|
||||
########################
|
||||
# Validate settings in EJBCA_* env. variables
|
||||
@@ -402,15 +402,10 @@ ejbca_generate_ca() {
|
||||
-s "$EJBCA_CA_CERT_SIGNATURE_ALGORITHM" \
|
||||
-type "x509"
|
||||
|
||||
# Avoid passing EJBCA admin password as arguments to ejbca.sh, to avoid leaking them given
|
||||
# Avoid passing EJBCA admin password as arguments to ejbca.sh, to avoid leaking them
|
||||
# given a local observer with /proc read access can read them
|
||||
# Instead, we can read them from temporary files
|
||||
local ejbca_admin_password_file
|
||||
ejbca_admin_password_file="$(mktemp)"
|
||||
chmod 0600 "$ejbca_admin_password_file"
|
||||
echo "$EJBCA_ADMIN_PASSWORD" > "$ejbca_admin_password_file"
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f $ejbca_admin_password_file" RETURN ERR INT TERM
|
||||
ejbca_admin_password_file="$(credential_to_temp_file "$EJBCA_ADMIN_PASSWORD")"
|
||||
|
||||
info "Add superadmin user"
|
||||
ejbca_execute_command ra addendentity \
|
||||
@@ -620,8 +615,8 @@ ejbca_initialize() {
|
||||
info "Initializing EJBCA..."
|
||||
|
||||
# Configuring permissions for tmp, logs and data folders
|
||||
am_i_root && configure_permissions_ownership "$EJBCA_TMP_DIR" -u "$EJBCA_DAEMON_USER" -g "$EJBCA_DAEMON_GROUP"
|
||||
am_i_root && configure_permissions_ownership "$EJBCA_DATA_DIR" -u "$EJBCA_DAEMON_USER" -g "$EJBCA_DAEMON_GROUP"
|
||||
am_i_root && configure_permissions_ownership "$EJBCA_TMP_DIR" -u "$EJBCA_DAEMON_USER" -g "$EJBCA_DAEMON_GROUP" -n
|
||||
am_i_root && configure_permissions_ownership "$EJBCA_DATA_DIR" -u "$EJBCA_DAEMON_USER" -g "$EJBCA_DAEMON_GROUP" -n
|
||||
|
||||
# Note we need to use wildfly instead of ejbca as directory since the persist_app function relativizes them to /opt/bitnami/wildfly
|
||||
if ! is_app_initialized "wildfly"; then
|
||||
|
||||
Reference in New Issue
Block a user