Skip to content

Commit

Permalink
Add scope to default application credentials (#1151)
Browse files Browse the repository at this point in the history
When using application default credentials with Workflow Identity Federation, the API call to GCP fails with "Request had insufficient authentication scopes.". This attempts to fix that by setting the scope in the GoogleCredentials object.

Co-authored-by: rohitkrishnan <[email protected]>
  • Loading branch information
rkrishnan2012 and rohitkrishnan authored Nov 15, 2024
1 parent 281ddbc commit 3847cc9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal fun createPublisher(impersonateServiceAccount: String?): AndroidPublish
.setDelegates(null)
.build()
} else {
appDefaultCreds
appDefaultCreds.createScoped(listOf(AndroidPublisherScopes.ANDROIDPUBLISHER))
}

return AndroidPublisher.Builder(
Expand Down

0 comments on commit 3847cc9

Please sign in to comment.