D4: Using Service Accounts for API Calls
Google Cloud Professional Cloud Developer exam practice questions · 10 flashcards
Question
How does code on Cloud Run authenticate to APIs?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Using Service Accounts for API Calls practice questions and answers
- How does code on Cloud Run authenticate to APIs?The attached service account via ADC.
- How does local code use a service account without a key?gcloud auth application-default login --impersonate-service-account=SA.
- Why avoid downloaded SA keys?Leak risk and rotation burden.
- What are OAuth scopes on VMs?Legacy limits; use cloud-platform scope with IAM roles.
- How to call Google APIs from outside Google Cloud?Workload Identity Federation.
- How to give the SA permissions?Grant IAM roles on target resources.
- What identity calls APIs from GKE Pods?Workload Identity Federation for GKE.
- How to check which identity is used?Logs show the principal in audit logs.
- Why separate SAs per service?Least privilege and auditability.
- What is service account impersonation?Short-lived credentials for another SA without keys.