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 a 'user' in Google Cloud Platform (GCP)?
A user is an individual person who has a Google account and can access GCP resources with permissions assigned to their account.
Click to reveal answer
beginner
What is a 'group' in GCP IAM?
A group is a collection of users managed together. Assigning permissions to a group applies those permissions to all users in that group.
Click to reveal answer
beginner
What is a 'service account' in GCP?
A service account is a special account used by applications or virtual machines to access GCP resources securely without user intervention.
Click to reveal answer
intermediate
Why use groups instead of assigning permissions to individual users?
Groups simplify management by letting you assign permissions once to many users, making it easier to add or remove users without changing permissions repeatedly.
Click to reveal answer
intermediate
How do service accounts improve security in GCP?
Service accounts allow applications to have their own identity with limited permissions, reducing risk by not using user credentials and enabling fine-grained access control.
Click to reveal answer
Which member type in GCP is best for an application to access resources securely?
AUser
BService Account
CDomain
DGroup
✗ Incorrect
Service accounts are designed for applications or virtual machines to access resources securely without using user credentials.
What happens when you assign a role to a group in GCP IAM?
AAll users in the group get the role permissions
BOnly the group owner gets the role
CThe role is assigned to all users in the project
DThe role is assigned to service accounts only
✗ Incorrect
Assigning a role to a group grants those permissions to every user who is a member of that group.
Which of these is NOT a valid member type in GCP IAM?
AUser
BService Account
CVirtual Machine
DGroup
✗ Incorrect
Virtual machines are resources, not member types. Members are users, groups, service accounts, or domains.
Why should you avoid using user accounts for automated tasks in GCP?
AUser accounts cannot access GCP
BUser accounts expire quickly
CUser accounts have no permissions
DUser credentials can be less secure and harder to manage for automation
✗ Incorrect
Using service accounts for automation is safer because user credentials can be compromised and are not designed for automated access.
What is the main benefit of using groups in GCP IAM?
AGroups simplify permission management for multiple users
BGroups are used to store data
CGroups can run virtual machines
DGroups replace service accounts
✗ Incorrect
Groups help manage permissions efficiently by assigning roles to many users at once.
Explain the differences between users, groups, and service accounts in GCP IAM.
Think about who or what needs access and how they are managed.
You got /3 concepts.
Describe why service accounts are important for security in GCP.
Consider automated tasks and how they should access resources safely.
You got /3 concepts.
Practice
(1/5)
1. Which of the following is a correct way to specify a user as a member in GCP IAM?
easy
A. user:alice@example.com
B. serviceaccount:alice@example.com
C. group:alice@example.com
D. member:alice@example.com
Solution
Step 1: Understand member types in GCP IAM
GCP IAM requires a prefix to identify the member type, such as user, group, or serviceaccount.
Step 2: Identify the correct prefix for a user
The prefix for an individual user is user:. So the correct format is user:email.
Final Answer:
user:alice@example.com -> Option A
Quick Check:
User members start with 'user:' [OK]
Hint: User members always start with 'user:' prefix [OK]
Common Mistakes:
Using 'member:' prefix which is invalid
Confusing group and user prefixes
Using serviceaccount prefix for users
2. Which of the following is the correct syntax to specify a service account member in GCP IAM?
easy
A. service-account:my-service@project.iam.gserviceaccount.com
B. serviceaccount:my-service@project.iam.gserviceaccount.com
C. group:my-service@project.iam.gserviceaccount.com
D. user:my-service@project.iam.gserviceaccount.com
Solution
Step 1: Recall the prefix for service accounts
Service accounts use the prefix serviceaccount: followed by the full service account email.
Step 2: Check each option's prefix
Only serviceaccount:my-service@project.iam.gserviceaccount.com uses the correct prefix serviceaccount: without hyphens or mistakes.
Final Answer:
serviceaccount:my-service@project.iam.gserviceaccount.com -> Option B
Quick Check:
Service accounts use 'serviceaccount:' prefix [OK]
Hint: Service accounts use 'serviceaccount:' prefix without hyphens [OK]
Common Mistakes:
Using 'service-account:' with a hyphen
Using 'user:' prefix for service accounts
Using incomplete email addresses
3. Given the following IAM policy binding snippet, which member will have access?