Access and security on Google Cloud

Updated November 23, 2026

Section 4 of the Associate Cloud Engineer exam, configuring access and security, is about 20% of the exam and has two parts: managing IAM and managing service accounts. IAM also appears inside other sections, so this material pays off beyond its own weight. The central skill is giving the right principal the least access at the right level.

IAM basics

An IAM policy binds principals (users, groups, service accounts) to roles on a resource. Policies attach at the organization, folder, project or resource level and inherit downward. The guide asks you to view and create policies, attach roles with inheritance in mind, and manage the role types:

Role typeNotes
BasicOwner, Editor, Viewer; very broad, avoid in production
PredefinedMaintained by Google for a service; the usual choice
CustomYou choose the permissions; for exact least privilege, you maintain it

Prefer groups to individual users, grant at the lowest level that works, and use custom roles only when no predefined role fits, since you must update them as permissions change.

Service accounts

A service account is an identity for an application or workload and not for a person. Know how to:

  • Create service accounts and recognize Google-managed ones that services use internally.
  • Grant them minimum roles in IAM policies, and assign them to resources such as VMs or Cloud Run services so that code gets credentials from the metadata server rather than from a key file.
  • Manage who can use a service account: the permission to act as it (impersonate it) is itself a powerful grant.
  • Create short-lived credentials through impersonation instead of downloading long-lived keys.
  • Use a service account with a GKE application, and provision Workload Identity Federation, which lets workloads outside Google Cloud, or Kubernetes workloads, authenticate without service account keys.

The theme is keyless access. If an option involves a downloaded JSON key and another achieves the same with an attached service account or federation, the keyless one is almost always what Google wants.

Reading scenario wording

Phrase in the questionLikely answer
Least privilegePredefined role at narrow scope
Application on a VM needs accessAttach a service account
Workload on another cloud or on-premisesWorkload Identity Federation
Temporary elevated accessShort-lived credentials or impersonation
Many users with the same needGrant to a Google group

Common traps

  • Granting Editor to a service account for convenience.
  • Believing a role granted on a child project can override a broader grant above it. Allow policies are additive.
  • Sharing keys by email or committing them to a repository.
  • Forgetting that data encryption keys are separate from IAM, covered under CMEK in the operations section.

Practice questions

Question 1. A VM-hosted application must read objects from one Cloud Storage bucket, and the team wants no credential files on disk. What is the best approach?

  • A. Download a JSON key and store it on the VM
  • B. Use an administrator user password in the app
  • C. Give the service account Owner on the project
  • D. Attach a service account with a read role on that bucket
Show answer

Answer: D

Attach a service account to the VM with a bucket-level read role, and the client libraries obtain short-lived tokens automatically. Embedding a key file or using a user password creates secrets to rotate and leak, and Owner on the project is far more than needed.

Want more questions like this? Full Cloud Engineer practice tests →

Question 2. Fifty analysts need the same read access to BigQuery datasets in a project, and new analysts join regularly. What is the most maintainable setup?

  • A. Grant the role to a Google group and manage membership
  • B. Grant the role to each analyst individually
  • C. Grant Owner to a team lead
  • D. Share a single account password
Show answer

Answer: A

Granting a predefined role to a Google group means onboarding is just adding a member. Individual grants for each person are tedious and error-prone, Owner is overly broad, and sharing one login destroys accountability.

Want more questions like this? Full Cloud Engineer practice tests →

Question 3. A CI system running outside Google Cloud needs to deploy resources, and security forbids long-lived service account keys. Which feature meets this?

  • A. Grant the Editor basic role
  • B. Configure Cloud NAT
  • C. Set up Workload Identity Federation
  • D. Create a custom role
Show answer

Answer: C

Workload Identity Federation lets an external identity provider token be exchanged for short-lived Google credentials, so no key is stored. Basic roles do not address credentials, Cloud NAT is a networking feature, and a custom role only defines permissions, not how the workload authenticates.

Want more questions like this? Full Cloud Engineer practice tests →

Finally, read is the exam hard or return to the format guide.