Skip to content

Commit

Permalink
DRIVERS-2415 Use a certfile for Azure OIDC login
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 28, 2024
1 parent fecfe59 commit 329f6eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .evergreen/auth_oidc/azure/create-and-setup-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pushd $SCRIPT_DIR
# Set defaults.
export AZUREKMS_PUBLICKEYPATH="$SCRIPT_DIR/keyfile.pub"
export AZUREKMS_PRIVATEKEYPATH="$SCRIPT_DIR/keyfile"
export AZUREKMS_CERTFILE="$SCRIPT_DIR/cert.pem"
export AZUREKMS_VMNAME_PREFIX=$AZUREOIDC_VMNAME_PREFIX
export AZUREOIDC_ENVPATH="$SCRIPT_DIR/env.sh"
export AZUREKMS_IMAGE=${AZUREOIDC_IMAGE:-"Debian:debian-11:11:0.20221020.1174"}
Expand All @@ -27,8 +28,12 @@ if [ ! -f ./secrets-export.sh ]; then
fi
source ./secrets-export.sh

echo "${AZUREOIDC_CERT}" | base64 --decode > $AZUREKMS_CERTFILE
# Set 600 permissions on cert file. Otherwise ssh / scp may error with permissions "are too open".
chmod 600 $AZUREKMS_CERTFILE

export AZUREKMS_TENANTID=$AZUREOIDC_TENANTID
export AZUREKMS_SECRET=$AZUREOIDC_SECRET
export AZUREKMS_SECRET=$AZUREKMS_CERTFILE
export AZUREKMS_CLIENTID=$AZUREOIDC_APPID

# Login.
Expand Down

0 comments on commit 329f6eb

Please sign in to comment.