Demo and CI: Postgres and SSH server for the dynamic engines
docker compose now runs a Postgres with sample tables and an SSH server that trusts the CA in OpenBao's ssh/ engine. seed.sh configures the database engine (dynamic and static roles), the ssh CA and a role, a few live leases, and grants for alice and the platform group. CI gains a Postgres service so the database engine and its admin-policy rules are tested against a real database (skipped when BAO_PG_URL is unset). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0eff098140
commit
11c9483a88
15 files changed
+399
-5
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Wait for OpenBao's SSH CA (generated by docker/seed.sh), trust it, then run sshd in the foreground.
|
||||
set -eu
|
||||
CA_URL="${BAO_ADDR:-http://openbao:8200}/v1/ssh/public_key"
|
||||
|
||||
i=0
|
||||
until curl -fsS "$CA_URL" -o /etc/ssh/trusted-user-ca-keys.pem 2>/dev/null && [ -s /etc/ssh/trusted-user-ca-keys.pem ]; do
|
||||
i=$((i + 1))
|
||||
[ "$i" -le 60 ] || { echo "No SSH CA at $CA_URL after 60 tries" >&2; exit 1; }
|
||||
echo "Waiting for the SSH CA at $CA_URL ..."
|
||||
sleep 2
|
||||
done
|
||||
echo "Trusting the CA from $CA_URL"
|
||||
|
||||
exec /usr/sbin/sshd -D -e
|
||||
Reference in new issue
Block a user