ops: configure PKI and scoped OpenBao identities

This commit is contained in:
2026-11-06 21:14:49 +03:00
parent 48918e8b19
commit ee547e5523
64 changed files with 2454 additions and 235 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
set -eu
umask 077
case "${SERVICE:-}" in
api|worker) ;;
*) echo "SERVICE must be api or worker" >&2; exit 2 ;;
esac
source_dir="/source/$SERVICE"
target_dir="/identities/$SERVICE"
mkdir -p "$target_dir"
for file in role-id secret-id secret-id-accessor; do
cp "$source_dir/$file" "$target_dir/$file.next"
chown 10001:10001 "$target_dir/$file.next"
chmod 0600 "$target_dir/$file.next"
mv "$target_dir/$file.next" "$target_dir/$file"
done
chown 10001:10001 "$target_dir"
chmod 0700 "$target_dir"