ci: read the blocks credential from OpenBao instead of a stored secret #139
No reviewers
Labels
No labels
build-dist
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design!139
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/bao-approle-checkout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #138. The gate needs the block definitions from the private
Toilville_Rituals, and asked for aCI_TOKENActions secret that exists on neither repo. Rather than park a long-lived secret in Actions, fetch the credential at run time — the forge's own pattern, and the one the Rituals workflows already use for Sentry.The ci-runner AppRole (the
CI_VAULT_*org secrets) logs in to OpenBao and readssecret/forge/rituals-read, whose token belongs toci-rituals-reader— an account with read onToilville_Ritualsand nothing else. Same shape assecret/forge/forge-kv-cache-read. Nothing long-lived sits in Actions, the fetch is audited through bastia, and a leak reads one repository.Scope
.forgejo/actions/bastia-secret/— the credential-broker action, copied verbatim fromToilville_Rituals@11220e9. Copied rather than referenced becauseuses: ./…resolves inside the repo running the workflow, and reaching the original would require the very checkout this credential is for.README.mdrecords the provenance; the honest fix is a shared actions repository, worth doing if a third repo needs it..forgejo/workflows/block-validation.yml— fetch the token, check out with it, and dropCI_TOKEN. The error message now names the OpenBao path and the AppRole secrets.ref:. It claimed checkout without a ref looks for the current branch in the sibling repository. It does not — it uses that repository's default branch, and the failure it blamed was the token's scope. The pin stays, for the real reason: validate against the branch the site deploys from.Testing
yamllint,test_workflow_invariants.py(57 passing), and a grep confirming no expression appears inside arun:comment — one of those took the whole workflow down in #137.secret/forge/rituals-readholds a token that can read the repository. Provisioningci-rituals-readeris blocked on an unrelated bug:forgejo:admingrants have been unapprovable since 2026-09-07, becauseritual-consumerinserts the pending grant withON CONFLICTinto what migration20260907_0045made a view. Fix merged in ritual-engine #622; it needs a build and deploy.Impact Statement
CI only — no change to any generated artifact, the theme, or the site. Removes a dependency on an Actions secret that was never created, in favour of a short-lived token fetched per run. Until
ci-rituals-readerexists the job still fails, and says exactly what is missing.