IAM lets administrators authorized who can take on specific
resources.
An IAM Policy has
“Who” Part
A “Can do What”
part and
“On which resource”
Part
Who can do what on which resources?
Who: IAM policies
can apply to any of four types of principals
Google Account or Cloud Identity User
Service Account
Google group
G Suite domain
Can do what: IAM
roles are collections of related permissions
Example Instance Admin Role can have below list of
permission
compute.instance.list
compute.instance.delete
compute.instance.start
compute.instance.stop
On Which Resources:
Users get roles on specific items in the hierarchy
When you give a user, group, or service account a role on a
specific element of the resource hierarchy, the resulting policy applies to the
element you chose, as well as to elements below it in the hierarchy.
OrganizationàfolderàProjectàResources
There are three kinds
of roles in Cloud IAM
IAM primitive
roles apply across all GCP services in a project
Primitive
roles are broad. You apply them to a GCP project, and they affect all resources
in that project. IAM primitive roles offer fixed, coarse-grained levels of
access
These are
the Owner, Editor, and Viewer roles. If you’re a viewer on a given resource, you
can examine it but not change its state. If you’re an editor, you can do
everything a viewer can do plus change its state. And if you’re an owner, you
can do everything an editor can do plus manage roles and Permissions on the
resource. The owner role on a project lets you do one more thing too: you can
set up billing. Often companies want someone to be able to control the billing
for a project without the right to change the resources in the project, and
that’s why you can grant someone the billing administrator role.
Be careful!
If you have several people working together on a project that contains sensitive
data, primitive roles are probably too coarse a tool. Fortunately, GCP IAM provides
finer-grained types of roles.
IAM predefined roles apply to a
particular GCP service in a project. offer more fine-grained permission on particluar services.
GCP services
offers their own sets of predefined roles, and they define where those roles
can be applied. For example, Compute Engine, which offers virtual machines as a
service. Compute Engine offers a set of predefined roles, and you can apply
them to Compute Engine resources in a given project, a given folder, or an
entire organization.
InstanceAdmin
Role on Project,
compute.instances.delete
compute.instances.get
compute.instances.list
compute.instances.start
compute.instances.stop
IAM custom roles let you define a
precise set of permissions
What if you
need something even finer-grained? That’s what custom roles permit. A lot of
companies use a “least-privilege” model, in which each person in your organization
the minimal amount of privilege needed to do his or her job. So, for example,
maybe I want to define an “instanceOperator” role, to allow some users tostop
and start Compute Engine virtual machines but not reconfigure them. Custom roles
allow me to do that
InstanceAdmin
Role, can set the set of custom permission.
compute.instances.start
compute.instances.stop
ReplyDeleteThanks for the post. Thanks for sharing great information with us.
Google Cloud Platform Training
GCP Online Training
Google Cloud Platform Training In Hyderabad
Very awesome post! I like that and very interesting content.
ReplyDeleteGCP Online Training
Google Cloud Platform Training In Hyderabad
Google Cloud Platform Training
Google Cloud Platform Training Online