lab4 done

This commit is contained in:
Khakimov Dmitrij
2026-10-28 22:41:10 +03:00
parent a7bedda183
commit dbc700fafe
75 changed files with 5611 additions and 227 deletions
+7 -2
View File
@@ -4,12 +4,17 @@ cd "$(dirname "$0")/.."
umask 077
mkdir -p secrets
chmod 700 secrets
for name in postgres_password cursor_key; do
for name in postgres_password cursor_key s3_root_secret_key s3_secret_key; do
if [ ! -s "secrets/$name" ]; then
openssl rand -hex 32 > "secrets/$name"
fi
done
for name in s3_root_access_key s3_access_key; do
if [ ! -s "secrets/$name" ]; then
openssl rand -hex 8 > "secrets/$name"
fi
done
# Compose mounts files directly on Linux; the unprivileged API must read them.
# The host directory remains private (0700).
chmod 444 secrets/postgres_password secrets/cursor_key
chmod 444 secrets/postgres_password secrets/cursor_key secrets/s3_root_access_key secrets/s3_root_secret_key secrets/s3_access_key secrets/s3_secret_key
printf '%s\n' 'Local secrets are ready.'