Associate Cloud Engineer ยท Resource hierarchy, projects and identities
Managing users and groups in Cloud Identity
Creating and managing users and groups in Cloud Identity manually and automated (Google Cloud Directory Sync, Admin SDK/API), why to grant roles to groups instead of individuals.
Key points
- Create users and groups in the Admin console or automate it.
- Google Cloud Directory Sync (GCDS) copies them from LDAP or Active Directory.
- The Admin SDK Directory API lets you script changes.
- gcloud:
gcloud identity groups memberships add. - Grant IAM roles to groups, not individuals.
Source: https://docs.cloud.google.com/sdk/gcloud/reference/identity/groups/memberships/add
Practice questions
To whom is it best practice to grant IAM roles for a team of engineers?
- A group containing the engineers
- Each engineer individually
- The team lead, who shares access with others
- allUsers
Show answer
Answer: A. A group containing the engineers
Granting to a group means adding or removing a person is just a membership change. Per-person grants multiply bindings and are hard to audit.
Which approaches can create and maintain Cloud Identity users or groups without clicking through each one by hand?
- Google Cloud Directory Sync
- The Admin SDK Directory API
- Storage Transfer Service
- A Cloud Billing budget alert
- An organization policy list constraint
Show answer
Answer: A. Google Cloud Directory Sync, B. The Admin SDK Directory API
GCDS syncs from LDAP/AD and the Admin SDK Directory API is scriptable. Storage Transfer, budgets and org policy constraints do not manage identities.
True or false: granting roles to individual users is preferred over groups because it is easier to audit.
Show answer
Answer: False
False. Per-user bindings pile up and are harder to review; groups keep one binding per role and move changes into membership.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
