vault/policies/service-forgejo.hcl: path glob misses exact secret path #900
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#900
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Flagged by AI reviewer in PR #897.
Problem
The policy at
vault/policies/service-forgejo.hclgrants:But the consul-template stanza in
nomad/jobs/forgejo.hclreads:Vault glob
/*requires at least one path segment afterforgejo/(e.g.forgejo/subkey). It does not match the bare pathkv/data/disinto/shared/forgejothat the template actually calls. Vault ACL longest-prefix matching:forgejo/*is never hit for a request toforgejo.Runtime consequence: consul-template
withblock receives a 403 permission denied → evaluates to empty (false) →elsebranch rendersseed-meplaceholder values → Forgejo starts with obviously-wrong secrets despitevault-seed-forgejo.shhaving run successfully.Fix
Replace the glob with an exact path in
vault/policies/service-forgejo.hcl:(The
/*glob is only useful if future subkeys are written underforgejo/; the current design stores both secrets in a single KV document at theforgejopath.)This is a pre-existing defect in
vault/policies/service-forgejo.hcl; that file was not changed by PR #897.Auto-created from AI review
Affected files
vault/policies/service-forgejo.hcl— replace glob path with exact path + metadata pathAcceptance criteria
vault/policies/service-forgejo.hclgrants exact pathkv/data/disinto/shared/forgejo(notforgejo/*)kv/metadata/disinto/shared/forgejois also granted read+listwith secret "kv/data/disinto/shared/forgejo"resolves without 403 (verified viavault policy read service-forgejo)shellcheckclean (no shell changes expected)