Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/doodle-node-cli / src / scripts / vault-login.sh
Size: Mime:
#!/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