Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is an IAM policy binding in Google Cloud?
An IAM policy binding connects a role to one or more members, defining who has what permissions on a resource.
Click to reveal answer
beginner
What are the main components of an IAM policy binding?
The main components are: 1. Role - a set of permissions. 2. Members - users, groups, or service accounts. 3. Condition (optional) - a rule to limit when the binding applies.
Click to reveal answer
beginner
How do you specify a member in an IAM policy binding?
Members are specified by their type and identity, for example: - user:email@example.com - serviceAccount:my-sa@project.iam.gserviceaccount.com - group:group@example.com
Click to reveal answer
intermediate
What is the purpose of a condition in an IAM policy binding?
A condition limits when the binding applies, based on attributes like request time or resource properties, adding extra security control.
Click to reveal answer
beginner
Why should you follow the principle of least privilege when creating IAM policy bindings?
To give only the minimum permissions needed, reducing the risk of accidental or malicious actions on your cloud resources.
Click to reveal answer
What does an IAM policy binding connect in Google Cloud?
AA VM to a network
BA role to members
CA project to a billing account
DA storage bucket to a folder
✗ Incorrect
An IAM policy binding connects a role (permissions) to members (users, groups, service accounts).
Which of the following is NOT a valid member type in an IAM policy binding?
B. The 'members' field should be a list, not a string.
C. The user email format is incorrect.
D. The 'role' field is misspelled.
Solution
Step 1: Check 'members' field type
The 'members' field must be a list of strings, not a single string.
Step 2: Verify other fields
'role' is correctly spelled, user email format is valid, and 'version' is optional.
Final Answer:
The 'members' field should be a list, not a string. -> Option B
Quick Check:
Members must be a list [OK]
Hint: Members always need square brackets [] [OK]
Common Mistakes:
Using string instead of list for members
Assuming 'version' is mandatory
Mistaking email format as error
5. You want to grant the 'roles/logging.logWriter' role to all users in your organization except external users. Which IAM policy binding approach is best?
hard
A. Bind 'roles/logging.logWriter' to 'domain:yourcompany.com' member.
B. Bind 'roles/logging.logWriter' to 'allAuthenticatedUsers' member.
C. Bind 'roles/logging.logWriter' to 'allUsers' member.
D. Bind 'roles/logging.logWriter' to 'user:external@example.com' member.
Solution
Step 1: Understand member types
'allUsers' includes everyone, including external; 'allAuthenticatedUsers' includes any signed-in Google user; 'domain:' restricts to your company domain.
Step 2: Choose member to exclude external users
Using 'domain:yourcompany.com' grants access only to users in your company domain, excluding external users.
Final Answer:
Bind 'roles/logging.logWriter' to 'domain:yourcompany.com' member. -> Option A
Quick Check:
Domain member limits to internal users [OK]
Hint: Use domain: to restrict to company users [OK]
Common Mistakes:
Using allUsers exposes to everyone
Using allAuthenticatedUsers includes external Google accounts