generated from coulomb/repo-seed
4.9 KiB
4.9 KiB
id, type, title, domain, repo, status, owner, topic_slug, created, updated
| id | type | title | domain | repo | status | owner | topic_slug | created | updated |
|---|---|---|---|---|---|---|---|---|---|
| WARDEN-WP-0001 | workplan | OpsWarden Initial Implementation | custodian | ops-warden | draft | Bernd | custodian | 2026-03-28 | 2026-03-28 |
WARDEN-WP-0001 — OpsWarden Initial Implementation
Scope: Deliver a working warden CLI that implements the SSH CA and certificate
lifecycle defined in wiki/AccessManagementDirective.md. Scaffolding (models, config,
CA backends, inventory, scorecard, CLI) is already present in the repo; this workplan
tracks the remaining implementation, testing, and integration work.
Out of scope: Vault HA/cluster setup, Ansible playbooks for host principal deployment
(those live in railiance-infra), session recording, and SSO integration (trigger §6.2 of
the directive when scale requires it).
Goal
After this workplan:
warden sign agt-test --pubkey /tmp/test.puboutputs a valid cert (local backend).warden status agt-testshows correct identity, principals, and time-to-expiry.warden scorecardreturns 4/4 on a clean test inventory.warden signcalled from ops-bridgecert_commandworks end-to-end in an integration test tunnel.- All tests pass (
uv run pytest) and lints pass (uv run ruff check .).
Reference Documents
| Document | Location |
|---|---|
| AccessManagementDirective | wiki/AccessManagementDirective.md |
| cert_command interface | wiki/CertCommandInterface.md |
| Config reference | wiki/OpsWardenConfig.md |
| ops-bridge alignment workplan | ../ops-bridge/workplans/BRIDGE-WP-0004-directive-alignment.md |
Architecture Summary
~/.config/warden/warden.yaml # backend, ca_key, inventory_path, state_dir
~/.config/warden/inventory.yaml # actor registry (name → type, principals, ttl_hours)
~/.local/state/warden/ # signed certs (*-cert.pub); keypairs (keys/)
Two swappable CA backends — both expose the same sign(spec) -> CertRecord interface:
LocalCA—ssh-keygen -s; no Vault dependency; default for dev/labVaultCA— Vault SSH engine via httpx
cert_command interface (consumed by ops-bridge):
warden sign <actor-name> --pubkey <path> # → cert text to stdout
Tasks
T1 — Repository registration
- Register repo with state-hub (
register_repo); assign Repo ID; update.claude/rules/repo-identity.md - Create state-hub workstream for this workplan
T2 — LocalCA integration test
- Generate a test CA key:
ssh-keygen -t ed25519 -f /tmp/test-ca -N "" - Run
warden signagainst a real pubkey with the test CA (requiresssh-keygenin PATH) - Verify cert parses correctly with
ssh-keygen -L - Add to
tests/test_ca.pyas an integration test (skipped ifssh-keygennot in PATH)
T3 — VaultCA integration test
- Set up a local Vault dev server (
vault server -dev) - Enable SSH secrets engine:
vault secrets enable ssh - Configure a signing role for
agt - Run
warden signwithbackend: vaultconfig - Add to
tests/test_vault.pyas an integration test (skipped if Vault not reachable)
T4 — CLI end-to-end smoke tests
warden inventory add agt-test --type agt --principal agt-task-testwarden inventory listshows the actorwarden issue agt-test(local backend) produces keypair + certwarden status agt-testshows valid certwarden scorecardreturns 4/4warden inventory remove agt-testremoves actor
T5 — ops-bridge cert_command integration
- Add
agt-state-hub-bridgeto inventory (or use existing from ops-bridge config) - Set
cert_command: "warden sign agt-state-hub-bridge --pubkey ~/.ssh/agt-state-hub-bridge_ed25519.pub"in a testtunnels.yaml - Run
bridge up state-hub-coulombcore; confirm cert is present in~/.local/state/bridge/andcert_identityappears in the audit log - Document result in a progress event
T6 — CI/CD setup
- Add
.github/workflows/ci.yml(or equivalent) runninguv run pytestanduv run ruff check .on push - Tests must pass without Vault (VaultCA integration tests skipped via pytest marker)
T7 — Documentation
wiki/OpsWardenConfig.md— annotatedwarden.yamlreference (already stubbed)wiki/CertCommandInterface.md— contract forcert_commandcallers (already stubbed)- Ensure
wiki/AccessManagementDirective.mdis in sync withops-bridge/wiki/
Acceptance Criteria
warden sign agt-test --pubkey /tmp/test.pub→ valid cert on stdout (local backend)warden status agt-test→ identity, principals, time-to-expiry shown correctlywarden scorecard→ 4/4 on clean inventorywarden signworks ascert_commandin ops-bridge tunnel config- All unit tests pass:
uv run pytest - All lints pass:
uv run ruff check . - No secrets (CA private key, certs) committed to repo