What is Cloud IAM?
Identity and access management - allows fine-grained access control to cloud resources with users, roles and privileges
What types of roles are there?
Key points of Cloud IAM roles?
What are primitive roles?
Three types:
What are predefined roles?
2. they are specific to GCP products
What are custom roles?
Best practices for IAM roles?
How do you see a list of users assigned to a role via shell?
gcloud projects get-iam-policy [PROJECT NAME]
How do you see the fine-grained permissions are associated with a role?
gcloud iam roles describe [ROLE ID]
How do you assign a role via shell?
gcloud projects add-aim-policy-binding [RESOURCE NAME] –member user:[USER EMAIL] –role [ROLE ID]
How to create a custom IAM role via shell?
gcloud iam roles create [ROLE ID] –project [PROJECT ID] –title [ROLE NAME] –description [ROLE DESCRIPTION] –permissions [PERMISSIONS LIST] –state [LAUNCH STATE]
What is a Service Account?
An account used to provide identities independent of users. It can be granted roles and is assigned to a VM.
What is a scope?
A permission granted to a VM to perform some operation.
Key points of scopes?
How do you add scopes to a service account via shell?
gcloud compute instances set-service-account [INSTANCE NAME] [–service account [SERVICE_ACCOUNT_EMAIL] ] | [–noservice-account] [–no-scopes | –scopes [SCOPES,…]]
How do you assign a service account to a VM?
gcloud compute instances create [INSTANCE NAME] –service-account [SERVICE ACCOUNT EMAIL]