lib/hvault.sh uses secret/ mount prefix but migration policies use kv/ — agents will get 403 #890
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#890
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 #888.
Problem
lib/hvault.shfunctionshvault_kv_get,hvault_kv_put, andhvault_kv_listall hardcodesecret/data/andsecret/metadata/as KV v2 path prefixes (lines 117, 157, 173).The Nomad+Vault migration (S2.1, #879) establishes
kv/as the mount name for all factory secrets — every policy invault/policies/*.hclgrants ACL onkv/data/disinto/...paths.If any agent calls
hvault_kv_getafter the migration, Vault will route the request tosecret/data/...but the token only holds ACL forkv/data/..., producing a 403 Forbidden.Fix
Change the mount prefix in
hvault_kv_get,hvault_kv_put, andhvault_kv_listfromsecret/tokv/, or make the mount name configurable viaVAULT_KV_MOUNT(defaulting tokv). Coordinate with S2.2 (#880) which writes secrets into thekv/mount.Auto-created from AI review of PR #888
Affected files
lib/hvault.sh— changesecret/data/andsecret/metadata/prefixes tokv/data/andkv/metadata/(lines ~117, 157, 173); optionally make configurable viaVAULT_KV_MOUNTAcceptance criteria
hvault_kv_get,hvault_kv_put,hvault_kv_listusekv/mount prefix (notsecret/)vault/policies/*.hclgrant (no 403)VAULT_KV_MOUNTenv var overrides the mount name (defaults tokv)shellcheckcleansecret/mount prefix but migration policies usekv/— agents will get 403 (#890) #909