D1: Granting IAM Roles in a Project
Google Cloud Associate Cloud Engineer exam practice questions · 12 flashcards
Question
What is a principal (member) in IAM?
1 / 12
Tip: Space flips the card, ← / → navigate.
Show all 12 Granting IAM Roles in a Project practice questions and answers
- What is a principal (member) in IAM?An identity granted roles: Google account, service account, Google group, domain, or federated identity.
- How do you grant a role on a project with gcloud?gcloud projects add-iam-policy-binding PROJECT_ID --member=user:EMAIL --role=ROLE.
- How do you remove a role binding?gcloud projects remove-iam-policy-binding PROJECT_ID --member=... --role=...
- Member prefixes in gcloud?user:, serviceAccount:, group:, domain:.
- Best practice for granting roles to many people?Grant to Google groups, not individuals.
- What is the principle of least privilege?Grant only the minimum permissions needed.
- Where do you grant roles in the console?IAM & Admin → IAM → Grant access.
- Can one principal have multiple roles?Yes, permissions are the union of all roles.
- What are allUsers and allAuthenticatedUsers?Special principals for anyone on the internet / any Google-authenticated account. Avoid for sensitive data.
- What role lets someone manage IAM on a project?Project IAM Admin (roles/resourcemanager.projectIamAdmin) or Owner.
- Why avoid basic roles like Editor in production?They're very broad; use predefined or custom roles.
- What are IAM conditions?Attribute-based rules (time, resource name) limiting when a binding applies.