Identity and Access Management in Google Cloud: Who Can Do What, and Why
A complete, plain-English guide to how Google Cloud decides who may touch which resource, covering principals, roles, policies, inheritance, conditions, deny rules, service accounts, federation and the habits that keep access safe.
Picture a large office building with hundreds of rooms. Employees, visitors, cleaners, delivery drivers and security guards all come and go. Some rooms hold ordinary desks, others hold the payroll files, and one holds the main power switch. The building needs a clear system: a way to know who each person is, a list of what each person may do, and a rule for every door. Identity and Access Management, usually shortened to IAM, is that system for your cloud. It answers one question billions of times a day: is this person or program allowed to do this action on this resource right now?
1What IAM Is and Why It Exists
IAM is the part of Google Cloud that controls access, so that the right identities have the right permissions on the right resources.
The simple definition
IAM is a service built into Google Cloud that lets administrators decide who can take which actions on which resources. The word “who” can mean a person, a group of people, an application or a machine. The word “actions” can mean reading a file, starting a virtual machine, deleting a database or changing another person’s access. The word “resources” can mean almost anything in Google Cloud: a storage bucket, a project, a dataset, a topic, a cluster, or even the whole company account.
Why it exists
When a company first moves to the cloud, it is tempting to give everybody full power so nothing gets blocked. That feels fast, but it is dangerous. A single mistake by one engineer can delete production data. A single stolen password can expose everything. A single over-trusted program can be abused by an attacker. IAM exists to replace “everyone can do everything” with “everyone can do exactly what their job needs, and nothing more”. This rule is called the principle of least privilege, and it is the heart of cloud security.
A hotel does not give every guest a master key. Each guest gets a card that opens their own room and the gym, and only for the days they have paid for. The cleaning staff get cards for many rooms but not the safe. The manager gets a card for almost everything. IAM is the hotel’s key-card system for your cloud.
Where it is used
Every single request in Google Cloud passes through IAM, whether it comes from the console, the command line, a program or another Google service. Security teams use it to protect sensitive data. Developers use it to give applications safe access to databases. Auditors use it to prove who could do what. Because it is built in, there is nothing to install and no separate server to run.
2The Big Idea: Who, Can Do What, On Which Resource
Almost everything in IAM is a sentence with three parts, and once you see the pattern, the rest feels natural.
The three-part sentence
An IAM grant always says: this principal has this role on this resource. The principal is the “who”. The role is a bundle of permissions, the “can do what”. The resource is the “on which thing”. For example: the data analysts group has the BigQuery data viewer role on the sales dataset. Read it aloud and it makes perfect sense. That one sentence is stored as a role binding, and a collection of role bindings attached to a resource is called an allow policy.
Principal
The identity that is asking for access: a person, a group, a service account or an external identity that has been connected through federation.
Role
A named collection of permissions. Instead of handing out hundreds of tiny permissions one at a time, you grant a role that already bundles the right ones.
Resource
The thing being protected. Policies can be attached at many levels, from a whole organization down to a single bucket or table.
Condition
An optional extra rule that limits when or where a grant applies, such as only during working hours or only for resources with a certain label.
Think of a school. A teacher (principal) holds the “grade examiner” job description (role) for the science department’s exam papers (resource). The job description lists several small actions, such as reading papers, writing marks and returning results. You do not hand the teacher each small permission separately; you give them the job description.
Authentication versus authorization
Two words are often confused. Authentication answers “who are you?” and is proven by a password, a second factor, a token or a certificate. Authorization answers “what are you allowed to do?” and is decided by IAM policies. Google Cloud first confirms identity and then checks permission. IAM is mainly the authorization system, although it works closely with the identity providers that handle authentication.
When you read any IAM setting, rewrite it in your head as the three-part sentence. If you cannot say clearly who, which role and which resource, the setting is probably too vague and should be reviewed.
3The Resource Hierarchy: Where Policies Live
Google Cloud arranges resources like a family tree, and access flows down that tree.
The four levels
At the top sits the organization, which represents your whole company and is tied to your company’s identity domain. Below the organization are folders, which you can use to group projects by department, team or environment, and folders can contain other folders. Below folders are projects, which are the basic containers where you create and use resources and where billing and APIs are enabled. Inside projects live the actual resources, such as virtual machines, buckets, databases and queues.
flowchart TD
O["Organization: company account"]
F1["Folder: Finance"]
F2["Folder: Engineering"]
F3["Folder: Production"]
P1["Project: payroll"]
P2["Project: web app"]
P3["Project: data platform"]
R1["Resource: storage bucket"]
R2["Resource: database"]
R3["Resource: dataset"]
O --> F1
O --> F2
F2 --> F3
F1 --> P1
F3 --> P2
F3 --> P3
P1 --> R1
P2 --> R2
P3 --> R3
A company campus has a main gate, then buildings, then floors, then rooms. A pass to the main gate does not open every room, but a pass for a whole floor opens every room on that floor. Where you place the grant in the tree decides how much it opens.
Why the hierarchy matters for access
An allow policy can be attached at any level. A grant placed on a folder applies to every project and resource below it. A grant placed on a project applies to everything inside the project. A grant placed on one bucket applies only to that bucket. This is called inheritance, and it is both powerful and risky. It saves effort, because one grant at the right level covers many resources, but a grant placed too high can give far more access than intended.
Organization level
Used for company-wide rules and for a very small number of trusted administrators, such as the people who manage the organization itself and the central security team.
Folder level
Used to give a department or environment its common access, such as all developers of a product line being able to view logs for every project in their folder.
Project level
The most common level for everyday access. A team is given the roles it needs on its own projects.
Resource level
Used for fine-grained exceptions, such as allowing one partner to read from exactly one bucket and nothing else.
Granting a broad role at the organization level because it is convenient. Everything under the organization inherits it, including projects created in the future. Grant at the lowest level that still does the job.
4Principals: The Identities That Ask for Access
A principal is anyone or anything that can be given access. Google Cloud supports several kinds.
User accounts
An individual person, identified by an email address that belongs to a managed domain through Google Workspace or Cloud Identity, or in some cases a personal Google account.
Groups
A named collection of users managed in one place. Granting a role to a group gives it to every member, and membership changes take effect automatically.
Service accounts
An identity for an application or workload rather than a person. Programs use service accounts to call Google Cloud services safely.
Domains
A principal that stands for every user in a managed domain. It is powerful and must be used with care, because it covers everyone in the company.
Workforce identity federation
Lets employees sign in with an outside identity provider, such as a company single sign-on system, and receive access without separate Google accounts.
Workload identity federation
Lets programs running in other clouds or in your own data center call Google Cloud using their own identity, without storing long-lived secret keys.
Special public identifiers
Two special values need extra caution. One stands for absolutely everyone on the internet, signed in or not. The other stands for anyone who is signed in with any Google account, including accounts that have nothing to do with your company. Granting a role to either of these makes a resource effectively public. They are sometimes right, for example for a public website bucket, but they should always be a deliberate and reviewed decision.
A company directory lists employees by name, but also lists teams, and also lists the delivery robots in the warehouse. Each entry can be given a badge. The special public entries are like leaving a door propped open to the street: sometimes you want a shop door open, but you never do it by accident.
Manage access through groups that match job functions, such as “payments developers” or “data analysts”. When someone joins or leaves a team, you change one group membership instead of hunting through dozens of policies.
5Permissions: The Smallest Unit of Power
Every action in Google Cloud maps to a permission, and permissions are what roles are built from.
What a permission is
A permission is the right to perform one specific action on one type of resource. Permission names follow a regular pattern with three parts: the service, the type of resource and the action. For example, a permission might mean “storage, objects, get”, which allows reading a stored file. Another might mean “compute, instances, delete”, which allows removing a virtual machine. Because the names follow a pattern, you can often guess what a permission does just by reading it.
In a library, “borrow a book”, “return a book”, “add a new book to the catalogue” and “remove a book permanently” are all separate small rights. A visitor may borrow, a librarian may add, and only the head librarian may remove. Each small right is a permission.
You do not grant permissions directly
In IAM you never attach a single permission to a principal. Permissions are always grouped into roles, and you grant the role. This keeps policies readable. Imagine a policy with five hundred individual permissions; nobody could review it. A policy with five role names can be read in a minute.
Permissions that need extra care
Some permissions are far more powerful than they look. The right to change IAM policies lets a person give themselves or others more access. The right to create keys for a service account can let someone act as that account. The right to act as a service account lets a person borrow its powers. These can all turn a small amount of access into a large amount, so they are called privilege escalation paths. Review who holds them with special attention.
Thinking a person with “read only” access to a project is harmless, while forgetting that they can also create service account keys or impersonate a powerful service account. Always check for indirect routes to higher privilege.
The IAM documentation includes a permissions reference that lists which permissions each role contains and which permissions each API method needs. Use it when a request fails with a permission error and you need to find the missing piece.
6Roles: Basic, Predefined and Custom
A role is a bundle of permissions. Google Cloud offers three families, and choosing the right family is one of the most important IAM decisions.
Basic roles
The original, very broad roles: Viewer, Editor and Owner, plus a Browser role in some cases. Viewer can read most things in a project. Editor can also change most things. Owner can do nearly everything, including managing access and billing. They are simple, but they cover thousands of permissions across all services and are rarely appropriate for production.
Predefined roles
Roles created and maintained by Google for specific services and jobs, such as a role that only lets someone view objects in storage, or a role that only lets someone administer a particular database. Google updates them when new features arrive, so they stay correct over time. These should be your default choice.
Custom roles
Roles that you create yourself by choosing exactly the permissions you want. They are useful when no predefined role fits tightly enough. They can be created at the organization or project level. You must maintain them yourself, because they do not update automatically when Google adds new permissions to a service.
Basic roles are like handing out the master key, the staff key or the visitor card for the whole building. Predefined roles are like ready-made job badges, such as “cashier” or “stockroom clerk”. Custom roles are badges you design yourself when no ready-made badge matches the job.
How to choose
| Role family | Scope of power | Maintenance | When to use |
|---|---|---|---|
| Basic | Very wide, across all services | Maintained by Google | Small tests and early learning, rarely in production |
| Predefined | Focused on one service or job | Maintained by Google | The normal choice for most access |
| Custom | Exactly what you choose | You must update it yourself | When predefined roles are still too broad |
A good habit is to start with the narrowest predefined role that lets the job work. If that still gives too much, consider a custom role. If a custom role would need constant updates, reconsider whether a predefined role plus a condition could work instead. Google also offers a recommender that watches actual permission use and suggests narrower roles for principals that never use most of what they hold.
Using the Editor or Owner basic role for a service account because “it just works”. If that account is ever stolen, the attacker gets the same wide power. Give service accounts only the specific predefined roles they truly use.
7Allow Policies and Role Bindings
An allow policy is the actual document where the grants are stored, and understanding its shape removes a lot of mystery.
What is inside a policy
An allow policy is a list of role bindings attached to one resource. Each binding connects one role to one or more principals and may include a condition. If you read a policy, you will see something like: this role goes to these principals, that role goes to those principals, and so on. A resource has exactly one allow policy, and that policy describes all the direct grants made on that resource.
Read the current policy
Before changing access, the existing policy is read. It includes a version marker called an etag.
Modify the binding list
You add a principal to an existing binding, add a new binding or remove one. The change is made on your copy of the policy.
Write it back with the etag
The updated policy is sent back along with the etag. If someone else changed the policy in the meantime, the etag no longer matches and the write is refused, which prevents accidental overwrites.
Wait for propagation
The change takes effect across Google Cloud after a short delay, usually within a couple of minutes, though occasionally longer.
Two clerks editing the same paper register could overwrite each other’s notes. The etag is like a stamp on the page that says “this is version five”. If you try to save over version six, the register refuses and asks you to look again first.
Policies are about the resource, not the person
An important point is that policies are attached to resources, not to people. To discover everything one person can access, you cannot simply open “their policy”. You must look at the policies of the resources, including inherited ones from parents. This is exactly why special tools such as the Policy Analyzer and the Policy Troubleshooter exist, which we cover later.
Prefer adding or removing a single principal from a binding through the command line or console’s grant and revoke actions, which handle the read, change and write steps safely for you, instead of hand-editing whole policy documents.
8Inheritance and Effective Access
What a person can actually do is the combination of every policy that applies to them, from the top of the tree down to the resource.
The union rule
For allow policies, the effective access on a resource is the union, which means the combination, of the allow policy on that resource and the allow policies of all its ancestors. If a person has a viewer role on a folder and an editor role on one project inside it, they can view everything in the folder but also edit that one project. Grants only add; a lower-level allow policy cannot take away an access that a higher level has granted.
flowchart TD
A["Allow policy on organization"] --> U["Effective allowed access: union of all"]
B["Allow policy on folder"] --> U
C["Allow policy on project"] --> U
D["Allow policy on resource"] --> U
U --> E["Deny policies checked first and can override"]
Imagine you hold a pass for the campus gate, another for the science building and a third for one lab. You can enter the gate, the building and that lab. Having the lab pass does not remove the gate pass, and the lab pass cannot be used to cancel the gate pass. Your access is everything you hold, added together.
What this means in practice
You cannot restrict by granting less lower down
If a group already has a broad role on a folder, creating a narrower grant on a project inside the folder does not shrink their access. To reduce access you must change the higher-level grant, or use a deny policy.
Group membership adds up too
A person who belongs to three groups receives the combined access of all three groups, in addition to anything granted to them directly. Removing one grant is not enough if another route to the same access remains.
Future resources inherit automatically
A new project created in a folder instantly receives the folder’s grants. This is helpful for onboarding but is a reason to design folder-level access carefully.
Removing a person’s access from a project and assuming it is gone, when they still receive the same role through a group or through the folder above. Always check the effective access, not just the direct grants.
9IAM Conditions: Grants With Rules Attached
A condition turns a plain grant into a smarter one that applies only when certain facts are true.
What conditions can do
A condition is a small logical rule attached to a role binding. The grant only works when the rule evaluates to true. This is sometimes called attribute-based access control, because the decision depends on attributes of the request or the resource, not only on who is asking.
Time-based access
Grant access only until a certain date, or only during certain hours or days. This is excellent for temporary contractors and for on-call windows that expire by themselves.
Resource-based access
Limit a grant to resources with a particular name prefix, type or service, so a team can manage only resources that follow its naming pattern.
Tag-based access
Use tags attached to resources, such as an environment tag, so that one grant works only on development resources and never on production.
Request attributes
Some conditions can look at details of the request itself, such as the time it was made, helping to shape when the grant is valid.
A visitor badge that says “valid on Tuesday, third floor only, until five in the evening” is much safer than a badge that opens every door forever. A condition writes those limits onto the digital badge.
Good uses
Temporary elevated access
An engineer is given an administrator role for four hours during an incident. The grant expires on its own, so nobody has to remember to remove it afterwards.
Environment separation
Developers receive broad access to resources tagged as development, while the same role is simply invisible for resources tagged as production.
Delegated administration with limits
A team lead can grant a small set of approved roles to others, but only those roles, which avoids handing out the power to grant anything at all.
Conditions are not supported on every resource type, and some basic roles cannot carry them. Check the current documentation for the resource you plan to protect before designing around conditions.
10Deny Policies: The Guardrails Above Allow
Allow policies only add access. Deny policies exist to say “never”, no matter what else is granted.
How deny works
A deny policy lists principals, a set of permissions that are denied to them, and optionally exceptions and a condition. Deny policies can be attached to the organization, to folders and to projects, and they are inherited down the tree like allow policies. When a request arrives, IAM checks deny policies first. If any deny rule matches, the request is refused, even if several allow policies would have permitted it. Deny always wins over allow.
A building may give an employee a pass for the second floor, but a security notice may say “nobody enters the server room today, whatever pass they hold”. The notice wins over the pass. A deny policy is that notice.
Why deny policies are useful
Company-wide guardrails
A central team can forbid dangerous actions, such as deleting protected projects or disabling audit settings, for almost everyone across the entire organization, with a small exception list for the platform team.
Safety net against mistakes
If someone grants a risky role by accident at a high level, a deny policy for the most dangerous permissions still protects the company while the mistake is found and fixed.
Separation of duties
Deny rules can stop certain groups from performing both halves of a sensitive process, for example approving and releasing the same payment.
Allow, deny and organization policy together
People often mix up the three tools. An allow policy gives access. A deny policy removes selected access from selected principals. The Organization Policy Service, covered in a later chapter, does something different: it restricts how resources may be configured, regardless of who is configuring them. Using all three gives defense in depth.
Writing deny rules that are too broad and then blocking legitimate administrators or automation, including the very people who would fix the problem. Always plan an exception group for break-glass access and test deny policies carefully before relying on them.
11Organization Policy Service: Rules About Configuration
IAM decides who may act. The Organization Policy Service decides what is allowed to exist, whoever is acting.
A different kind of control
The Organization Policy Service lets administrators set constraints on how resources may be configured across the organization, a folder or a project. A constraint is a rule such as “virtual machines may not have public internet addresses”, “resources may only be created in these approved regions”, “service account keys may not be created” or “access may only be granted to people from our own company domain”. Even a person with a very powerful IAM role cannot break these rules, because the rules do not depend on role. They apply to the resource configuration itself.
A city has building codes. Even the richest owner with full permission to build cannot ignore the fire safety code. IAM is like deciding who holds a building license. Organization policy is like the building code that every licensed builder must still follow.
Constraints that matter for access
Domain restricted sharing
Allows IAM grants only to identities from approved company domains, which stops data being shared with random outside accounts by mistake.
Disable service account key creation
Prevents the creation of long-lived downloadable keys, pushing teams toward safer ways of authenticating programs.
No automatic powerful roles for default accounts
Stops default service accounts from being given broad roles automatically when a project is created, so new projects start safer.
Resource location restriction
Limits which regions can hold new resources, helping meet data residency rules.
How inheritance works here
Organization policies are also inherited down the hierarchy. A rule set at the organization applies to every folder and project below, and lower levels can usually add stricter limits or, where the rule allows it, carefully override. This lets a central team set the baseline once and still let specific teams adapt within safe limits.
Switch on a small, well-chosen set of constraints at the organization level early, before many projects exist. It is far easier to start with good guardrails than to add them later and discover that dozens of teams already depend on risky behavior.
12Boundaries Around Access: Layers That Work With IAM
IAM is the foundation, but strong designs add other layers so a single mistake does not open the door.
Principal access boundary policies
A principal access boundary sets an upper limit on which resources a group of principals may ever use, regardless of the roles granted to them. For example, a boundary can say that identities in a certain group may only access resources inside a certain set of projects. Even if someone later grants them a role elsewhere by mistake, the boundary blocks it. Features of this kind are newer and their availability and details may change, so check the current documentation.
VPC Service Controls
This feature draws a security perimeter around selected Google Cloud services and projects. It reduces the risk of data being copied out to places outside the perimeter, even by someone who has valid IAM permission and even from a stolen credential used outside the approved network context.
Context-aware access
Access can depend on the situation of the user, such as the device being managed and up to date, or the user connecting from an approved network. A correct identity is not enough if the surrounding conditions are risky.
Privileged access management
Google Cloud offers a way for people to request temporary elevated access for a limited time, with justification and approval, and with automatic expiry and a clear record. This replaces permanent powerful grants with short, audited ones. Check the current documentation for the exact features available to you.
A bank vault is protected by many layers: a guard at the gate, a locked door, a camera, a time lock and a second key held by someone else. Any one layer might fail. IAM is the main door lock, and the other features are the additional layers that make the vault safe even if one layer is bypassed.
Which tool answers which question
| Tool | Main question | Example |
|---|---|---|
| Allow policy | Who is granted which role on which resource? | Analysts may view the sales dataset |
| Deny policy | Which actions are blocked for whom, whatever else is granted? | Nobody except the platform team may delete protected projects |
| Organization policy | What may be configured at all? | No public internet addresses on virtual machines |
| Principal access boundary | What is the outer limit of what these principals may ever reach? | Contractors may only reach their own project set |
| VPC Service Controls | Can data leave the protected perimeter? | Block copying from a protected dataset to an outside project |
13Service Accounts in Depth
Programs need identities too. Service accounts are how applications prove who they are and receive limited access.
What a service account is
A service account is a special kind of account that belongs to an application or workload, not to a person. A program running on a virtual machine, in a container or in a function uses a service account to call other Google Cloud services, such as reading a file from storage or writing a row to a database. A service account has two sides. It is a principal, meaning it can be granted roles to act on other resources. It is also a resource, meaning other principals can be granted roles to manage it or to act as it.
A company issues a staff card to a delivery robot, not to a human. The robot’s card opens only the warehouse door and the loading bay. Who is allowed to reprogram the robot, or to ride it, is a separate question controlled by another set of permissions. Service accounts work the same way.
Kinds of service accounts
User-managed
Accounts that you create and control for your own applications. You choose their names and their roles, and you are responsible for keeping them tidy.
Default service accounts
Accounts that some services create automatically for a project, such as the default account for virtual machines. They may start with more power than needed, so review them early.
Service agents
Accounts that Google creates and manages so that its own services can act on your behalf, for example to read your data for a managed feature. You should not delete or recklessly change them.
Why service accounts are a prime target
Attackers love service accounts because they often hold strong, long-lived access and are not protected by a second factor. A leaked key for a powerful service account can be used from anywhere in the world, at any hour, without a person ever signing in. This is why modern guidance focuses on giving service accounts very narrow roles, avoiding downloaded keys, and watching their use.
Using a single shared service account for many unrelated applications. If one application is compromised, the attacker gains the combined power of all of them. Create one service account per workload, each with only the roles that workload needs.
Give service accounts clear names that state the application and purpose, and add a description with an owner. Six months later, nobody should have to guess why an account exists.
14Authenticating Programs Safely: Keys, Attachment and Impersonation
There are several ways for a program to use a service account, and they differ greatly in safety.
From riskiest to safest
Downloaded keys: the riskiest
A key is a file that proves the identity of a service account. Anyone who copies the file can use the account from anywhere, until the key is deleted. Keys leak through code repositories, chat messages, laptops and backups. They are best avoided entirely.
Attached service accounts: much safer
When a workload runs on Google Cloud, such as a virtual machine, a container service or a function, you attach a service account to it. The platform supplies short-lived credentials automatically, and no secret file ever needs to be stored or copied.
Impersonation: safe for people and tools
A person or another service account with permission can obtain short-lived credentials to act as a service account, without ever holding its key. Every use is recorded in the audit logs.
Federation: safe for outside workloads
Programs in other clouds or data centers exchange their own identity for short-lived Google credentials, so no Google key is ever stored outside Google Cloud.
A permanent key copied and handed out is like giving a contractor a copy of your house key that works forever. An attached account is like a smart lock that recognizes a delivery person each time and opens only for the delivery. Impersonation is like a manager signing a one-day visitor pass in the logbook for a specific colleague.
The two special roles to understand
Permission to act as a service account
To attach a service account to a resource, such as a new virtual machine, the person creating it needs permission to act as that account. Without this check, anyone who can create a machine could attach a powerful account and borrow its power. Treat this right as sensitive.
Permission to create tokens for a service account
This role lets a principal request short-lived credentials for a service account, which is what impersonation uses. It is powerful, so grant it only to people and tools that truly need to act as that account, and only on that account.
Use the organization policy that disables service account key creation, and require teams to request an exception with a clear reason. This single rule removes one of the largest sources of cloud credential leaks.
15Workload Identity Federation and Workload Identity for Kubernetes
Federation lets programs outside Google Cloud, and pods inside clusters, receive access without carrying secret keys.
Workload identity federation
Imagine a program running in another cloud or in your own data center that needs to read a file from Google Cloud storage. The old way is to download a service account key and store it next to the program. The modern way is workload identity federation. The program already has an identity in its own environment, such as a token issued by its cloud provider or a company identity system. It presents that token to Google’s security token service, which checks it against a trust relationship you set up in advance, and returns a short-lived Google access token. The program uses that token for a short time and then asks again. No long-lived Google secret ever exists outside Google Cloud.
flowchart LR
A["Workload in other cloud or data center"] --> B["Its own identity token"]
B --> C["Google security token service checks the trust setup"]
C --> D["Short lived Google access token"]
D --> E["Access to allowed Google Cloud resources"]
A traveller from another country does not receive a permanent local passport. Instead, the border office checks the traveller’s home passport against an agreement between the two countries and issues a short visitor pass. Federation is that border office, and the agreement is the trust you configure.
Workload identity for Kubernetes
Containers running in Google Kubernetes Engine face a special problem. Many pods share the same machines, so giving the machine one powerful service account would give every pod the same power. Workload identity for Kubernetes solves this by linking each Kubernetes service account to a specific identity, so each pod gets only the access its own application needs, using short-lived credentials supplied automatically. Different workloads on the same node can therefore hold different permissions.
No stored secrets
Nothing sensitive sits in configuration files, container images or repositories that could leak.
Short-lived access
Tokens expire quickly, so a stolen token is useful for only a short time.
Per-workload permissions
Each application receives its own narrow access rather than sharing a machine-wide identity.
Clear audit trail
Logs show which workload identity did what, which makes investigations much simpler.
Setting up federation with a trust rule that is too wide, for example accepting any identity from a whole external account instead of one specific workload. Always limit the trust to the exact repository, pipeline or application that needs access.
16People and Sign-In: Cloud Identity, Workspace and Workforce Federation
Before a person can receive a role, they need a trustworthy identity, and that identity needs to be managed throughout their time at the company.
Where human identities come from
Most companies manage employees through Google Workspace or Cloud Identity. These services hold the user accounts and groups, enforce password rules and second-step verification, and form the foundation of the organization in Google Cloud. When an employee joins, you create the account and add them to the right groups. When they leave, you suspend or remove the account and their access ends everywhere at once.
The human resources office issues employee badges and keeps the staff list up to date. The building’s door system then trusts that list. Cloud Identity is the human resources list, and IAM is the door system that reads it.
Single sign-on and external providers
Many companies already have a main identity provider that holds all employees. Instead of creating a second set of accounts, they connect Google Cloud to it so people sign in with their usual company login. This gives one place to enforce multi-factor authentication and one place to remove access when someone leaves.
Directory synchronization
Users and groups are copied from the company directory into Cloud Identity on a schedule. Google Cloud still manages the accounts, but the directory remains the source of truth.
Single sign-on
When a person signs in, Google redirects them to the company login page. The company system proves who they are, and Google trusts that answer.
Workforce identity federation
Instead of copying users into Google, a trust is set up so that people from an external identity provider can access Google Cloud directly, with attributes from the provider mapped to access rules. It is helpful for large or fast-changing workforces and for partners.
Require multi-factor authentication for everyone, and use stronger methods such as hardware security keys for administrators. A strong login for an administrator is worth far more than a clever policy for an ordinary user.
Using personal accounts, such as private email addresses, for company administration. The company cannot enforce rules on those accounts or remove them when people leave. Use managed accounts for all work access.
17Groups, Delegation and Separation of Duties
Groups make access manageable, and careful delegation keeps no single person too powerful.
Why groups are the main tool
Granting roles to individuals does not scale. If you have two hundred engineers and fifty projects, direct grants quickly become impossible to review. With groups, you define a small number of groups that match job functions, grant roles to the groups, and manage people by changing membership. A policy then contains a handful of readable group names instead of hundreds of email addresses.
A school does not tell the gatekeeper the name of every child allowed in. It says “students of class five may enter”. Each year, the class list changes but the instruction to the gatekeeper stays the same.
A sensible group design
One group per job and scope
For example, “payments developers”, “payments on-call” and “payments viewers”, each with a different role set on the payments projects.
Admin groups kept small
Groups that hold powerful roles have a very small membership, reviewed often, protected by strong login.
Clear owners
Every group has a named owner who approves new members and reviews the list regularly.
Naming that explains
Group names tell you the team, the resource area and the level of access, so a reviewer understands them without lookup.
Separation of duties
For sensitive work, no single person should be able to complete the whole process alone. The person who writes code should not be the only one who can release it to production. The person who creates users should not be the only one who can approve their powerful roles. In IAM terms, this means splitting dangerous permissions across different groups so that two people must cooperate, which greatly lowers the risk of both mistakes and abuse.
Nesting groups many levels deep until nobody understands who really has access. Keep group structures simple and flat enough that a reviewer can answer “who is in this group?” in a minute.
18Internal Working: How a Request Is Authorized
Follow a single request step by step to see how Google Cloud reaches its yes or no decision.
flowchart TD
A["Request arrives with an identity"] --> B["Identity is authenticated"]
B --> C["Organization policy and boundaries checked"]
C --> D{"Any deny rule matches?"}
D -- "Yes" --> X["Request refused"]
D -- "No" --> E["Collect allow policies from resource and ancestors"]
E --> F["Include roles from groups and conditions"]
F --> G{"Does a granted role contain the needed permission?"}
G -- "No" --> X
G -- "Yes" --> H["Request allowed and logged"]
Identity is confirmed
The request carries a credential such as a token. Google checks that it is valid, unexpired and belongs to a known principal.
The needed permission is identified
Each API method requires one or more specific permissions. For example, reading a stored file requires the permission to get objects.
Guardrails are checked
Boundaries and deny policies are evaluated first. A matching deny ends the process immediately with a refusal.
Allow policies are gathered
The system collects the policy on the resource and on every ancestor, expands groups into their members and applies any conditions.
The roles are compared with the permission
If any granted role contains the needed permission, and its condition is true, the request passes. If none does, it is refused.
The result is recorded
Depending on settings and service, the decision and the action are written to audit logs, so there is a record of who did what.
At an airport, the officer checks your passport, then checks the no-fly list, then checks whether your ticket allows this flight. Failing the no-fly check ends the process, whatever ticket you hold. The IAM decision follows the same order: identity, blocks, then grants.
The default answer is “no”. If nothing explicitly allows an action, it is refused. This default-deny design means that forgetting to grant access fails safe, while forgetting to restrict access is the real danger.
19Data Flow and Lifecycle of an Access Grant
Access should have a beginning, a review and an end. Treat every grant as something with a life, not a permanent fact.
Request
A person or team asks for access, giving the reason, the resource and how long it is needed.
Approval
An owner of the resource or group reviews the reason and approves the narrowest role that meets the need.
Grant
The role is granted, ideally through a group membership or a time-limited condition, and recorded in version-controlled configuration.
Propagation
The change spreads through Google Cloud. IAM changes are eventually consistent, usually effective within a couple of minutes but sometimes taking longer, so a brand-new grant may not work in the first few seconds.
Use and monitoring
The principal uses the access, and audit logs and recommendations show whether the permissions are actually used.
Review
On a schedule, owners confirm the access is still needed. Unused permissions are narrowed or removed.
Revocation
When the job ends or the project closes, access is removed. Removal also takes a short time to spread, and cached sessions may last briefly.
A library card is issued with a form, approved by the librarian, valid for a period, renewed or cancelled later. Nobody expects a card issued ten years ago for a former student to still open the doors. Access grants need the same lifecycle.
Revocation is not always instant
Two things deserve attention. First, because IAM is eventually consistent, a removal may take a little time to be effective everywhere. Second, credentials that were already issued, such as short-lived tokens, remain valid until they expire. In an emergency, such as a suspected compromise, you should remove the access, disable or delete the affected service account or keys, and rotate anything that might have been exposed, rather than only waiting for the policy change to settle.
Granting access “for now” with no end date. Temporary grants that never expire become permanent over-privilege. Use time-based conditions, or add a calendar reminder and a review owner every time you make a temporary grant.
20Tools That Explain and Improve Access
Google Cloud includes several helpers that answer the hardest IAM questions without guesswork.
Policy Troubleshooter
Given a principal, a resource and a permission, it explains whether access is granted and shows exactly which policies lead to that result, including deny rules and conditions.
Policy Analyzer
Answers questions such as who can read this bucket, or what can this person access across the organization, by examining all the relevant policies and group memberships.
IAM recommender
Looks at which permissions each principal actually used over a period and suggests narrower roles, removing the unused ones.
Policy Simulator
Lets you test how a proposed policy change would affect real past access, before you apply it, to avoid accidentally breaking things.
Cloud Asset Inventory
Keeps a searchable record of resources and their policies, and can export history for analysis and compliance reports.
Security posture tools
Security services can highlight risky grants, public access and unused powerful service accounts so teams can fix them.
A building manager has a few useful tools: a log that explains why a door refused a badge, a report of every person who can open the server room, a suggestion list of badges that open far more doors than their owners ever use, and a rehearsal mode to test a new rule before applying it. These tools do the same for IAM.
A healthy review loop
Discover
Use the analyzer and inventory to list who can reach your most sensitive resources.
Right-size
Use recommendations to replace broad roles with narrower ones that match real usage.
Test
Use the simulator to see what would break before you change anything in production.
Apply and verify
Make the change through your normal reviewed process and confirm with the troubleshooter that the right access remains.
21Audit Logging: The Record of Who Did What
Good access control is only half the job. The other half is being able to prove, afterwards, what actually happened.
The main kinds of audit logs
Admin Activity logs
Record actions that change configuration or metadata, such as creating a virtual machine, changing an IAM policy or creating a service account key. They are written automatically, cannot be turned off and carry no extra charge for storage in the default retention.
Data Access logs
Record reads of data and metadata, and writes of user-provided data. They can be very large, so for most services they are off by default and must be enabled deliberately, usually for the most sensitive services and projects.
Policy Denied logs
Record when a request is refused because of a security policy. They help you notice both attacks and honest mistakes, such as a program that lost a permission it needed.
System Event logs
Record actions that Google systems perform on your resources, not actions by people, such as automatic moves of a machine during maintenance.
A building has a log of who changed the door rules, a camera record of who actually entered the sensitive rooms, and a list of every time a badge was refused. Audit logs are those three records for your cloud.
What a good record answers
An audit entry tells you who made the call, which method they called, which resource it affected, from which network address, when it happened and whether it was allowed. When service account impersonation is used, the record also shows both the original caller and the account that was used, which makes it possible to trace actions back to a real person.
Send audit logs from every project to a central, protected location with strict access and long retention. An attacker who gains control of a project should not be able to delete the evidence of what they did.
Turning on every possible Data Access log everywhere and being surprised by the cost. Decide which data is sensitive enough to deserve full read logging, and enable it there first.
22Governance and Monitoring of Access Changes
Access is never finished. It drifts over time, so it needs watching, alerting and regular review.
Alert on the changes that matter
Because every IAM change is written to the audit logs, you can build alerts that tell the security team the moment something risky happens. The aim is to be told about rare and serious events, not to be flooded with every ordinary change.
Powerful role granted
Someone receives an owner-style role, or a role that can change IAM policies, especially at the organization or folder level.
Service account key created
A new downloadable key appears, which is a risky event that should be rare if your organization policy discourages keys.
Public access added
A resource is made available to everyone on the internet, which may be a mistake or an attack.
Guardrail changed
Someone changes an organization policy, a deny policy or an audit setting, which could be an attempt to weaken your defenses.
Break-glass account used
An emergency administrator account is used. This should be very rare and should always trigger an immediate review.
Unusual impersonation
A service account is used by an identity that does not normally use it, or at an unusual time or place.
Regular access reviews
List who has access to sensitive resources
Use inventory and analysis tools to produce a report of principals and their roles on the most important projects.
Ask owners to confirm
Send each owner the list for their area and ask them to confirm or remove each entry with a deadline.
Remove what is not confirmed
Anything unconfirmed after the deadline is removed, and can be restored quickly if a real need appears.
Record the result
Keep the review record for auditors, which proves that access is actively managed, not only granted.
A school checks every year which students still hold library cards, which teachers still hold lab keys and which former staff still have gate passes. Without this yearly check, old passes pile up and become a security risk.
23Security Best Practices
A short list of habits that prevents most real-world cloud access incidents.
The core habits
- Least privilege. Give the narrowest role that lets the job work, on the lowest resource that makes sense.
- Prefer predefined roles over basic roles. Avoid the owner and editor basic roles in production, especially for service accounts.
- Use groups. Grant to groups that match jobs, and manage people through membership.
- Avoid service account keys. Use attached accounts, impersonation and federation instead, and block key creation by organization policy.
- One service account per workload. Never share a powerful account between unrelated applications.
- Protect administrators. Use strong multi-factor authentication, separate administrator accounts from daily accounts and keep the number of powerful people small.
- Use temporary access. Prefer time-limited grants and approval-based elevation over permanent powerful roles.
- Add guardrails. Use organization policies and deny policies to block the riskiest actions across the whole company.
- Log and alert. Keep audit logs in a protected place and alert on risky IAM changes.
- Review regularly. Use recommendations and access reviews to remove unused permissions.
Do this
- Grant roles to groups at project or lower level
- Use predefined roles and conditions
- Use short-lived credentials and federation
- Keep a documented break-glass process
- Manage IAM as reviewed configuration
Avoid this
- Granting owner or editor to many people
- Downloading and sharing service account keys
- Granting broad roles at the organization level
- Leaving temporary access in place forever
- Using personal accounts for company administration
Good home security is a habit, not a gadget: lock the doors, do not hide spare keys under the mat, give the cleaner a key only for the hours they work, and change the locks when someone moves out. These ten habits are the same discipline applied to your cloud.
Prepare an emergency administrator account in advance, protect it with very strong login, store its credentials securely offline, monitor its use and test the procedure every so often. When everything else is broken, you will be glad it exists.
24Design Patterns That Work
Organizations that manage access well tend to repeat a few simple designs.
Folders that mirror ownership and environment
Create folders for each business area and, below them, separate folders for development, testing and production. Access and guardrails are then applied at the folder level, matching how the company really works.
Groups for jobs, roles for services
Define groups by job function and grant each group a small set of predefined roles. Combine this with a pattern of per-workload service accounts for programs, so humans and machines are never mixed up.
Central security project for shared controls
Keep audit logs, security tooling and shared keys for encryption in one tightly controlled project that only the security team can administer, separate from the workloads being protected.
Tags for environment-based access
Attach tags to projects and resources to mark production, test and development, then use conditions so that broad developer access works only in non-production environments.
Landing zone with guardrails built in
New projects are created from a standard template that already has the right folder, groups, logging, organization policies and network rules. Teams start safe by default and do not have to invent security themselves.
Just-in-time elevation
Engineers hold ordinary access day to day and request powerful roles for a short time when they need them, with approval, a reason and automatic expiry.
Impersonation for administration
Instead of giving people direct powerful roles, give them permission to impersonate a dedicated administration service account for specific tasks. Every use is recorded and permissions can be tightened in one place.
A well-run city has neighborhoods with local rules, a central emergency service, standard building plans and temporary permits for special events. Cloud access design copies those ideas: folders as neighborhoods, a security project as the emergency service, landing zones as building plans and just-in-time elevation as temporary permits.
25Anti-Patterns to Avoid
These common mistakes appear again and again in real incidents and audits.
Problem
Everyone in the engineering team is given the owner or editor basic role on all projects, because it removes friction and nobody is ever blocked.
Why It’s Harmful
A single compromised laptop or a single mistaken command can delete production data or expose it. Nobody can say what each person truly needs, and audits become impossible to pass.
Correct Approach
Grant narrow predefined roles through groups, and offer a quick, approved route to temporary elevation when someone really needs more.
Problem
Service account keys are downloaded, pasted into code repositories, chat messages and configuration files so applications can connect.
Why It’s Harmful
Keys do not expire by default, can be copied without any trace and are used from anywhere. Leaked keys are one of the most common causes of cloud breaches.
Correct Approach
Use attached service accounts, workload identity and federation. Block key creation by organization policy and monitor any exceptions.
Problem
One service account is shared by many applications and given broad roles, because creating separate accounts feels like extra work.
Why It’s Harmful
If any one application is compromised, the attacker gains the combined power of all the applications. It is also impossible to tell from the logs which application did what.
Correct Approach
Create a separate, narrowly scoped service account for each workload, with a clear name and owner.
Problem
Access is granted directly to individual email addresses across many projects, and nobody ever removes it when people change roles or leave.
Why It’s Harmful
Old access piles up silently. Former employees and people in new roles keep access they should no longer have, and reviews become a slow manual hunt.
Correct Approach
Grant to groups, tie membership to the company directory and review group membership regularly.
Problem
Resources are made public to everyone to fix a quick sharing problem, with the plan to close access later.
Why It’s Harmful
Later rarely comes. Public storage containing sensitive data is found by automated scanners within hours, and the exposure can go on for months.
Correct Approach
Share with specific identities, use time-limited access links where necessary and block public sharing through organization policy for sensitive projects.
26Real-World and Industry Examples
The same IAM tools solve very different problems depending on the kind of organization.
An online retailer with seasonal teams
Developers belong to groups per product area. Production projects sit in a protected folder where developers have only viewing access, and engineers on call request a time-limited elevated role during incidents. Temporary seasonal staff receive access through conditions that expire at the end of the sale period.
A bank with strict audit needs
Deny policies protect the most dangerous actions across the organization. Data Access logs are enabled on sensitive datasets and sent to a locked project. Access reviews are run every quarter, and separation of duties ensures no one person can both change code and release it.
A data platform serving many analysts
Analysts are in groups with read roles on specific datasets, and a recommender-driven review trims unused access every month. Tags mark datasets that contain personal information, and conditions limit who can read those tags.
A software company using continuous delivery
The build pipeline runs in another cloud and uses workload identity federation to deploy to Google Cloud with short-lived tokens limited to one repository. No deployment key exists anywhere, so there is nothing to leak.
A healthcare provider with outside partners
Partner staff come through workforce identity federation from their own identity provider, and a principal access boundary limits them to a small set of projects. Context-aware rules require managed devices.
A small start-up with five engineers
One organization, a handful of projects, three groups and predefined roles. Service account keys are blocked from day one, and the founders hold strong login on hardware keys. It takes an afternoon to set up and avoids years of cleanup later.
27Advantages, Disadvantages and Trade-offs
IAM is powerful, but it has costs and limits that every designer should know.
Advantages
- Built in and managed, with nothing to run or patch
- Consistent model across all Google Cloud services
- Hierarchy and inheritance make broad control efficient
- Rich tools for conditions, deny rules, analysis and recommendations
- Strong support for short-lived credentials and federation
- Full audit trail for compliance and investigation
Disadvantages / Trade-offs
- Inheritance and group nesting make effective access hard to see at a glance
- Large role catalogs take time to learn
- Custom roles need ongoing maintenance
- Changes are eventually consistent, not instant
- Some features, such as conditions, are not supported on every resource
- Good design requires organizational discipline, not only tooling
Choosing the right control
| Need | Best tool | Reason |
|---|---|---|
| Give a team access to a dataset | Group with predefined role at project or resource level | Simple, readable and easy to review |
| Give a contractor access for two weeks | Role binding with an expiry condition | Access ends by itself |
| Stop anyone creating public addresses on machines | Organization policy constraint | Applies regardless of role |
| Block a dangerous action for nearly everyone | Deny policy with an exception group | Deny overrides any allow |
| Let outside pipeline deploy without keys | Workload identity federation | Short-lived tokens, no stored secrets |
| Stop data leaving a protected zone | VPC Service Controls perimeter | Perimeter protects data movement |
No single tool does everything. The strongest designs layer them, so that a mistake in one layer is caught by another. Strong access control combines good identity, narrow grants, guardrails, monitoring and regular review.
28Troubleshooting “Permission Denied”
Everyone meets a permission error sooner or later. A calm, ordered approach finds the cause quickly.
Read the error message fully
It usually names the identity, the permission that was missing and the resource. That is most of the answer already.
Confirm which identity is really making the call
Many errors come from a program using a different service account than expected, or a person signed in with the wrong account.
Use the troubleshooter
Enter the principal, the resource and the permission, and let the tool show which policies, conditions or denies led to the result.
Check for other blockers
Look at deny policies, organization policy constraints, boundaries, service perimeters and whether the API is enabled in the project.
Grant the narrowest fix
Find the smallest predefined role containing the missing permission, grant it at the lowest sensible level, and avoid the temptation to grant an owner role.
Allow for propagation
Wait a few minutes before retrying, and retry with a fresh credential, since changes may not apply immediately.
Wrong identity
The command line or application is signed in as a different account than the person assumes.
Role granted at the wrong level
The role was added to a different project or resource than the one being used.
Condition not met
A time or tag condition is false, such as an expired grant or a missing tag.
Hidden deny or constraint
A deny policy, organization policy or perimeter blocks the request even though a role was granted.
API not enabled
The service itself is not turned on for the project, which often shows up as a permission-style error.
Delay in propagation
The grant is correct but has not yet spread everywhere. Waiting and retrying fixes it.
Fixing a permission error by granting the owner role “just to see if it works”. The role then stays forever. Find the exact missing permission instead and grant the smallest role that holds it.
29IAM as Code and Automation
Access rules written down, reviewed and applied by a pipeline are far safer than rules clicked in a console.
Why write access down
When access is changed by hand in a console, there is no review, no history and no easy way to rebuild. When access is described in configuration files stored in version control, every change has an author, a reason and a reviewer. A pipeline applies the changes consistently. If someone makes a manual change outside the process, it can be detected and reversed.
A restaurant that follows written recipes produces the same dish every night and can train new cooks easily. A kitchen where each cook improvises produces surprises. Writing IAM as code is writing the recipe for access.
Version control for all policy
Role bindings, organization policies, deny policies and custom roles live in a repository with required reviews.
Automated checks
The pipeline rejects changes that grant owner roles, make resources public or break naming rules, before they reach production.
Drift detection
Scheduled comparisons find manual changes and alert the team so that the repository and reality stay identical.
Self-service with limits
Teams request access through a simple form or pull request, and approved patterns are applied automatically without waiting for a central team.
Protect the pipeline itself as carefully as the most powerful administrator, because whoever controls it controls access. Give it a narrowly scoped identity, require reviews and log every run.
30A Practical Adoption Roadmap
You do not need a perfect design on day one. Build in stages, starting with the controls that remove the largest risks.
Week one: identity and organization
Set up the organization, connect your identity provider, enforce multi-factor authentication, create emergency administrator accounts and name a very small set of organization administrators.
Weeks two to three: structure and guardrails
Design folders for business areas and environments, switch on key organization policies such as key creation blocking and domain restricted sharing, and create the central logging project.
Month two: groups and roles
Create job-based groups, grant narrow predefined roles to groups, and replace direct grants and basic roles wherever you find them.
Month three: machine identities
Give each workload its own service account, remove keys, adopt workload identity and federation, and clean up default accounts.
Month four: monitoring and review
Enable audit logs where needed, add alerts for risky IAM changes and run the first access review using recommendations and analysis tools.
Ongoing: code, elevation and refinement
Move policy into version control, add temporary elevation for powerful roles, and keep refining after each incident and each review.
How to know it is working
Signs of a healthy setup include few people with powerful roles, no service account keys in use, nearly all access flowing through groups, quick and clear answers to the question “who can access this?”, alerts that fire rarely and are always acted on, and access reviews that complete on time with little surprise.
31Roles Worth Knowing and Handling With Care
The role catalog is large, but a small group of roles appears in almost every organization, and knowing them helps you spot risk quickly.
Role names and exact contents can change as Google updates services, so always confirm details in the current documentation. The list below explains the purpose of common roles in plain language and how carefully each should be handled.
Organization Administrator
Manages the organization node and its policies, and decides who administers folders and projects. This is among the most powerful roles in the company and should be held by very few people.
Folder Admin
Manages folders and the projects within them, useful for department leads who organize their own area but should not control the whole company.
Project Creator
Allows creating new projects under an organization or folder. It is often given to a controlled automation process or a platform team so that new projects always follow a standard.
Security Admin
Can view and change many security settings, including IAM policies on resources. Because it can change who has access, it is a privilege escalation risk and must be tightly controlled.
Security Reviewer
Can view IAM policies and security configuration without changing them. A good fit for auditors and security analysts who need to inspect but not modify.
Organization Policy Administrator
Can set organization policy constraints. It controls the guardrails of the company and so is reserved for the central security or platform team.
Service Account Admin
Can create and manage service accounts, though not necessarily use them. It should be separated from the right to act as those accounts.
Service Account User
Allows a principal to attach a service account to resources and act as it for that purpose. Grant it on specific accounts, not on a whole project.
Service Account Token Creator
Allows creating short-lived credentials for a service account, which is what impersonation uses. Grant it narrowly and review it often.
Logs Viewer
Can read logs without changing anything, which suits developers troubleshooting their services. Sensitive audit logs may need an even narrower arrangement.
Storage Object Viewer
Can read objects in storage buckets but not change or delete them. A typical role for applications and analysts who only consume data.
BigQuery Data Viewer
Can read table data in datasets, often combined with a separate role for running queries, so that reading and running work can be granted independently.
Compute Instance Admin
Can create, change and delete virtual machines. It is an example of a service-specific administrator role that is far narrower than a basic editor role.
Billing Account Administrator
Manages the billing account and who can use it. Spending control is a sensitive power, so it is usually kept separate from technical administration.
In a hospital, some badges open the pharmacy, some open the records room and some control who else receives badges. The badge that controls who receives badges is the most sensitive of all. In Google Cloud, roles that manage IAM policies, organization policies and service account usage are those badges.
Roles that deserve extra protection
Roles that change access
Any role that can edit IAM policies, including security administration and organization administration roles, can give itself more power. Keep these groups tiny, use strong login and consider temporary elevation instead of permanent membership.
Roles that act as other identities
Roles that allow acting as a service account or creating tokens for it transfer the power of that account to the holder. Grant them on specific service accounts, never on a whole project or folder unless you fully understand the consequences.
Roles that read broad data
Roles that read all storage or all datasets can expose the entire business at once. Prefer roles scoped to named resources and add conditions or boundaries for the most sensitive data.
Make a short internal list of “roles that need approval”, write down who may hold each one and why, and link that list from your access request process. A short, clear list is followed far more often than a long, vague rule.
32Common Misconceptions About IAM
Many access problems begin with a small wrong belief. Clearing these up early saves a great deal of trouble later.
Myth: Read-only means harmless
A viewer-style role may still expose sensitive data, and a person with read access plus the right to create keys or impersonate an account can climb to far higher privilege. Always examine indirect paths, not only the headline role.
Myth: Removing a direct grant removes all access
Access can also arrive through groups, through grants on parent folders and through other roles. Check effective access, not only the policy you just edited.
Myth: A deny policy is just a stronger allow
Deny and allow are different tools. Allow adds access. Deny blocks selected permissions and wins over any allow, which makes it ideal for guardrails but dangerous when written too broadly.
Myth: The owner role is the safe choice because it always works
It works because it can do almost everything, including giving itself and others more access. That is exactly why it is dangerous when a laptop, a pipeline or a service account is compromised.
Myth: A service account is just a shared password
A service account is an identity with roles, and when used well it never involves a password or a stored key at all. Attached accounts and federation deliver short-lived credentials automatically.
Myth: IAM changes apply instantly everywhere
Changes are eventually consistent and usually take effect within a couple of minutes, sometimes longer, and tokens already issued stay valid until they expire. Plan for a short delay.
Myth: Organization policy and IAM are the same thing
IAM decides who may do an action. Organization policy decides what configuration is permitted at all, so even a fully authorized administrator cannot break an organization constraint.
Myth: Security is finished once the policies are written
Access drifts as people move, projects change and new services appear. Monitoring, alerts and regular reviews are what keep a good design good over the years.
Notice that every one of these misconceptions leads to either too much access or too little visibility. The cure is the same each time: understand the model, check effective access with the right tools, keep grants narrow and temporary, and review regularly.
33Glossary of IAM Terms
A quick reference for the words used in this guide, in alphabetical order.
Allow policy
The collection of role bindings attached to one resource, describing who has which role on it.
Audit logs
Records of who did what, on which resource and when, used for security reviews and investigations.
Authentication
Proving who you are, for example by password, second factor or token.
Authorization
Deciding what an authenticated identity is allowed to do.
Basic roles
The broad original roles such as viewer, editor and owner that cover many services at once.
Break-glass account
A heavily protected emergency administrator account kept for situations when normal access fails.
Condition
An extra rule attached to a role binding so that it applies only when specific facts are true.
Custom role
A role you create yourself by choosing individual permissions.
Default deny
The principle that anything not explicitly allowed is refused.
Deny policy
A rule that blocks selected permissions for selected principals regardless of any allow policy.
Etag
A version marker on a policy that prevents one person’s change from silently overwriting another’s.
Federation
Trusting an outside identity provider so that its users or workloads can access Google Cloud without separate accounts or keys.
Folder
A grouping level between the organization and projects used to organize resources and apply shared access.
Group
A named collection of identities to which roles can be granted together.
Impersonation
Obtaining short-lived credentials to act as a service account, with permission and with an audit record.
Inheritance
The way grants and rules on a parent in the hierarchy apply to everything beneath it.
Least privilege
Giving only the access required for a task and nothing more.
Organization
The top node of the hierarchy, representing the whole company.
Organization policy
A constraint on how resources may be configured, applied regardless of who acts.
Permission
The right to perform one specific action on one type of resource.
Predefined role
A role maintained by Google for a specific service or job.
Principal
Any identity that can be granted access, such as a user, group, service account or federated identity.
Project
The basic container for resources, where APIs, billing and most day-to-day work live.
Resource
Any object protected by IAM, from a whole project down to a single file or table.
Role
A named bundle of permissions that is granted to principals.
Role binding
One entry in a policy linking a role to one or more principals, optionally with a condition.
Service account
An identity for an application or workload rather than a person.
Service account key
A downloadable credential file for a service account, risky if leaked and best avoided.
Tag
A key and value attached to a resource that can be used in conditions and policies.
VPC Service Controls
A perimeter feature that helps prevent data from leaving a protected set of services and projects.
34Frequently Asked Questions
Cloud Identity manages the people: user accounts, groups and sign-in rules. IAM decides what those identities may do on Google Cloud resources. One proves who you are and keeps the directory, the other decides what you are allowed to touch.
They are convenient for tiny experiments, but they carry thousands of permissions across all services. In production, prefer predefined roles for the specific services you use, and use custom roles only when predefined ones are still too broad.
Access may still reach them through a group, through a grant at a higher level in the hierarchy, or through another role. Also, changes take a short time to spread, and tokens already issued remain valid until they expire. Use the troubleshooter to see every route.
A deny policy blocks specific permissions for specific principals, so it is about who may do what. An organization policy restricts how resources may be configured whoever is acting, so it is about what is allowed to exist.
A key is a long-lived secret that can be copied and used from anywhere without any other check. If it leaks, an attacker has lasting access. Attached accounts, impersonation and federation use short-lived credentials and avoid storing secrets at all.
Add a time-based condition to the role binding so it expires by itself, or use an approval-based elevation feature that grants powerful access for a short, recorded period. Either way, avoid leaving manual temporary grants without an end date.
At the lowest level that still meets the need. Use the organization level for a few company-wide administrators, folders for shared team and environment access, projects for most daily work, and individual resources for narrow exceptions.
Policies are attached to resources, not to people, so you need a tool that combines inherited policies and group memberships. Policy Analyzer and Cloud Asset Inventory are built for this question, and the troubleshooter helps with a single principal and permission.
Yes. With workload identity federation the program presents a token from its own environment, which Google exchanges for a short-lived access token based on a trust you configure. No long-lived Google secret has to be stored outside Google Cloud.
Not always. IAM is eventually consistent, so a change usually takes effect within a couple of minutes but can occasionally take longer. After granting or removing access, wait briefly and retry, and in emergencies also revoke credentials, not just policies.
It means choosing the narrowest role that makes the job work, at the lowest sensible level, for the shortest time needed. Over time, you also use usage data and recommendations to remove permissions that nobody actually uses.
IAM is the foundation but not the whole defense. Combine it with strong sign-in, organization policies, deny rules, perimeters such as VPC Service Controls, encryption, logging and alerting, and regular reviews so that one mistake does not expose everything.
35Summary and Key Takeaways
Identity and Access Management in Google Cloud answers one question for every request: may this identity do this action on this resource? It does so through a simple model of principals, roles and resources, stored as allow policies that flow down the resource hierarchy, refined by conditions, limited by deny rules and guardrails, and recorded in audit logs. Programs use service accounts, preferably through attachment, impersonation and federation instead of keys. People are managed through groups and a trusted identity provider. Good IAM is less about clever features and more about steady habits: narrow grants, short lifetimes, clear ownership and regular review.
Remember the hotel from the beginning. Nobody gets a master key. Each person receives a card that opens only what their job needs, only for as long as they need it, and every door keeps a record of who passed through.
A short self-check for your own environment
Ask yourself a few questions. Can you name everyone who holds a powerful role on your organization, and is that list short? Do any service account keys exist, and if so, who owns them and why? Is access granted to groups rather than individuals? Are risky actions such as public sharing blocked by policy? Would you be alerted if someone granted themselves an administrator role tonight? If any answer is uncertain, that is where to begin.
Choose one sensitive project and apply the whole guide to it end to end: group-based access with predefined roles, per-workload service accounts with no keys, guardrails from organization policy, audit logging, an alert for risky changes and a first access review. When that project feels clean and understood, repeat the pattern across the organization.
Key Takeaways
- Who, which role, on which resource — every grant is that three-part sentence, stored as a role binding inside an allow policy attached to a resource.
- Hierarchy and inheritance — policies flow from organization to folder to project to resource, and allow grants add up, so grant at the lowest level that works.
- Prefer predefined roles and groups — avoid broad basic roles and grant to job-based groups so that access stays readable and easy to review.
- Deny and organization policy are guardrails — deny rules override allow, and organization policies restrict configuration whoever is acting.
- Treat service accounts as high-value targets — one account per workload, narrow roles, and use attachment, impersonation and federation instead of downloaded keys.
- Make access temporary and visible — use conditions and elevation with expiry, keep audit logs safe, and alert on risky IAM changes.
- Review and automate — use the troubleshooter, analyzer and recommendations, keep policy as reviewed code, and run regular access reviews to keep privilege shrinking, not growing.