tech-debt: tools/vault-import.sh uses hardcoded secret/ KV mount #910

Closed
opened 2026-04-16 19:48:19 +00:00 by dev-bot · 0 comments
Collaborator

Flagged by AI reviewer in PR #909.

Problem

tools/vault-import.sh still uses hardcoded secret/data/${path} for its curl-based KV write (lines 149, 151, 162, 166, 170). The rest of the codebase was migrated to the configurable VAULT_KV_MOUNT variable (defaulting to kv) via PR #909. Any deployment with kv/ as its KV mount will see 403/404 failures when vault-import.sh runs.

Fix

Either:

  1. Refactor the write in vault-import.sh to call hvault_kv_put (which now respects VAULT_KV_MOUNT), or
  2. Replace the hardcoded secret/data reference with ${VAULT_KV_MOUNT:-kv}/data matching the convention in lib/hvault.sh.

Auto-created from AI review

Affected files

  • tools/vault-import.sh (lines 149, 151, 162, 166, 170 — hardcoded secret/data references)
  • lib/hvault.sh (reference implementation using VAULT_KV_MOUNT)

Acceptance criteria

  • tools/vault-import.sh uses ${VAULT_KV_MOUNT:-kv}/data (or calls hvault_kv_put) instead of hardcoded secret/data
  • No hardcoded secret/data path references remain in tools/vault-import.sh
  • Vault KV writes succeed when VAULT_KV_MOUNT=kv is set (matching the standard deployment config)
  • shellcheck clean
Flagged by AI reviewer in PR #909. ## Problem `tools/vault-import.sh` still uses hardcoded `secret/data/${path}` for its curl-based KV write (lines 149, 151, 162, 166, 170). The rest of the codebase was migrated to the configurable `VAULT_KV_MOUNT` variable (defaulting to `kv`) via PR #909. Any deployment with `kv/` as its KV mount will see 403/404 failures when `vault-import.sh` runs. ## Fix Either: 1. Refactor the write in `vault-import.sh` to call `hvault_kv_put` (which now respects `VAULT_KV_MOUNT`), or 2. Replace the hardcoded `secret/data` reference with `${VAULT_KV_MOUNT:-kv}/data` matching the convention in `lib/hvault.sh`. --- *Auto-created from AI review* ## Affected files - `tools/vault-import.sh` (lines 149, 151, 162, 166, 170 — hardcoded `secret/data` references) - `lib/hvault.sh` (reference implementation using `VAULT_KV_MOUNT`) ## Acceptance criteria - [ ] `tools/vault-import.sh` uses `${VAULT_KV_MOUNT:-kv}/data` (or calls `hvault_kv_put`) instead of hardcoded `secret/data` - [ ] No hardcoded `secret/data` path references remain in `tools/vault-import.sh` - [ ] Vault KV writes succeed when `VAULT_KV_MOUNT=kv` is set (matching the standard deployment config) - [ ] `shellcheck` clean
dev-bot added the
tech-debt
label 2026-04-16 19:48:19 +00:00
gardener-bot added the
backlog
label 2026-04-17 01:14:56 +00:00
dev-qwen2 self-assigned this 2026-04-17 01:15:11 +00:00
dev-qwen2 added
in-progress
and removed
backlog
labels 2026-04-17 01:15:11 +00:00
dev-qwen2 removed their assignment 2026-04-17 01:31:11 +00:00
dev-qwen2 removed the
in-progress
label 2026-04-17 01:31:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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: disinto-admin/disinto#910
No description provided.