GCP Prep
Browse all topics
Security6 min readUpdated August 23, 2026

Identity and Access Management (IAM)

In one sentence

IAM answers one question for every action anyone takes: is this identity allowed to perform this operation on this resource?

What it is

IAM is the authorisation system. Every action on every resource passes through it. The model is deliberately small: you grant a role to a member on a resource, and the role is a bundle of permissions.

It is worth stating the model precisely, because the wording matters. You do not grant permissions directly to people. You grant a role, which contains permissions, to a member, at a point in the resource hierarchy.

Why it matters

IAM is the highest-yield topic in the entire certification programme relative to time spent studying it. It appears on every exam, it is tested precisely, and the questions have a reliable shape: four roles that would all technically work, one of which grants least privilege.

In production it matters for a simpler reason. Over-granted permissions are the most common serious misconfiguration in cloud environments, and they are the mechanism by which a small compromise becomes a large one.

Key concepts

  • Member (principal) — the identity: a user account, a group, a service account, a domain, or a federated external identity.
  • Permission — the finest-grained unit, expressed as service.resource.verb, such as compute.instances.start. You never grant these individually.
  • Role — a collection of permissions. The only thing you actually grant.
  • Policy binding — the attachment of a role to a member at a specific resource. The set of bindings on a resource is its IAM policy.
  • Inheritance — policy flows down the hierarchy. A role granted at the folder level applies to every project and resource beneath it. It never flows upward.
  • Service account — an identity for software rather than a person. Applications, virtual machines and pipelines act as one.
  • Impersonation — allowing an identity to temporarily act as a service account. Preferable to distributing key files because the access can be revoked instantly and every use is logged.
  • Workload identity federation — letting an external system authenticate as a service account using its own identity provider, so no key file is ever created.
  • IAM conditions — attaching restrictions to a binding, such as an expiry date or a restriction to specific resource names.

The three kinds of role

KindWhat it isWhen to use it
BasicOwner, Editor, Viewer. Legacy roles spanning every service, extremely broad.Almost never in production. Editor alone can modify nearly everything in a project.
PredefinedService-specific roles maintained by the provider, such as a storage object viewer.The default choice. Curated, kept current as services change, and granular enough for most needs.
CustomA role you define containing exactly the permissions you choose.When no predefined role is tight enough. You own maintaining it as services evolve.

How an access decision is made

  1. 1A request arrives to perform an action on a resource
  2. 2The resource's own IAM policy is evaluated
  3. 3The parent project's policy is added
  4. 4Parent folders' policies are added, up to the organisation
  5. 5If any level grants a role containing the required permission, access is allowed
  6. 6Organisation policy constraints are applied separately and can block the action regardless
Permissions accumulate down the hierarchy; a grant higher up cannot be narrowed lower down.

The consequence deserves emphasis: IAM is additive and there is no deny that undoes an allow granted higher up. If someone has Editor at the organisation level, you cannot remove their access to one project by adjusting that project's policy. You must fix the grant where it was made.

Service accounts done properly

Service accounts cause more real-world security incidents than any other IAM feature, almost always because of key files. A downloaded key is a long-lived credential that works from anywhere, does not expire, and is trivially committed to a repository by accident.

  • Create a dedicated service account per workload. Never share one across unrelated services, and never use the default service account for production.
  • Attach the service account to the resource — a virtual machine, a Cloud Run service, a Kubernetes workload — so credentials are obtained automatically and rotated for you.
  • Use workload identity federation for systems outside the platform rather than issuing a key.
  • Use impersonation for human access that needs elevated rights, so it is temporary and audited.
  • If a key genuinely cannot be avoided, rotate it on a schedule and monitor for its use from unexpected locations.

Practical least privilege

  • Grant to groups rather than individuals so access follows role changes automatically.
  • Grant at the lowest level of the hierarchy that satisfies the need, not the most convenient level.
  • Start from a predefined role that is slightly too narrow and add to it, rather than starting broad and intending to trim later.
  • Use conditions to add expiry to temporary elevated access.
  • Review who holds broad roles regularly; permission grants accumulate and are rarely removed voluntarily.
  • Separate duties: whoever administers encryption keys should not also administer the data those keys protect.

Certification relevance

Where this topic appears, and how deeply each exam goes into it. These are our own assessments based on published exam guides.

Practice questions

IAM practice questions

9 original questions with full explanations.