GCP ACE Practice / Study guide / Topics / Service Accounts & Identity

Service Accounts & Identity

What actually gets tested on the Google Cloud Associate Cloud Engineer exam, the traps to know, and 6 free sample questions with full explanations.

Service accounts are identities for workloads, not people — a VM, a Cloud Run service, or a CI pipeline authenticates as one instead of borrowing a human's credentials. They can hold IAM roles exactly like a user account, and the exam's central question about them is almost always the same shape: how does this workload get credentials, and is that the safest way to do it.

The safest way, in nearly every scenario the exam poses, is to attach the service account to the resource that needs it (a Compute Engine instance, a Cloud Run revision) rather than generate and download a long-lived JSON key. Downloaded keys are a recurring trap: they don't expire on their own, they're easy to leak into source control or a laptop, and rotating them is a manual, easy-to-forget process. When impersonation is on the table instead — one identity temporarily acting as a service account via roles/iam.serviceAccountTokenCreator — that's the modern, short-lived-credential alternative the exam wants you to recognize as the better answer.

Cloud Identity is the separate, adjacent idea of managing the humans: it provisions corporate identities (and is what creates an Organization node in the resource hierarchy) without requiring a paid Google Workspace subscription, and it can federate with an existing identity provider via SAML SSO and directory sync so a company's existing AD accounts authenticate into Google Cloud without duplicate identity management.

Exam tips for this topic

Sample questions — Service Accounts & Identity

These 6 questions are drawn from our full bank of 658 to show the style and depth you'll get in the app. Each comes with the full explanation you'd see after answering in a real practice session.

Cloud Identity

Your company wants employees to use corporate credentials for Google Cloud instead of personal Gmail accounts, and it does not use Google Workspace. What should it set up?

Why: Cloud Identity provides managed corporate identities (and creates the Organization node) without requiring Google Workspace, and it can federate with an existing IdP such as Active Directory. Personal accounts are unmanaged, shared accounts destroy auditability, and service accounts are for workloads, not people.
Service accounts

A junior developer asks why your Cloud Run service runs as an identity that no human ever logs into. What is a service account?

Why: Service accounts are workload identities: code running as them gets tokens from the platform, and IAM roles bind to them like any principal. They're also resources someone can be granted control OVER (e.g., serviceAccountUser).
Cloud Identity

What is the recommended way to grant Google Cloud access to 60 developers who all need the same permissions?

Why: Granting roles to groups centralizes membership management: joining/leaving the group adds/removes access with a full audit trail. Individual grants are unmanageable at scale, shared accounts break accountability, and service accounts are for workloads.
Service accounts

An application on one of your VMs needs to write objects into exactly one Cloud Storage bucket. What is the recommended setup?

Why: Least privilege = dedicated SA + resource-level grant. The default-SA-with-Editor pattern is the historical anti-pattern being phased out; public-write buckets are abuse magnets.
Cloud Identity

Your company already uses Active Directory on-premises. How do employees keep a single identity for Google Cloud?

Why: Directory Sync provisions users/groups from AD into Cloud Identity, and SAML SSO lets AD (or an IdP like ADFS) authenticate them — one identity, centrally disabled when someone leaves. Manual account duplication and shared logins undermine security; API keys are not user identities.
Service accounts

Creating a VM, you're unsure whether to restrict its legacy access scopes or rely on IAM roles for the attached service account. What is the modern guidance?

Why: Scopes are a legacy per-VM credential limiter; effective access = intersection of scopes and IAM. Recommended: full cloud-platform scope + least-privilege IAM, one control plane instead of two.

Practice this for real

The app has dozens more questions on this and every other topic, with instant scoring, spaced repetition of what you get wrong, and progress tracking across sessions.

Start practicing →

This topic shows up in

Domain 1Setting Up a Cloud Solution Environment Domain 5Configuring Access and Security

Other topics

TopicIAM Roles & Permissions TopicBilling, Pricing & Cost Management TopicGoogle Kubernetes Engine (GKE) Topicgcloud CLI Commands TopicChoosing the Right Compute Option TopicCompute Engine Deployment & Operations TopicCloud Monitoring, Logging & Audit Logs TopicVPC Networking & Load Balancing TopicChoosing a Database on Google Cloud TopicResource Hierarchy, Projects & APIs TopicCloud Storage: Classes, Access & Security TopicServerless Compute: Cloud Run & App Engine TopicData Protection: Encryption & Secret Manager TopicInfrastructure as Code & Cloud Shell