Добавил TLS и защиту мессенджера для лабораторной 7
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# Initializes a new local OpenBao raft store and keeps init material in ignored files.
|
||||
set -eu
|
||||
repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
cd "$repo"
|
||||
umask 077
|
||||
mkdir -p secrets
|
||||
docker compose up -d openbao
|
||||
sleep 3
|
||||
docker compose exec -T openbao bao operator init -key-shares=1 -key-threshold=1 -format=json > secrets/openbao-init.json
|
||||
python3 - <<'PY'
|
||||
import json, pathlib
|
||||
p=pathlib.Path('secrets')
|
||||
data=json.loads((p/'openbao-init.json').read_text())
|
||||
(p/'unseal-key').write_text(data['unseal_keys_b64'][0]+'\n')
|
||||
(p/'operator-token').write_text(data['root_token']+'\n')
|
||||
for name in ('unseal-key','operator-token'):
|
||||
(p/name).chmod(0o600)
|
||||
(p/'openbao-init.json').unlink()
|
||||
PY
|
||||
echo 'OpenBao initialized. One unseal key and the root token are stored only in ignored secrets/. Back them up outside this workstation.'
|
||||
Reference in New Issue
Block a user