Files
mtusi2026lab7/evidence/rotation-renewal.txt
T

82 lines
4.7 KiB
Plaintext

# Rotation, revocation and OpenBao boundary evidence
Date: 2026-11-27
Stand: local Docker Desktop, compose project hla-lab7
Scope: README level 4, rotation/revocation/renewal criterion. No secret values are recorded.
## 1. LB leaf rotation and old identity revocation
Commands:
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\rotate-pki-leaf.ps1 `
-Leaf lb -CaName lb-client-ca -UriSan spiffe://hla-lab7/lb -RevokeOld
docker compose --env-file .env up -d --no-deps --force-recreate --scale api=2 api
docker compose --env-file .env up -d --no-deps --force-recreate nginx
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-rotated-leaf.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-mtls.ps1
Observed:
ROTATED lb (CA lb-client-ca) without rebuilding images.
old_leaf_sha256=8b3f0a8d2fb055dff0bb6fd2bf8409942c8f60de1c6306ecaff43f8cd100f6c2
new_leaf_sha256=d411b42909f0186d8c9b3514e27c6fd3921dd7a6ec5d316546f2dc13c5cf29af
revoked_old_leaf=8b3f0a8d2fb055dff0bb6fd2bf8409942c8f60de1c6306ecaff43f8cd100f6c2
api image before/after reload: sha256:56362acf75313be92f91ffd8735bd8683c882402139b25d4298dbc85e3c7d095
nginx image before/after reload: sha256:4cad75abc83d5ca6ee22053d85850676eaef657ee9d723d7bef61179e1e1e485
PASS: 2 API replicas reject the revoked LB leaf with 403 and accept the rotated LB leaf with 200.
PASS: 2 API replicas require a client certificate and LB CA; forbidden URI SAN is rejected; only the LB identity succeeds; no API port is published.
The old leaf/key are archived under secrets/pki/revoked/lb/ (ignored by Git). Only its
SHA-256 DER fingerprint is appended to the runtime deny-list mounted at
/run/pki/revoked-client-sha256.txt. An unreadable deny-list fails closed.
## 2. Working secret rotation without image rebuild
Command:
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\rotate-grafana-admin-password.ps1
Observed:
PASS: Grafana admin password rotated through the API and .env without rebuilding images.
old_password_accepted_after=false
new_password_accepted_after=true
grafana_image=sha256:6afa1ab7f6e662c739a45a1d458598d7eb6ab70fc7c0ab45af64864e1503d4b6
The script generates the new password locally, calls Grafana PUT /api/user/password,
updates .env, recreates only the Grafana container, verifies old/new credentials and
never prints or commits either value. Image ID was unchanged.
## 3. Sealed/unavailable OpenBao and bounded expiry behavior
Command:
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-openbao-rotation-boundaries.ps1
Observed:
bao status: Sealed true, Initialized true, Shamir 3 shares / threshold 2.
openbao-agent-api and openbao-agent-worker: Running=true.
Rendered runtime env keys still present: DATABASE_PASSWORD, RABBITMQ_PASSWORD, REDIS_PASSWORD, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY.
Public HTTPS /health/ready: 200.
Fresh startup with OPENBAO_RENDERED_ENV=/run/missing/runtime.env and a 2 s deadline:
exit 1, "OpenBao did not render runtime credentials before startup deadline", 2.8 s.
PASS: AppRole token TTL is 15m/1h, templates renew every 5m, and no permanent operator secret is embedded in the image.
PASS: application image has no BAO_TOKEN/UNSEAL/ROOT_TOKEN/SECRET_ID env entry and no .env/secrets/runtime.env/key artifact.
After the sealed-state evidence was captured, the lab OpenBao instance was reinitialized
and re-bootstrapped from local .env because unseal shares are intentionally held offline.
No unseal share or root token was written to the repository.
## 4. Bootstrap trust and lifecycle checks
Commands:
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\check-security-lifecycle.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-openbao-policies.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-openbao-runtime-boundaries.ps1
Observed:
PASS: 28 certificate/key bundles are valid; private/operator secrets are untracked; present SecretIDs are within TTL.
OpenBao policy checks passed: own path allowed; foreign path and policy changes denied.
PASS: OpenBao uses persistent raft storage outside dev mode; API/worker use separate AppRoles, scoped policies and read-only rendered files; operator material is absent.
Trust bootstrap: operator init creates 3 Shamir shares with threshold 2 offline; root token
is used only for bootstrap and removed from the environment; AppRole role-id/secret-id are
stored in ignored local files; agents auto-auth to OpenBao over verified TLS and render only
five allowlisted keys into per-role named volumes. The app enters controlled-unready when
the rendered file is missing and does not fall back to plaintext credentials.