Learning center

Diagnose a denied Google Cloud service account token request

When GenerateAccessToken fails, check the principal requesting the token and the permission iam.serviceAccounts.getAccessToken on the target service account. Downstream resource access is evaluated later using the impersonated identity.

In a fictional export system, runner requests a token for publisher. The audit evidence shows a denial on the IAM Credentials call. An IAM reader can inspect the publisher service account's policy, including any inherited grant where applicable, and compare the effective permission for the runner. Use Policy Troubleshooter where it supports the caller. Neither check requires printing an access token. Service account impersonation · GenerateAccessToken authorization · Policy Troubleshooter

Take an approved impersonation request to the account owner. Evaluate a grant on the intended service account and review the extra capabilities of any predefined role proposed for it. A Storage role on the publisher cannot authorize the runner to mint its token.

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading