Skip to content

Commit

Permalink
Merge pull request #159 from kids-first/raw-strings
Browse files Browse the repository at this point in the history
♻️ Read secrets as raw strings
  • Loading branch information
dankolbman authored Mar 14, 2019
2 parents caffa90 + 9232f7a commit d5183f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/load_vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ if [[ -n $VAULT_ADDR ]] && [[ -n $VAULT_ROLE ]]; then
# Get redis password
if [[ -n $REDIS_SECRET ]] ; then
echo "Load redis secret from vault"
pw=$(vault read -format=json ${REDIS_SECRET} | jq -c '.password')
pw=$(vault read -format=json ${REDIS_SECRET} | jq -c -r '.password')

export REDIS_PASS=$pw
fi

# Get ego secret
if [[ -n $EGO_SECRET ]] ; then
echo "Load ego secret from vault"
client=$(vault read -format=json ${EGO_SECRET} | jq -c '.data.client_id')
secret=$(vault read -format=json ${EGO_SECRET} | jq -c '.data.client_secret')
client=$(vault read -format=json ${EGO_SECRET} | jq -c -r '.data.client_id')
secret=$(vault read -format=json ${EGO_SECRET} | jq -c -r '.data.client_secret')

export EGO_CLIENT_ID=$client
export EGO_SECRET=$secret
Expand Down

0 comments on commit d5183f9

Please sign in to comment.