Skip to content

feat: add automatic Vault secret loading for local E2E testing#90

Merged
jrichter1 merged 5 commits intomainfrom
local-vault
Apr 22, 2026
Merged

feat: add automatic Vault secret loading for local E2E testing#90
jrichter1 merged 5 commits intomainfrom
local-vault

Conversation

@subhashkhileri
Copy link
Copy Markdown
Member

@subhashkhileri subhashkhileri commented Apr 22, 2026

JIRA: https://redhat.atlassian.net/browse/RHIDP-13050

Summary

  • Adds loadLocalVaultSecrets() in src/utils/vault.ts — fetches secrets from
    Vault during globalSetup when VAULT=1 or VAULT=true
  • Handles OIDC login automatically, fetches global + per-workspace secrets
    concurrently
  • Only exports keys starting with VAULT_, skips secretsync/ metadata keys
  • Logs key names only (never values), shows Slack channel #rhdh-e2e-tests on
    permission denied
  • Configurable via VAULT_ADDR and VAULT_BASE_PATH env vars

Usage

# From workspace
yarn test:vault
# or
VAULT=1 yarn test

# From repo root
VAULT=1 ./run-e2e.sh -w argocd

Add loadLocalVaultSecrets() to globalSetup that fetches secrets from
HashiCorp Vault when VAULT=1 or VAULT=true is set. Handles OIDC login,
fetches global and per-workspace secrets, and injects VAULT_* keys into
process.env. Logs permission denied with Slack channel for access requests.
@jrichter1 jrichter1 merged commit 69cc164 into main Apr 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants