Skip to content

Commit 1d941cd

Browse files
author
peruna
committed
Fix CI smoke Mongo secret readability for entrypoint user drop
1 parent 0266d5d commit 1d941cd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/ci/smoke.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ prepare_runtime_secrets() {
3434
printf '%s' "$(read_env_var MONGO_ROOT_PASSWORD)" > "${secrets_dir}/runtime-mongo-root-password.txt"
3535
printf '%s' "$(read_env_var MONGO_APP_USER)" > "${secrets_dir}/runtime-mongo-app-user.txt"
3636
printf '%s' "$(read_env_var MONGO_APP_PASSWORD)" > "${secrets_dir}/runtime-mongo-app-password.txt"
37-
chmod 600 "${secrets_dir}/runtime-mongo-root-user.txt" \
37+
# CI portability: mongo entrypoint re-execs as the "mongodb" user before reading
38+
# *_FILE secrets. Keep runtime secret files read-only but world-readable so the
39+
# in-container user can reliably read them across Docker/Compose variants.
40+
chmod 444 "${secrets_dir}/runtime-mongo-root-user.txt" \
3841
"${secrets_dir}/runtime-mongo-root-password.txt" \
3942
"${secrets_dir}/runtime-mongo-app-user.txt" \
4043
"${secrets_dir}/runtime-mongo-app-password.txt" || true

0 commit comments

Comments
 (0)