Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Your team is building automated infrastructure management scripts in Python and Go using the official Google Cloud Client Libraries. To comply with organizational security baselines, developers are strictly prohibited from downloading, exporting, or storing long-lived service account private keys (.json key files) on their local workstations.
Developers have already been granted the Service Account Token Creator (roles/iam.serviceAccountTokenCreator) role on the workload service account sa-orchestrator@company-project.iam.gserviceaccount.com.
How should developers configure their local development environments so that the client library scripts authenticate as the service account via Application Default Credentials (ADC) without using exported key files?
Service account impersonation configured through Application Default Credentials (ADC) allows developers and client libraries to obtain short-lived credentials by assuming the identity and permissions of a target service account at runtime without downloading static private keys.
gcloud auth application-default login --impersonate-service-account acquires credentials dynamically via IAM token generation APIs rather than creating permanent .json key files on disk.roles/iam.serviceAccountTokenCreator permission, ensuring all operations are fully auditable in Cloud Audit Logs.storage.NewClient(ctx) in Go or storage.Client() in Python) works identically in local development and production environments.This method is the Google-recommended best practice for local development when testing scripts that require service account permissions. It directly populates the standard local ADC credential file with impersonation configuration recognized by supported client libraries.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.