Repository URL to install this package:
|
Version:
0.0.0-faef1d756148d5 ▾
|
#!/usr/bin/env bash
# Login to a specified vault address $1
# and fetch the keycloakClientSecret for the specified target $2
unset VAULT_ADDR
unset VAULT_TOKEN
export VAULT_ADDR=$1
vault login -method=oidc port=8200
# Add something unique to the output so can strip the output from the above commands
# and be left with the resulting output from the vault read command below.
# DO NOT EDIT THE NEXT LINE BELOW unless you also update the string to `split()`
# against in api/vault.js getKeycloakClientSecret()
echo "keycloakClientSecret"
vault read -field=keycloakClientSecret secret/doodle/$2/doodle-node-cli/secrets