fix: [nomad-step-2] S2.3 — vault-nomad-auth.sh (enable JWT auth + roles + nomad workload identity) (#881) #895
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#895
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-881"
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?
Fixes #881
Changes
AI Review
Documentation consistency (lib/AGENTS.md) — blockers
The PR adds a new public function, a new init script, and starts sourcing a module that was previously marked as scaffolding-only. All three are behavioral changes that lib/AGENTS.md describes and must be updated in the same PR (formula step 3b).
blocker
lib/AGENTS.md:37(hvault.sh row):hvault_get_or_empty(PATH)is a new public function — it must appear in the function list in the Sourced-by row. Every other public function is listed; this one isn't.blocker
lib/AGENTS.md:37(hvault.sh row): The Sourced-by cell currently says "Not sourced at runtime yet — pure scaffolding for Nomad+Vault migration (#799)". After this PR, hvault.sh is sourced by three scripts:lib/init/nomad/vault-nomad-auth.sh,tools/vault-apply-roles.sh, andtools/vault-apply-policies.sh. The claim is now false and must be updated.blocker
lib/AGENTS.md:38(lib/init/nomad/ row): The row lists six Step-0 installer scripts by name but says nothing aboutvault-nomad-auth.sh(Step 2, added in this PR). Every other file in that directory is named and described; the new file must be added.Fix: Update the hvault.sh row to add
hvault_get_or_empty(PATH)to the function list and replace the 'not sourced at runtime' note with the three callers. Add a one-line description ofvault-nomad-auth.shto the lib/init/nomad/ row.Non-blocking comment
lib/init/nomad/vault-nomad-auth.sh:68:vaultappears in the binary precondition check (for bin in curl jq vault systemctl) but is never called — neither by the script itself nor by any hvault.sh function (all are curl-based). On a box with the Vault server but no vault CLI this check would die spuriously. Consider droppingvaultfrom the list, or add an inline comment explaining why it's expected to be present.Verdict
REQUEST_CHANGES — lib/AGENTS.md not updated: hvault_get_or_empty undocumented, vault-nomad-auth.sh unlisted, and hvault.sh 'not sourced at runtime' claim now false
Reviewed at
8efef9f| AGENTS.mdAI Review: REQUEST_CHANGES — lib/AGENTS.md not updated: hvault_get_or_empty undocumented, vault-nomad-auth.sh unlisted, and hvault.sh 'not sourced at runtime' claim now false
AI Re-review (round 2)
Previous Findings
lib/AGENTS.md:37—hvault_get_or_empty(PATH)not in function list → FIXED: added with full description including the 404/errexit rationalelib/AGENTS.md:37— hvault.sh "not sourced at runtime" claim was false → FIXED: sourced-by cell now lists all three callers (tools/vault-apply-policies.sh,tools/vault-apply-roles.sh,lib/init/nomad/vault-nomad-auth.sh)lib/AGENTS.md:38—vault-nomad-auth.shunlisted → FIXED: row now names and describes the Step-2 script with its responsibilitiesvault-nomad-auth.sh:68—vaultCLI in binary check but never invoked → FIXED: removed from thefor bin inloop; comment added explaining why the vault CLI is intentionally excludedVerdict
APPROVE — All three documentation blockers closed; vault CLI spurious-fail fixed; no new issues in fixup hunks
Reviewed at
b2c86c3| Previous:8efef9f| AGENTS.mdAI Re-review (round 2): APPROVE — All three documentation blockers closed; vault CLI spurious-fail fixed; no new issues in fixup hunks