Skip to content

HashiCorp Vault

HashiCorp Vault is the centralised secrets management system for the roche-data pipeline. All credentials, API tokens, connection strings, and sensitive configuration are stored in Vault and loaded at runtime. No secrets are committed to git or stored in environment files — Vault is the single source of truth for all sensitive data.

PropertyValue
URLhttps://vault.service.roche.com
Namespacerdt-model-prd
Version1.20.4+ent (HA cluster vtl, AWS KMS auto-unseal)
Auth method (human)OIDC via PingFederate
Auth method (CI/CD)JWT/OIDC (zero secrets — GitHub-issued tokens)
NetworkRoche corporate network (VPN required)
Access taskA00 (Foundation)
GitHub issue#70
CIDM groupGLOHVAULT_MODEL
UsersRXPMODE1, RXPMODE2
VariableSourceDescription
VAULT_ADDRShell / CI configVault server URL (https://vault.service.roche.com)
VAULT_NAMESPACEShell / CI configTarget namespace (rdt-model-prd)
VAULT_ROLE_IDGitHub EnvironmentsAppRole role ID (per environment)
VAULT_SECRET_IDGitHub EnvironmentsAppRole secret ID (per environment)
EnvironmentRole ID
devd8384621-af67-6ce6-7f8b-d3e69b1a9472
testbf51590d-f724-9a08-bc33-7680f26f79a5
prodd9162e97-40c0-3271-9484-48030e236c70
PathContents
secret/common/projectProject-wide configuration (9 keys)
secret/common/rtisRTiS base URL, timeout
secret/common/gupriGUPRI base URL, URI prefix
secret/common/collibraCollibra base URL
secret/common/mrhubMRHub base URL
secret/common/mulesoftMulesoft base URL
secret/common/servicenowServiceNow base URL
secret/common/sinequaSinequa base URL
secret/common/leanixLeanIX base URL
secret/common/data-marketplaceData Marketplace base URL
secret/common/githubGitHub configuration
secret/common/caasCaaS/Rancher connection details
Path patternContents
secret/{env}/snowflakeSnowflake OAuth credentials (17 keys)
secret/{env}/rtisRTiS service account credentials
secret/{env}/collibraMulesoft proxy credentials for Collibra
secret/{env}/solaceBroker credentials per environment
secret/{env}/caasNamespace and cluster per environment
secret/{env}/ciCI/CD pipeline secrets

Vault is not consumed by a specific CLI module — it provides credentials for all modules:

ConsumerUsage
scripts/vault-env.shLoads all secrets into shell environment for local development
GitHub ActionsAppRole login in each workflow for CI/CD
All CLI modulesRead credentials from environment variables (loaded from Vault)

Script: scripts/access/check-vault.sh

Required tools: vault (HashiCorp CLI v1.20.4+ent)

Install: wget -qO- https://releases.hashicorp.com/vault/1.20.4+ent/vault_1.20.4+ent_linux_amd64.zip | funzip > /usr/local/bin/vault && chmod +x /usr/local/bin/vault

Checks performed:

  1. Token validity and lookup
  2. Read access to secret/dev and secret/common
  3. Read access to critical paths: secret/dev/snowflake, secret/dev/rtis, secret/common/project
  4. Write access test (creates/deletes secret/dev/_access_check_test)
  5. Token TTL display
Terminal window
export VAULT_ADDR=https://vault.service.roche.com
export VAULT_NAMESPACE=rdt-model-prd
vault login -method=oidc -address=https://vault.service.roche.com -namespace=rdt-model-prd

This opens a browser for PingFederate SSO. After completion, the token is cached locally.

Terminal window
export VAULT_ADDR=https://vault.service.roche.com
export VAULT_NAMESPACE=rdt-model-prd
vault write auth/approle/login \
role_id="$VAULT_ROLE_ID" \
secret_id="$VAULT_SECRET_ID"
Terminal window
source scripts/vault-env.sh dev

This script authenticates to Vault (OIDC if no token cached), reads all secret paths for the target environment, and exports them as shell environment variables.

  1. Initial population: Vault paths are created during namespace setup; values are TBD until the corresponding access task resolves
  2. Credential rotation: Update the specific Vault path; no code changes needed
  3. New system onboarding: Add a secret/common/{system} path with base config, add secret/{env}/{system} for environment-specific credentials
  4. CI/CD consumption: GitHub Actions workflow uses AppRole login, reads required paths, sets environment variables for the step
  • Old URL: vault.service.infra.roche.com:8200 — do not use, all references updated to vault.service.roche.com