The store declares the OpenBao Guest Stack's state record (SC-18) #15

Merged
pit merged 1 commit from hermes/SC-18-openbao-state-policies into main 2026-11-04 17:08:26 +00:00
Owner

The store's half of SC-18 (infra-secrets' Guest Stack keeps its state in the store). The consuming half is the infra-secrets pull request on branch hermes/sc18-openbao-state-in-the-store, and per ADR-0006 the owner's half lands first.

What lands

  • silo/store/openbao-state-policy.json — apply key: list the tfstate bucket, and read/write/delete on prod/openbao.tfstate and the .tflock beside it, nothing else.
  • silo/store/openbao-plan-state-policy.json — plan key: list the bucket, s3:GetObject on the record, and write reach over the lock alone. The record is never writable with it.

Both are the forge-guest pair with the object name swapped, so a review can diff them mechanically:

$ diff <(sed 's/forge-guest/openbao/g' silo/store/forge-guest-state-policy.json) silo/store/openbao-state-policy.json \
  && diff <(sed 's/forge-guest/openbao/g' silo/store/forge-guest-plan-state-policy.json) silo/store/openbao-plan-state-policy.json \
  && echo identical
identical

Bookkeeping: runbook 0003 §7 gains the two rows (six Stacks outside this repository, thirteen mints), the README's enumeration of plan-only keys gains this one, and key-audit.test.sh's green case gains a key holding each file.

Verification

$ mise exec -- make check
Success! The configuration is valid.
$ mise exec -- make key-audit-test
ok      the openbao apply key matches its own file
ok      the openbao plan key matches its own file
ok      every listed key is counted as audited
key-audit-test: every case passed

The test is a real check: with openbao-plan-state-policy.json hidden, the green case reds on the unmatched key and on the count.

Not this PR's to do

The mint (tofu-state-openbao, tofu-plan-state-openbao) needs the store's root credential and is the Operator's, with the consuming repository's docs/guest-state.md §1 as the row-by-row. Until it is minted, nothing reads these policies.

The store's half of **SC-18** (`infra-secrets`' Guest Stack keeps its state in the store). The consuming half is the `infra-secrets` pull request on branch `hermes/sc18-openbao-state-in-the-store`, and per ADR-0006 the owner's half lands first. ## What lands - `silo/store/openbao-state-policy.json` — apply key: list the `tfstate` bucket, and read/write/delete on `prod/openbao.tfstate` and the `.tflock` beside it, nothing else. - `silo/store/openbao-plan-state-policy.json` — plan key: list the bucket, `s3:GetObject` on the record, and write reach over the lock alone. The record is never writable with it. Both are the `forge-guest` pair with the object name swapped, so a review can diff them mechanically: ``` $ diff <(sed 's/forge-guest/openbao/g' silo/store/forge-guest-state-policy.json) silo/store/openbao-state-policy.json \ && diff <(sed 's/forge-guest/openbao/g' silo/store/forge-guest-plan-state-policy.json) silo/store/openbao-plan-state-policy.json \ && echo identical identical ``` Bookkeeping: runbook 0003 §7 gains the two rows (six Stacks outside this repository, thirteen mints), the README's enumeration of plan-only keys gains this one, and `key-audit.test.sh`'s green case gains a key holding each file. ## Verification ``` $ mise exec -- make check Success! The configuration is valid. $ mise exec -- make key-audit-test ok the openbao apply key matches its own file ok the openbao plan key matches its own file ok every listed key is counted as audited key-audit-test: every case passed ``` The test is a real check: with `openbao-plan-state-policy.json` hidden, the green case reds on the unmatched key and on the count. ## Not this PR's to do The mint (`tofu-state-openbao`, `tofu-plan-state-openbao`) needs the store's root credential and is the Operator's, with the consuming repository's `docs/guest-state.md` §1 as the row-by-row. Until it is minted, nothing reads these policies.
feat: the store declares the OpenBao Guest Stack's state record (SC-18)
All checks were successful
pr-checks / check (pull_request) Successful in 16s
3b803d810d
infra-secrets' Guest Stack moves its state into this store. Two policy
files, in the shape every other record's take: an apply key that reads and
writes prod/openbao.tfstate and the .tflock beside it, and a plan key that
reads the record and writes only the lock.

- silo/store/openbao-state-policy.json, openbao-plan-state-policy.json.
- runbook 0003 §7: the record joins the table, six Stacks outside this
  repository, thirteen mints; each of these records arrives with its own
  backend.
- README: the plan-only keys it enumerates gain the OpenBao Guest's.
- key-audit.test.sh: a key holding each new policy audits green, and the
  green case reds when the plan file is missing.
Member

Review started (round 1/5) on 3b803d810d — reading the diff now.

**Review started** (round 1/5) on 3b803d810ddf5a1ada1cf0a58e1be5c3c9c43731 — reading the diff now.
bot-minos approved these changes 2026-11-04 17:06:29 +00:00
bot-minos left a comment

olympus/infra-silo#15 — reviewed head 3b803d810ddf5a1ada1cf0a58e1be5c3c9c43731 · round 1/5 · axes: standards, spec. First round, so there are no earlier findings to re-drive.

Recommendation: merge

What the change claims

The store declares the record for infra-secrets' OpenBao Guest Stack: two policy files under silo/store/ (an apply pair and a plan pair), runbook 0003 §7's rows and counts, the README's plan-key enumeration, and a green case per new file in key-audit.test.sh. The mint, the store write and the migration are the Operator's and explicitly out of scope.

Standards

Sources read at the reviewed head: AGENTS.md (§Docs, §Toolchain, §Pull requests), docs/agents/issue-tracker.md, docs/adr/0008, docs/adr/0009, and the org records olympus/workshop docs/adr/0006 and docs/adr/0008, fetched from the forge at main.

