lab7: PKI, mTLS infra, OpenBao non-dev, hardening, lifecycle scripts

This commit is contained in:
2026-11-26 16:47:23 +03:00
parent cda6e27fb8
commit 16accda962
45 changed files with 3593 additions and 660 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Copies read-only mounted TLS material into container-private tmpfs with 0600
# key permissions required by PostgreSQL under non-root UID 70:70.
set -eu
cert_dir=/var/run/postgresql/certs
mkdir -p "$cert_dir"
chmod 0700 "$cert_dir"
cp /run/certs/ca.crt "$cert_dir/ca.crt"
cp /run/certs/ca.crl "$cert_dir/ca.crl"
cp /run/certs/server.crt "$cert_dir/server.crt"
cp /run/certs/server.key "$cert_dir/server.key"
chmod 0644 "$cert_dir/ca.crt" "$cert_dir/ca.crl" "$cert_dir/server.crt"
chmod 0600 "$cert_dir/server.key"
exec docker-entrypoint.sh "$@"