Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SECRET_NAME displayed in configure_aad.sh #1527

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions configure_aad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
set -e
AZHOP_CONFIG=config.yml
ANSIBLE_VARIABLES=playbooks/group_vars/all.yml
SECRET_NAME="azhop-oidc-password"

if [ ! -e $AZHOP_CONFIG ]; then
echo "$AZHOP_CONFIG doesn't exist, exiting"
Expand Down Expand Up @@ -41,9 +40,9 @@ if [ "$appId" == "" ]; then
--key-type password

appId=$(az ad app list --display-name $aadName --query [].appId -o tsv)
echo "Generating a password for $aadName and storing it as secret $SECRET_NAME in keyvault $key_vault"
current_password=$(az ad app credential reset --id $appId | jq -r '.password')
SECRET_NAME="$appId-password"
echo "Generating a password for $aadName and storing it as secret $SECRET_NAME in keyvault $key_vault"
az keyvault secret set --value "$current_password" --name $SECRET_NAME --vault-name $key_vault -o table > /dev/null
else
SECRET_NAME="$appId-password"
Expand Down