file:line finding
ADVISORY scripts/tests/key-audit.test.sh:153-161 The two added assertions pin the files' existence, not their reach. add_key builds the fixture's held policy with --slurpfile held "$repo/silo/store/openbao-…json", so the key's stored policy is the file under test, and key-audit.sh:178-183 matches on canonical content alone. Widening openbao-state-policy.json's object statement to arn:aws:s3:::tfstate/prod/* — the reach ADR-0008 exists to refuse — leaves make key-audit-test green (probe run: exit 0, "every case passed"). Advice: one case asserting the statements against literals would pin the thing a reviewer reads the file for. Not a blocker — the body claims only that hiding the file reds, which is true, and no sibling policy is content-pinned either.
ADVISORY scripts/key-audit.sh:177-183 Pre-existing and untouched here, but this change makes it load-bearing. The guard matches a key to the first file whose canonical policy equals it and never compares the key's mint name to the file's name. Probe: a key named tofu-state-openbao holding forge-guest-state-policy.json audits ok … ← silo/store/forge-guest-state-policy.json, 0 failing, exit 0. The fleet's earlier pairs differ in actions as well as resources; these two differ by one string, so a mint taken against the wrong pair is now the plausible mistake and the audit cannot see it.

No smell from the baseline earns a line: the change is two data files, five test lines, and prose.

Spec

Sources: SC-18 (infra-secrets, Vikunja project 8, task 277) with its hand-back comment, and the PR body's §What lands as the contract for this half.

claimed checked
apply policy: list tfstate, read/write/delete on prod/openbao.tfstate and the .tflock beside it, nothing else ✓ two statements read; bucket-level pair plus the two object ARNs only
plan policy: list the bucket, GetObject on the record, write reach over the lock alone; the record never writable ✓ statement 2 is GetObject on the record only; statement 3 carries the lock's three actions
both are the forge-guest pair with the object name swapped ✓ diff <(sed 's/forge-guest/openbao/g' …) … identical for both pairs
§7 gains the rows: six Stacks outside this repository, thirteen mints ✓ 13 table rows, 6 external records, and §7 mints 13 (the shown example plus "the same twelve more times")
the README's plan-key enumeration gains this one ✓ seven plan keys listed, matching the seven -plan-state-policy rows
the green case gains a key holding each file, and reds on the unmatched key and the count when the file is hidden ✓ 8 audited; with openbao-plan-state-policy.json removed the case fails 3 assertions, including the unmatched key and the count
the object key and bucket agree with the consuming half ✓ infra-secrets#25 bao/guest/backend.tf: bucket = "tfstate", key = "prod/openbao.tfstate"

No requirement missing, no scope creep, nothing implemented in a way that contradicts what was asked. SC-18's three acceptance criteria are consumer-side (tofu state list, an empty plan, no state file left) and wait on the Operator's mint and migration; the ticket's own hand-back assigns them there, so they are pending by design rather than missing here.

What I verified, and how

  • mise exec -- make check in a detached worktree at the reviewed head: exit 0, Success! The configuration is valid., no failing assertion in the env suite.
  • mise exec -- make key-audit-test: every case passed.
  • The mechanical-diff claim above, run verbatim for both pairs.
  • The red/green pair behind the body's "hiding the file reds" claim, and the two probes quoted in the advisories.
  • Head pinned three ways — refs/pull/15/head, git ls-remote, and the PR object's head.sha — all 3b803d81….

What I could not verify, and why

  • The mint, the store's enforcement of these policies, and the state migration: they need the store's root credential and belong to the Operator (SC-18 step 1). No key exists for either policy yet, so nothing exercises them.
  • Whether Silo refuses exactly the actions these policies omit. The sibling pairs are the precedent and were run against this store; I did not drive the store myself.

Summary

  • Standards: 0 blockers, 2 advisories. Worst: the new green case cannot fail for a wrong reach.
  • Spec: 0 blockers, 0 findings. Worst: none.
  • Verdict: merge. The recommendation turns on the findings' weight, not on their count: two advisories, both of them advice, and neither is dressed up as a defect.
<!-- minos review-loop: repo=olympus/infra-silo pr=15 head=3b803d810ddf5a1ada1cf0a58e1be5c3c9c43731 round=1/5 axes=standards,spec --> **olympus/infra-silo#15** — reviewed head `3b803d810ddf5a1ada1cf0a58e1be5c3c9c43731` · round 1/5 · axes: standards, spec. First round, so there are no earlier findings to re-drive. Recommendation: merge ## What the change claims The store declares the record for `infra-secrets`' OpenBao Guest Stack: two policy files under `silo/store/` (an apply pair and a plan pair), runbook 0003 §7's rows and counts, the README's plan-key enumeration, and a green case per new file in `key-audit.test.sh`. The mint, the store write and the migration are the Operator's and explicitly out of scope. ## Standards Sources read at the reviewed head: `AGENTS.md` (§Docs, §Toolchain, §Pull requests), `docs/agents/issue-tracker.md`, `docs/adr/0008`, `docs/adr/0009`, and the org records `olympus/workshop` `docs/adr/0006` and `docs/adr/0008`, fetched from the forge at `main`. | | file:line | finding | | --- | --- | --- | | ADVISORY | `scripts/tests/key-audit.test.sh:153-161` | The two added assertions pin the files' existence, not their reach. `add_key` builds the fixture's held policy with `--slurpfile held "$repo/silo/store/openbao-…json"`, so the key's stored policy *is* the file under test, and `key-audit.sh:178-183` matches on canonical content alone. Widening `openbao-state-policy.json`'s object statement to `arn:aws:s3:::tfstate/prod/*` — the reach ADR-0008 exists to refuse — leaves `make key-audit-test` green (probe run: exit 0, "every case passed"). Advice: one case asserting the statements against literals would pin the thing a reviewer reads the file for. Not a blocker — the body claims only that hiding the file reds, which is true, and no sibling policy is content-pinned either. | | ADVISORY | `scripts/key-audit.sh:177-183` | Pre-existing and untouched here, but this change makes it load-bearing. The guard matches a key to the first file whose canonical policy equals it and never compares the key's mint name to the file's name. Probe: a key named `tofu-state-openbao` holding `forge-guest-state-policy.json` audits `ok … ← silo/store/forge-guest-state-policy.json`, `0 failing`, exit 0. The fleet's earlier pairs differ in actions as well as resources; these two differ by one string, so a mint taken against the wrong pair is now the plausible mistake and the audit cannot see it. | No smell from the baseline earns a line: the change is two data files, five test lines, and prose. ## Spec Sources: SC-18 (`infra-secrets`, Vikunja project 8, task 277) with its hand-back comment, and the PR body's §What lands as the contract for this half. | claimed | checked | | --- | --- | | apply policy: list `tfstate`, read/write/delete on `prod/openbao.tfstate` and the `.tflock` beside it, nothing else | ✓ two statements read; bucket-level pair plus the two object ARNs only | | plan policy: list the bucket, `GetObject` on the record, write reach over the lock alone; the record never writable | ✓ statement 2 is `GetObject` on the record only; statement 3 carries the lock's three actions | | both are the `forge-guest` pair with the object name swapped | ✓ `diff <(sed 's/forge-guest/openbao/g' …) …` identical for both pairs | | §7 gains the rows: six Stacks outside this repository, thirteen mints | ✓ 13 table rows, 6 external records, and §7 mints 13 (the shown example plus "the same twelve more times") | | the README's plan-key enumeration gains this one | ✓ seven plan keys listed, matching the seven `-plan-state-policy` rows | | the green case gains a key holding each file, and reds on the unmatched key and the count when the file is hidden | ✓ `8 audited`; with `openbao-plan-state-policy.json` removed the case fails 3 assertions, including the unmatched key and the count | | the object key and bucket agree with the consuming half | ✓ `infra-secrets#25` `bao/guest/backend.tf`: `bucket = "tfstate"`, `key = "prod/openbao.tfstate"` | No requirement missing, no scope creep, nothing implemented in a way that contradicts what was asked. SC-18's three acceptance criteria are consumer-side (`tofu state list`, an empty plan, no state file left) and wait on the Operator's mint and migration; the ticket's own hand-back assigns them there, so they are pending by design rather than missing here. ## What I verified, and how - `mise exec -- make check` in a detached worktree at the reviewed head: exit 0, `Success! The configuration is valid.`, no failing assertion in the env suite. - `mise exec -- make key-audit-test`: every case passed. - The mechanical-diff claim above, run verbatim for both pairs. - The red/green pair behind the body's "hiding the file reds" claim, and the two probes quoted in the advisories. - Head pinned three ways — `refs/pull/15/head`, `git ls-remote`, and the PR object's `head.sha` — all `3b803d81…`. ## What I could not verify, and why - The mint, the store's enforcement of these policies, and the state migration: they need the store's root credential and belong to the Operator (SC-18 step 1). No key exists for either policy yet, so nothing exercises them. - Whether Silo refuses exactly the actions these policies omit. The sibling pairs are the precedent and were run against this store; I did not drive the store myself. ## Summary - **Standards: 0 blockers, 2 advisories.** Worst: the new green case cannot fail for a wrong reach. - **Spec: 0 blockers, 0 findings.** Worst: none. - **Verdict: merge.** The recommendation turns on the findings' weight, not on their count: two advisories, both of them advice, and neither is dressed up as a defect.
pit merged commit bc47281b36 into main 2026-11-04 17:08:26 +00:00
pit deleted branch hermes/SC-18-openbao-state-policies 2026-11-04 17:08:26 +00:00
Author
Owner

Minted (with the Operator's authorisation): tofu-state-openbao and tofu-plan-state-openbao, against the two policy files this PR adds, with the pairs written to secret/tofu-state/openbao/{apply,plan}. make key-audit against the live store: 16 key(s), 15 audited, 1 out of scope, 0 failing — both new keys match their file exactly, so nothing else drifted. The consuming PR is infra-secrets #25.

Minted (with the Operator's authorisation): `tofu-state-openbao` and `tofu-plan-state-openbao`, against the two policy files this PR adds, with the pairs written to `secret/tofu-state/openbao/{apply,plan}`. `make key-audit` against the live store: `16 key(s), 15 audited, 1 out of scope, 0 failing` — both new keys match their file exactly, so nothing else drifted. The consuming PR is `infra-secrets` #25.
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-silo!15
No description provided.