Skip to content

Commit 9856fa0

Browse files
authored
fix: experiment with gcloud auth token command (#4870)
`gcloud auth print-access-token` doesn't work if `gcloud auth application-default login` is used because it will take the user's auth token instead of the ADC one. This is to test if a fix will have unanticipated consequences.
1 parent 2001ff4 commit 9856fa0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deployment/terraform/modules/osv/scripts/gcloud_build_image

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ tempdir="$(mktemp -d /tmp/docker.XXXXXX)"
102102
cd "${tempdir}"
103103

104104
# Be careful about exposing the access token.
105-
access_token="$(gcloud auth print-access-token)"
105+
access_token="$(gcloud auth application-default print-access-token)"
106106
curl --fail -o "service.json" -H @- \
107107
"https://servicemanagement.googleapis.com/v1/services/${SERVICE}/configs/${CONFIG_ID}?view=FULL" <<EOF || error_exit "Failed to download service config"
108108
Authorization: Bearer ${access_token}

0 commit comments

Comments
 (0)