fix: require Vault audit signing in production

This commit is contained in:
thanhnv
2026-07-18 00:15:38 +07:00
parent 00963119f4
commit d129ba60ef
3 changed files with 11 additions and 1 deletions
@@ -103,6 +103,10 @@ PY
fi
else
# Fallback — local key (dev environment without Vault)
if [[ "${CASAN_PROFILE:-}" == "prod" ]]; then
echo "SIGN_AUDIT_HEAD_FAIL reason=vault_kms_required_in_prod" >&2
exit 1
fi
AUDIT_PRIV="$CASAN_GOVERNANCE_ROOT/audit-private.pem"
if [[ ! -f "$AUDIT_PRIV" ]]; then
echo "SIGN_AUDIT_HEAD_SKIP no private key and VAULT_ADDR not set — verify will show anchor=unsigned" >&2