Implements SECRETS-WP-0002 end to end as a uv-managed Python package: - catalog: non-secret lane registry + strict validator (build/test/prod) - stage roles + OpenBao ACL policies; guards refuse wildcards, sys/, identity/, admin names, and cross-stage paths before any backend call - plan/apply: dry-run-first, idempotent policy + approle apply, decision-gated - decisions: State Hub lookup with local-fixture fallback; non-secret evidence to JSONL + hub progress, scrubbed of any value - provision/verify: mode-0600 file import + generated test values; positive/ negative checks that never print the value - exec delivery: `exec --catalog ... -- npm publish` injects the token via a temp .npmrc for the child only, cleaned up on exit/failure/interrupt - ops-warden routing contract + hardening backlog docs - 34 tests incl. live OpenBao integration; scripts/demo-e2e.sh runs the full chain against a throwaway bao dev server Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
ops-warden → secrets-engine Routing Contract
ops-warden issues SSH certificates only. Every other credential need (API keys, provider tokens, DB passwords, npm publish tokens) routes to secrets-engine, which is OpenBao-backed. ops-warden must never request, hold, cache, or vend a raw secret value. A route result is a pointer, not a key.
What ops-warden calls
secrets-engine route <catalog-id> --json
What it returns (the contract)
{
"catalog_id": "whynot-design-npm-publish",
"owner": "whynot-design",
"stage": "prod",
"decision_status": "resolved",
"decision_ref": "whynot-design-npm-publish",
"review_url": "http://127.0.0.1:8000/decisions/<id>",
"metadata_applied": true,
"value_present": true,
"ready": true,
"next_command": "secrets-engine exec --catalog whynot-design-npm-publish -- <command...>",
"missing": ""
}
| Field | Meaning |
|---|---|
decision_status |
resolved/approved => approved; missing/pending => not yet |
metadata_applied |
OpenBao ACL policy + approle exist for the lane |
value_present |
the secret value has been provisioned (boolean only — value never read) |
ready |
approved and applied and provisioned |
next_command |
the single safe command the caller should run next |
missing |
the one human/provisioning step still outstanding |
Guarantees
- No value crosses this boundary.
routereports a booleanvalue_present, derived from a metadata/presence check — it never reads the secret. - Actionable when not ready. If a lane is unapproved, unapplied, or
unprovisioned,
next_command+missingtell the caller exactly what to do. - Idempotent / read-only.
routeperforms no mutation.
whynot-design retry flow
- whynot-design CI needs a publish token → asks ops-warden.
- ops-warden runs
secrets-engine route whynot-design-npm-publish --json. - If
ready=false, it surfacesmissing+next_commandto the human (e.g. "needs approved decision" or "needs provisioning"). - Once
ready=true, the workload runssecrets-engine exec --catalog whynot-design-npm-publish -- npm publish.
Anti-patterns (forbidden)
- ops-warden
POST /messages/asking forNPM_TOKEN/OPENROUTER_API_KEY. - Caching
value_presentas if it were the value. - Inventing
warden secret/warden bao— they do not exist.