The store's contents: its policies, identities and the KV paths (WR-46) #9

Merged
pit merged 1 commit from hermes/wr46-store-contents into main 2026-10-28 08:53:29 +00:00
Owner

Summary

The store's contents, in the order docs/store-identity.md sets out. !8 recorded the audit device as a decision and shipped no code for it — bao audit list answered No audit devices are enabled — so the device is built here first, and nothing below was written before its log existed.

bao/service/roles/openbao/          the audit device, as code
├── tasks/main.yml                  + section 6: log dir, config.d, device, drop-in, logrotate
├── defaults/main.yml               + config dir, audit log path, device name
└── templates/
    ├── audit.hcl.j2                the one file device
    ├── config-dir.conf.j2          ExecStart= then the package config and config.d
    └── logrotate.j2                daily, 100M max, 30 kept, SIGHUP

bao/policies/                       one HCL file per class, ACL paths (secret/data/…)
├── operator.hcl                    create, update, read on secret/data/*
├── admin-agent.hcl                 read secret/*, sys/health, sys/mounts, sys/policies/acl/*;
│                                   update sys/capabilities-self, sys/leases/revoke
├── regular-agent.hcl               read secret/data/mcp/+/{{identity.entity.name}}
└── ci-tracker.hcl                  the four CI paths, named, never a prefix

Applied to the live store in the same order: the audit device, auth/jwt, the four policies, the roles, the entities and aliases, the Operator's userpass entry. The WR-31 prototype's efesto-noalias role, its three entity_*.root leftovers and its two live, never-delivered secret_ids are gone.

Evidence

Audit, before and after. bao audit list → No audit devices are enabled. / /etc/openbao/config.d/ absent. After the role run → store/ file, and the log's first line 2026-10-28T08:42:25Z predates this ticket's earliest write 08:42:57Z (auth/jwt enable).

The identity layer.

bao auth list            approle/ jwt/ token/ userpass/     (token/ is inherent)
bao policy list          admin-agent ci-tracker default operator regular-agent root
bao list auth/approle/role   efesto hermes minos runner
bao secrets list         secret/ kv version 2
bao audit list           store/ file

The entities. Each alias names that role's role_id:

efesto  8c9d1de3… / 69cf1e23…
minos   deb0b7ea… / 0fb7da67…
hermes  d034c840… / 0fa14b5b…
pit     f006cc93… / username `pit` on userpass

One agent, one path, two refusals. AppRole login as efesto → ttl=1800, entity_id=8c9d1de3…; secret/mcp/vikunja/efesto reads; secret/mcp/vikunja/minos and secret/hermes/api-server both 403. The throwaway seed is destroyed and its token revoked. The audit line names the actor, not the display name: auth.entity_id=8c9d1de3…, auth.metadata.role_name=efesto.

The Operator. bao login -method=userpass username=pit → policies=[default operator], creation_ttl=43200, explicit_max_ttl=86400.

Merge Danger

Door: two-way. The repository change is a diff and reverts with it; the store is already changed and reverses with bao delete / bao auth disable plus removing config.d/audit.hcl and the drop-in and restarting the guest.

Blast Radius: the store's identity layer — nothing consumes the store yet, and merging touches no guest.

Two things merging does not settle, both stated in docs/store-identity.md: the role writes the audit device but does not yet bao policy write or create identities (WR-34's handoff), so a guest rebuilt from the Stacks comes back empty; and the Operator's userpass password is new seed material that lives plaintext at ~/.secrets/userpass/pit.password until WR-41 seals it to pit.key.

## Summary The store's contents, in the order `docs/store-identity.md` sets out. `!8` recorded the audit device as a decision and shipped no code for it — `bao audit list` answered *No audit devices are enabled* — so the device is built here first, and nothing below was written before its log existed. ```text bao/service/roles/openbao/ the audit device, as code ├── tasks/main.yml + section 6: log dir, config.d, device, drop-in, logrotate ├── defaults/main.yml + config dir, audit log path, device name └── templates/ ├── audit.hcl.j2 the one file device ├── config-dir.conf.j2 ExecStart= then the package config and config.d └── logrotate.j2 daily, 100M max, 30 kept, SIGHUP bao/policies/ one HCL file per class, ACL paths (secret/data/…) ├── operator.hcl create, update, read on secret/data/* ├── admin-agent.hcl read secret/*, sys/health, sys/mounts, sys/policies/acl/*; │ update sys/capabilities-self, sys/leases/revoke ├── regular-agent.hcl read secret/data/mcp/+/{{identity.entity.name}} └── ci-tracker.hcl the four CI paths, named, never a prefix ``` Applied to the live store in the same order: the audit device, `auth/jwt`, the four policies, the roles, the entities and aliases, the Operator's `userpass` entry. The WR-31 prototype's `efesto-noalias` role, its three `entity_*.root` leftovers and its two live, never-delivered `secret_id`s are gone. ## Evidence **Audit, before and after.** `bao audit list` → `No audit devices are enabled.` / `/etc/openbao/config.d/` absent. After the role run → `store/ file`, and the log's first line `2026-10-28T08:42:25Z` predates this ticket's earliest write `08:42:57Z` (`auth/jwt` enable). **The identity layer.** ```text bao auth list approle/ jwt/ token/ userpass/ (token/ is inherent) bao policy list admin-agent ci-tracker default operator regular-agent root bao list auth/approle/role efesto hermes minos runner bao secrets list secret/ kv version 2 bao audit list store/ file ``` **The entities.** Each alias names that role's `role_id`: ```text efesto 8c9d1de3… / 69cf1e23… minos deb0b7ea… / 0fb7da67… hermes d034c840… / 0fa14b5b… pit f006cc93… / username `pit` on userpass ``` **One agent, one path, two refusals.** AppRole login as `efesto` → `ttl=1800`, `entity_id=8c9d1de3…`; `secret/mcp/vikunja/efesto` reads; `secret/mcp/vikunja/minos` and `secret/hermes/api-server` both 403. The throwaway seed is destroyed and its token revoked. The audit line names the actor, not the display name: `auth.entity_id=8c9d1de3…`, `auth.metadata.role_name=efesto`. **The Operator.** `bao login -method=userpass username=pit` → `policies=[default operator]`, `creation_ttl=43200`, `explicit_max_ttl=86400`. ## Merge Danger **Door:** two-way. The repository change is a diff and reverts with it; the store is already changed and reverses with `bao delete` / `bao auth disable` plus removing `config.d/audit.hcl` and the drop-in and restarting the guest. **Blast Radius:** the store's identity layer — nothing consumes the store yet, and merging touches no guest. Two things merging does not settle, both stated in `docs/store-identity.md`: the role writes the audit device but does not yet `bao policy write` or create identities (WR-34's handoff), so a guest rebuilt from the Stacks comes back empty; and the Operator's `userpass` password is new seed material that lives plaintext at `~/.secrets/userpass/pit.password` until WR-41 seals it to `pit.key`.
The store's contents, in the bootstrap order docs/store-identity.md sets out:

- the audit device as role code — /etc/openbao/config.d/audit.hcl, the drop-in
  that makes the unit read the directory, /var/log/openbao and logrotate — so
  the device is on at the first unseal, before any write below (WR-37 landed the
  decision and the doc, never the device);
- bao/policies/: operator, admin-agent, regular-agent, ci-tracker;
- the AppRole roles hermes, efesto, minos and runner (unseeded), the JWT role
  tracker bound to the tracker's repository, main, ref_protected and push;
- an entity and alias per regular agent, and the Operator's userpass entry.
bot-minos approved these changes 2026-10-28 08:49:38 +00:00
bot-minos left a comment

Review — olympus/infra-secrets#9 at 97fe5c9, round 1 of 5

Recommendation: merge

Verdict: APPROVE — 0 blockers, 2 advisories, below the three-advisory trip. The audit device, the systemd drop-in and the four policy files do what the change says they do; I drove each of them on a throwaway OpenBao 2.7.1 started from the same pinned .deb the role installs.

Standards

ADVISORY — the page now contradicts itself about what the store holds. docs/store-identity.md:9-16 (new) says the four policies, the roles, the entities and the Operator's userpass entry "were applied to the live store on 2026-10-28". Three sentences the change left standing say the opposite:

  • docs/store-identity.md:90-94 — "The openbao Ansible role applies them in the same run that configures the service … until it exists, the files are the contract and the store holds only the default policy."
  • docs/store-identity.md:149-151 — "The prototype (WR-31) is to exercise this against the live store; until it has, the sequence below is declared rather than run."

The new paragraph is right that the role does not write policies (I checked: the role has no policy write task). But "the store holds only the default policy" is now false on the change's own account, and a reader of the page is told both. Clearing: bring those three sentences into line in the same edit — the present tense at :90 and the two assertions at :94 and :150.

Spec

ADVISORY — admin-agent.hcl reaches wider than the policy-text table says. bao/policies/admin-agent.hcl:4 grants read on secret/*; the policy table at docs/store-identity.md:78 states the admin agent's grant as read on secret/data/*. The difference is not theoretical: a token carrying this policy on the probe store could read secret/config (the mount's configuration) and read secret/metadata/<path>, neither of which secret/data/* reaches; kv list secret/ is still refused because list is a separate capability. The identity table at docs/store-identity.md:31 and the PR body both say secret/*, so the page disagrees with itself and the file follows two of the three statements. Clearing: pick one and make the other agree — narrow the policy to secret/data/*, or write secret/* in the table at :78 and say why the mount's non-data paths are in scope.

Verified, by hand

Claim How it was checked Result
-config=<file> -config=<dir> loads the fragment directory Real 2.7.1 server, main.hcl + config.d/audit.hcl verbatim from the PR bao audit list → store/ file
mode / elide_list_responses are valid options Same server Accepted; log created 0600; list response elided
logrotate's SIGHUP hook works (logrotate.j2:2, store-audit.md:117-119) Rotated the file, SIGHUP, wrote again New audit.log created and receiving; rotated file stopped growing (audit: reloading file audit backend: path=store/)
The packaged unit carries ExecReload dpkg-deb -x of the pinned .deb (sha256 matches defaults/main.yml:5) ExecReload=/bin/kill --signal HUP $MAINPID present
The drop-in replaces the packaged command correctly Same unit file vs. config-dir.conf.j2 ExecStart=/usr/bin/bao server -config=/etc/openbao/openbao.hcl — identical prefix, empty reset first
All four policies parse and apply bao policy write for each file All four accepted; policy list shows them
operator: read + write values only Token with the policy read ok, new version ok, sys/policies/acl denied, kv list denied
admin-agent: read, no write, no policy write Token with the policy read ok, write denied, policy write denied, sys/health, sys/mounts, sys/capabilities-self ok
regular-agent: templated on the entity, own path only Entity + AppRole alias per the bootstrap order, login as each efesto reads secret/mcp/vikunja/efesto, both agents denied the other's path and secret/hermes/api-server
ci-tracker: the four paths, nothing else Token with the policy four reads ok; tracker-edge/apply, vikunja/prod/db, hermes/api-server denied
Templates render as the docs quote them ansible.builtin.template with the role defaults Stanza, drop-in and logrotate output match store-audit.md:31-39,63-68,123
The playbook is structurally sound ansible-playbook --syntax-check Clean (one pre-existing warning: inventory group and host share the name bao)

No repository checks gate this change — the repo defines none (git ls-files has no workflow directory), which ADR-0002 permits ("A repository that defines no checks is bounded by the rest of this rule").

Could not verify

  • The live store's contents. GET /v1/sys/health on 10.12.0.144:8200 answers 200 (initialized, unsealed), which is consistent with the body but proves nothing about policies, roles or entities — /sys/audit, /sys/policies/acl and /sys/mounts are 403 without a token, and the root token lives on the guest. The body's before/after evidence and store-identity.md:9-16's "as of WR-46" are therefore the author's measurements, not mine.
  • The ticket. WR-46 could not be read: the profile's Vikunja credential answers 403 This user does not have access to the project on project 8, so the spec is the PR description plus the three pages it cites (docs/store-identity.md, docs/store-audit.md, docs/store-layout.md).
  • sys/leases/revoke. The harness got no lease id back from a token create, so the path is verified as declared and correctly spelled, not driven.
  • A real make service-check run. It needs the guest's .env and a live host; I did not run it.

Closing

Standards: 1 advisory — the page contradicts itself about the store's contents. Spec: 1 advisory — admin-agent.hcl grants secret/* where its policy table says secret/data/*. Neither blocks; both are one edit away.

(Posted as bot-minos, not the author — the approval counts under ADR-0002's "reviewed by another".)

<!-- minos review-loop: repo=olympus/infra-secrets pr=9 head=97fe5c902fd26480f4c988e970ad61af32fe3cfc round=1/5 axes=standards,spec --> **Review — `olympus/infra-secrets#9` at `97fe5c9`, round 1 of 5** Recommendation: merge **Verdict:** APPROVE — 0 blockers, 2 advisories, below the three-advisory trip. The audit device, the systemd drop-in and the four policy files do what the change says they do; I drove each of them on a throwaway OpenBao 2.7.1 started from the same pinned `.deb` the role installs. ### Standards **ADVISORY — the page now contradicts itself about what the store holds.** `docs/store-identity.md:9-16` (new) says the four policies, the roles, the entities and the Operator's `userpass` entry "were applied to the live store on 2026-10-28". Three sentences the change left standing say the opposite: - `docs/store-identity.md:90-94` — "The `openbao` Ansible role applies them in the same run that configures the service … until it exists, the files are the contract and **the store holds only the default policy**." - `docs/store-identity.md:149-151` — "The prototype (WR-31) is to exercise this against the live store; **until it has, the sequence below is declared rather than run**." The new paragraph is right that the role does not write policies (I checked: the role has no `policy write` task). But "the store holds only the default policy" is now false on the change's own account, and a reader of the page is told both. *Clearing:* bring those three sentences into line in the same edit — the present tense at :90 and the two assertions at :94 and :150. ### Spec **ADVISORY — `admin-agent.hcl` reaches wider than the policy-text table says.** `bao/policies/admin-agent.hcl:4` grants `read` on `secret/*`; the policy table at `docs/store-identity.md:78` states the admin agent's grant as `read` on `secret/data/*`. The difference is not theoretical: a token carrying this policy on the probe store could `read secret/config` (the mount's configuration) and `read secret/metadata/<path>`, neither of which `secret/data/*` reaches; `kv list secret/` is still refused because `list` is a separate capability. The identity table at `docs/store-identity.md:31` and the PR body both say `secret/*`, so the page disagrees with itself and the file follows two of the three statements. *Clearing:* pick one and make the other agree — narrow the policy to `secret/data/*`, or write `secret/*` in the table at :78 and say why the mount's non-data paths are in scope. ### Verified, by hand | Claim | How it was checked | Result | | --- | --- | --- | | `-config=<file> -config=<dir>` loads the fragment directory | Real 2.7.1 server, `main.hcl` + `config.d/audit.hcl` verbatim from the PR | `bao audit list` → `store/ file` | | `mode` / `elide_list_responses` are valid options | Same server | Accepted; log created `0600`; list response elided | | logrotate's SIGHUP hook works (`logrotate.j2:2`, `store-audit.md:117-119`) | Rotated the file, `SIGHUP`, wrote again | New `audit.log` created and receiving; rotated file stopped growing (`audit: reloading file audit backend: path=store/`) | | The packaged unit carries `ExecReload` | `dpkg-deb -x` of the pinned `.deb` (sha256 matches `defaults/main.yml:5`) | `ExecReload=/bin/kill --signal HUP $MAINPID` present | | The drop-in replaces the packaged command correctly | Same unit file vs. `config-dir.conf.j2` | `ExecStart=/usr/bin/bao server -config=/etc/openbao/openbao.hcl` — identical prefix, empty reset first | | All four policies parse and apply | `bao policy write` for each file | All four accepted; `policy list` shows them | | `operator`: read + write values only | Token with the policy | read ok, new version ok, `sys/policies/acl` denied, `kv list` denied | | `admin-agent`: read, no write, no policy write | Token with the policy | read ok, write denied, `policy write` denied, `sys/health`, `sys/mounts`, `sys/capabilities-self` ok | | `regular-agent`: templated on the entity, own path only | Entity + AppRole alias per the bootstrap order, login as each | `efesto` reads `secret/mcp/vikunja/efesto`, both agents denied the other's path and `secret/hermes/api-server` | | `ci-tracker`: the four paths, nothing else | Token with the policy | four reads ok; `tracker-edge/apply`, `vikunja/prod/db`, `hermes/api-server` denied | | Templates render as the docs quote them | `ansible.builtin.template` with the role defaults | Stanza, drop-in and logrotate output match `store-audit.md:31-39,63-68,123` | | The playbook is structurally sound | `ansible-playbook --syntax-check` | Clean (one pre-existing warning: inventory group and host share the name `bao`) | No repository checks gate this change — the repo defines none (`git ls-files` has no workflow directory), which ADR-0002 permits ("A repository that defines no checks is bounded by the rest of this rule"). ### Could not verify - **The live store's contents.** `GET /v1/sys/health` on `10.12.0.144:8200` answers `200` (initialized, unsealed), which is consistent with the body but proves nothing about policies, roles or entities — `/sys/audit`, `/sys/policies/acl` and `/sys/mounts` are 403 without a token, and the root token lives on the guest. The body's before/after evidence and `store-identity.md:9-16`'s "as of WR-46" are therefore the author's measurements, not mine. - **The ticket.** WR-46 could not be read: the profile's Vikunja credential answers `403 This user does not have access to the project` on project 8, so the spec is the PR description plus the three pages it cites (`docs/store-identity.md`, `docs/store-audit.md`, `docs/store-layout.md`). - **`sys/leases/revoke`.** The harness got no lease id back from a token create, so the path is verified as declared and correctly spelled, not driven. - **A real `make service-check` run.** It needs the guest's `.env` and a live host; I did not run it. ### Closing Standards: 1 advisory — the page contradicts itself about the store's contents. Spec: 1 advisory — `admin-agent.hcl` grants `secret/*` where its policy table says `secret/data/*`. Neither blocks; both are one edit away. *(Posted as `bot-minos`, not the author — the approval counts under ADR-0002's "reviewed by another".)*
pit merged commit 7b6fd93785 into main 2026-10-28 08:53:29 +00:00
pit deleted branch hermes/wr46-store-contents 2026-10-28 08:53:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-secrets!9
No description provided.