04 Cloud IAM
04 Cloud IAM
Management (IAM)
Architecting with GCP Fundamentals:
Infrastructure
CLOUD IAM, CLOUD RESOURCE MANAGER
CLOUD IAM
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Identity and Access Management
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Project Owners invite members to projects and grant roles. Roles consist of a
collection of permissions for one or more resources.
Cloud IAM objects
● Organization
● Folders
● Projects
● Members
● Roles
● Resources
● Products
● G Suite Super Admins
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud IAM resource hierarchy
Organization
A policy is set on a resource,
and each policy contains a example.com
set of:
Folders
● Roles
Policy Inheritance
● Role members Dept X Dept Y
Cloud IAM allows you to set policies at the following levels of the resource hierarchy:
● Organization level: The organization resource represents your company.
Cloud IAM roles granted at this level are inherited by all resources under the
organization.
● Project level: Projects represent a trust boundary within your company.
Services within the same project have a default level of trust. For example,
App Engine instances can access Cloud storage buckets within the same
project. Cloud IAM roles granted at the project level are inherited by resources
within that project. When setting policies at the project level, be sure to use
audit logs to track project-level permission changes.
● Resource level: In addition to the existing Cloud Storage and BigQuery ACL
systems, additional resources such as Genomics Datasets and Pub/Sub
topics support resource-level roles so that you can grant certain users
permission to a single resource.
Resources inherit the policies of the parent resource. If you set a policy at the
organization level, it is automatically inherited by all its child projects, and if you set a
policy at the project level, it is inherited by all its child resources. The effective policy
for a resource is the union of the policy set at that resource and the policy inherited
from its parent. This policy inheritance is transitive; in other words, resources inherit
policies from the project, which inherits policies from the organization. Therefore, the
organization-level policies also apply at the resource level.
The Cloud IAM policy hierarchy follows the same path as the GCP resource
hierarchy. If you change the resource hierarchy, the policy hierarchy changes also.
For example, moving a project into an organization will update the project's Cloud IAM
policy to inherit from the organization's Cloud IAM policy.
Child policies cannot restrict access granted at the parent. For example, if you grant
the Editor role to a user for a project, and grant the Viewer role to the same user for a
child resource, the user still has the Editor role for the child resource.
When using Cloud IAM, a best practice is to follow the principle of least privilege. The
principle applies to identities, roles, and resources. Always select the smallest scope
that’s necessary to reduce your exposure to risk. You wouldn’t want to grant
everybody the Owner role on your entire organization: intentional hacks or accidental
mistakes could bring down your apps. You want to be specific and deliberate. Assign
to a specific security admin group the security admin role to manage SSL and firewall
rules on specific projects.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Organization node
Visibility
● An organization node is a root node Control
for Google Cloud resources.
● Organization roles:
bob@example.com example.com
○ Organization Admin: Control
Organization
over all cloud resources; useful
Admin
for auditing
Create
○ Project Creator: Controls project
creation; control over who can project_1 project_2
alice@example.com
create projects Project Creator
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
A large number of projects can become unwieldy to manage at scale. This is why
Cloud IAM includes the concept of an organization node. The organization node sits
above projects and is your company’s root node for Google Cloud resources. If you
have a Google for Work account, when you enable the organization node, any project
created by users in your domain will automatically belong to your organization node;
no more shadow projects and no more rogue admins.
The Organization Admin role gives your admin visibility and control over all of your
company’s resources on Google Cloud Platform. Using the Project Creator role, you
can restrict who can create projects, regardless of whether they have policies on
individual projects. The project roles can also be applied at the organization level and
can be inherited by all the projects in your company. For example, you can assign
your networking team the Network Admin role at the organization level so they have
permissions to manage all the networks in all the projects in your company.
Organization
● Organization is created by Google Sales
● Organization Owners are established at creation
○ G Suite Super Admins are the only Organization Owners
● Organization Owner
Assigns the Organization Administrator role from the
○
G Suite Admin Console—(Admin is a separate product)
■ Organization Administrators manage GCP from the Cloud Console
● Always have more than one organization owner, for security purposes.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
The account with Organization Owner role is empowered to modify all projects within
the organization.
Changes to the organization itself still occur only through Google Sales.
https://cloud.google.com/resource-manager/docs/overview#organization
Folders Company
Org
Additional grouping mechanism and
Dept X Dept Y Shared
isolation boundaries between projects:
Infrastructure
• Different legal entities
Folders
• Departments Team A Team B
• Teams
Product 1 Product 2
Folders allow delegation of
administration rights.
Projects
Development Test Production
Resources
Org
Organization
• Admin: Full control over all resources
Policy Inheritance
• Viewer: View access to all resources
Folders
Folder
Admin: Full control over folders
•
Creator: Browse hierarchy and create folders
•
Viewer: View folders and projects below a
•
resource
Project
Projects
• Creator: Create new projects (automatic owner)
and migrate new projects into organization
Resources
• Deleter: Delete projects
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Project Lien Modifier: A lien represents an encumbrance on the actions that can be
performed on a resource:
https://cloud.google.com/resource-manager/reference/rest/v1/liens
GCP vs. G Suite Admin
Organization Owner
• Domains • Administers a Google-hosted
• Groups domain
• Users • Creates users, groups
• Controls user membership in
groups
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Both G Suite and GCP are part of a single product line called "Google Cloud," but
they are separate products.
When "Organization" is added to GCP, an MSA (Master Services Agreement) is
signed that usually includes a Google-hosted domain with the G Suite Admin product.
Best practice is that the account/person who is the G Suite Super Admin is different
from the account/person who is the first GCP Organization Owner.
G Suite Admin has TWO functions with respect to GCP:
1. The G Suite Super Administrator can assign GCP Organization Owner to an
account from within the G Suite Admin console. A GCP Organization Owner
can also create more Organization Owners by assigning the role to an account
within the GCP Console. The G Suite Super Admin cannot assign any other
GCP roles to accounts from the Admin console.
2. The G Suite Super Admin creates users and groups, controls membership of
users in groups, and controls Google-hosted domains (domain names:
@mycompany1.com, @mycompany2.com).
GPC authorization
Use Google’s credential system
• Manage accounts using Google G Suite **
• Sync existing credentials using Google Cloud Directory Sync
• Optionally implement single sign-on (SSO)
Built-in features
• Session activity tracking
• Session management tools
• Security alerts
• Suspicious activity detection
** or Google G Suite for Education and Google G Suite for Government
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Notes:
The simplest mechanism for accessing Google Cloud Platform is to use a Google
account. While simple, this mechanism does not provide centralized identity
management. Organizations should instead use Google G Suite user management to
create and manage accounts/credentials. Note: This is for user management only. It
does not require you to use Google G Suite products like Gmail, Google docs, and
Google Slides.
Google G Suite user management is a single place to manage and control accounts,
including suspending bad accounts. Because Google manages logins, you get the
benefits and security of Google authentication management: Password resets,
session and device management (when/where people are logging in), and suspicious
activity detection and alerts.
● Synchronizes G Suite accounts to match the user data in existing LDAP or MS Active
Directory
○ Synchs groups and memberships, not content or settings
○ Supports sophisticated rules for custom mapping of users, groups, non-employee
contacts, user profiles, aliases, and exceptions
● One-way synchronization from LDAP to directory
○ Administer in LDAP, then periodically update to G Suite
● Runs as a utility in your server environment
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
With Google Cloud Directory Sync (GCDS), the G Suite Admin can automatically add,
modify, and delete users, groups, and non-employee contacts to synchronize the data
in a G Suite domain with an LDAP directory server or MS Active Directory. The data in
the LDAP directory server is never modified or compromised. GCDS is a secure tool
that help keep track of users and groups.
https://support.google.com/a/answer/106368?hl=en
Single sign-on (SSO)
● Use your own authentication mechanism and manage your own credentials.
● Federate your identities to Google Cloud Platform (GCP).
● Users do not have to sign in a second time to access GCP resources.
● Revoke access to GCP using your existing credential management.
● Google Apps Directory Sync integrates with LDAP.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Notes:
If you have your own identity system, you can enable SSO. You can continue using
your own system/processes with SSO configured, and when user authentication is
required, Google will redirect to your system. If the user is authenticated in your
system, access to Google Cloud Platform is given. Otherwise, the user is prompted to
sign in.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Notes:
SSO configuration is a relatively simple process. SSO is built on SAML2, a
secure/industry-standard protocol for exchanging user assertions. With Google SSO,
the only assertion that is used is the username.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Notes:
The principle of least privilege applies to identities, roles, and resources. Always
select the smallest scope necessary to reduce your exposure to risk. You wouldn’t
grant everybody the owner role on your entire organization: intentional hacks or
accidental mistakes could bring down your applications. You want to be specific and
deliberate. Assign a specific group the security admin role to manage SSL certificates
and firewalls on specific projects.
Managing permissions for individual users can be cumbersome and error-prone. Use
groups instead. In the example, there is a SecOps group (for your security operations
team). When new members join the team, add them to the group. The SecOps team
probably needs multiple roles; for example, Security Admin to manage firewalls and
Log Viewer for auditing. Assign the relevant roles to the appropriate group.
Policies allow you to secure your resources. You also want to make sure you control
how additional users gain access to resources through policies and group
memberships. Without strict control over policy changes and group memberships, you
may inadvertently allow new users more permissions than they need (which also
violates the principle of least privilege).
Best practices: Use groups
If group membership is secure, assign roles to groups and let the G Suite Admins
handle membership.
• Always maintain an alternate.
• For high-risk areas, assign roles to individuals directly and forego the convenience
of group assignment.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Vary from the standard only when you need to and when you know why you need to
make the change and how your policies will be implemented.
Agenda ● Cloud Identity and Access
Management (IAM)
● Organization
● Roles
● Members
● Service accounts
● Cloud IAM best practices
● Quiz
● Lab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Primitive roles A project can have multiple owners, editors, viewers, and billing
administrators.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
It is a best practice to ensure that a project has more than one owner for continuity
reasons. Many organizations will create a Google Group for project ownership, and
put at least two Google accounts into that group. Some organizations use a dedicated
project owner account. If there is only one owner, and the sole owner’s account is
deleted, the entire project would also be deleted.
The recommended practice is to use Google accounts for your project’s team
members. When someone leaves the company, your G Suite administrator should
use the G Suite Admin Console to mark the account as suspended (instead of
deleting the account.) The domain administrator can then perform various tasks, such
as reassigning ownership of apps and docs, before deleting the team member’s
account.
Curated roles
List of Permissions
Google
Group ✔ compute.instances.delete
✔ compute.instances.get
✔ compute.instances.list
InstanceAdmin
✔ compute.instances.setMachineType
Role
✔ compute.instances.start
Cloud IAM ✔ compute.instances.stop
...
project_a
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
To give a user the desired permissions, you grant a role to the user on a resource. In
this slide, a group of users is granted the InstanceAdmin role on a project so the
users can manage instances in the project. Whenever possible, it is a best practice to
use groups. You should also strictly control the ability to change policies and group
memberships that will allow additional users to gain access to resources.
● Groups of permissions
○ Represent abstract functions
○ Customize roles to align with real jobs
● Permissions are classes and methods in the APIs
○ <service>.<resource>.<verb>
○ Usually (but not always) 1:1 with REST API
● Roles can be customized BETA
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
● Organization roles
● Folder roles
● Project roles
● Product-specific roles
○ Crafted for each resource/product (20+)
○ Product-specific Cloud IAM documentation
○ Some in Beta
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
There are several kinds of roles. This course will look at each of them in context.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
https://cloud.google.com/iam/docs/understanding-roles
One user with the Project Owner role for a particular project can invite another user to
become a Project Owner also.
Project owner invitation and acceptance
someoneyouknow@gmail.com
email
● Only sent for project owner console
Somone Youknow!
role, not other roles
● Not sent to organization
owners when assigned
project ownership by other
organization owners
Somone Youknow
someoneyouknow@gmail.com
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
https://cloud.google.com/iam/docs/understanding-roles
There are 20+ products with product-specific roles. Each has a separate Cloud IAM
document explaining the permission details and the strategy behind the role definition.
No invitation and acceptance with product-specific roles.
Compute Engine example:
https://cloud.google.com/compute/docs/access/iam
Product-specific roles: Examples
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Agenda ● Cloud Identity and Access
Management (IAM)
● Organization
● Roles
● Members
● Service accounts
● Cloud IAM best practices
● Quiz
● Lab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Members
Users
• Google accounts: @gmail, @google
• G Suite domains: Google-hosted domains (mydomain.com)
• Google Groups (groupname@mydomain.com)
GCP does not create or manage users or groups
•
• G Suite Admin Super Administrator manages users and groups for an
organization. "G Suite Admin" is a separate product from GCP.
Service accounts
• Created and managed in GCP
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
example.com
groups.google.com/a/your-domain.com
Groups for Business feature
groups.your-domain.com
GCP access without Gmail
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
https://accounts.google.com/SignUpWithoutGmail?hl=en
Agenda ● Cloud Identity and Access
Management (IAM)
● Organization
● Roles
● Members
● Service accounts
● Cloud IAM best practices
● Quiz
● Lab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Service accounts (1 of 2)
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
A service account is an identity for your programs to use to authenticate and gain
access to Google Cloud Platform APIs. Service accounts authenticate applications
running on your virtual machine instances to other Google Cloud Platform services.
For example, if you write an application that reads and writes files on Cloud Storage,
it must first authenticate to the to either the Google Cloud Storage XML API or JSON
API. You can enable service accounts and grant read-write access to the account on
the instance where you plan to run your application. Then, program the application to
obtain credentials from the service account. Your application authenticates
seamlessly to the API without embedding any secret keys or credentials in your
instance, image, or application code.
Service accounts (2 of 2)
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
By default, all projects come with the Compute Engine default service account. When
you start a new instance using gcloud, the default service account is enabled on that
instance.
Apart from the default service account, all projects come with a Google Cloud
Platform APIs service account, identifiable using the email:
{project-number}@cloudservices.gserviceaccount.com
Alternatively, you can also start an instance with a custom service account. Custom
service accounts provide more flexibility than the default service account, but they
require more management from you. You can create as many custom service
accounts as you need, assign any arbitrary access scopes or Cloud IAM roles to
them, and assign the service accounts to any virtual machine instance.
App Engine default service accounts are beyond the scope of this course. For more
information, see:
https://developers.google.com/identity/protocols/application-default-credentials.
Default Compute Engine service account
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Scopes
Token
Application A
Authorization
Server
read_only
Authenticated
Scopes
Identities
Application B
read_write
Token
https://cloud.google.com/storage/docs/authentication
Access scopes grant access only if the respective API has been enabled on the
project that the service account belongs to. For example, granting an access scope
for Cloud Storage on a virtual machine instance allows the instance to call the
Firebase Cloud Storage API only if you have enabled the Cloud Storage API on the
project. If the API is not enabled on the project, the access scope has no effect.
Additionally, if you plan to use the service account to access another project, you
must grant the service account the appropriate Cloud IAM roles on the target project.
Default Compute Engine service account automatically enabled with the following
access scopes:
https://www.googleapis.com/auth/cloud.useraccounts.readonly
https://www.googleapis.com/auth/devstorage.read_only
https://www.googleapis.com/auth/logging.write
https://www.googleapis.com/auth/monitoring.write
https://www.googleapis.com/auth/service.management.readonly
https://www.googleapis.com/auth/servicecontrol
Customizing scopes for a VM
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Service accounts can use scopes through the Cloud SDK. gcloud and gsutil
commands automatically pick up tokens, and you can easily run these commands in
scripts to automate workflows. You can also write custom tools or application code
using Google client libraries or alternatively, write your own code to consume tokens.
One of the features of a Cloud IAM service account is that you can treat it as a
resource or as an identity.
You can grant a role to a service account to access a resource. In this case, the
service account is the identity. Some examples include:
● The default Compute Engine and App Engine service accounts are granted
Editor roles on the project when they are created so that the code executing in
your App or VM instance has the necessary permissions. In this case, the
service accounts are identities that are granted the Editor role for a resource
(project).
● If you want to allow your automation to access a storage bucket, you grant the
service account (that your automation uses) the permissions to read the
● storage bucket. In this case, the service account is the identity that you are
granting permissions for another resource (Cloud Storage bucket).
If you want other users to be able to use a service account, you must grant the
serviceAccountUser role to the user. Users with the serviceAccountUser role can act
as that service account to perform operations such as creating and managing
Compute Engine instances that use a service account. For information on how to do
this, see the Compute Engine documentation. Users who are serviceAccountUsers
for a service account can access all the resources for which the service account has
access. Therefore be cautious when granting the serviceAccountUser role to a user.
Example: Service accounts and Cloud IAM
project_a project_b
● VMs running component_1 are
granted Editor access to project_b
using Service Account 1
● VMs running component_2 are component_1 Service
granted objectViewer access to Account 1
Editor
bucket_1 using Service Account 2
● Service account permissions can be
changed without re-creating VMs
component_2 Service
Account 2
Storage.
objectViewer
bucket_1
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
You can grant different groups of VMs in your project different identities. This makes it
easier to manage different permissions for each group. For example, if one
component in your app needs to have the Editor role on another project, you can
have a service account with this permission that is used only by the VMs running the
component. Other VMs can be assigned the permissions required by their
functionalities. This way you can scope permissions for VMs. You also can change
the permissions of the service accounts without having to recreate the VMs.
Cloud IAM also lets you slice a project into different microservices, each with access
to different resources, by creating service accounts to represent each one. You
assign the service accounts to the VMs when they are created, and you don’t have to
ensure that credentials are being managed correctly. Google Cloud Platform
manages security for you.
Service accounts and keys
serviceAccount.keys.create()
serviceAccount.keys.delete()
Service account Service account
Key A Key B
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Users require a username and password to authenticate. Apps use a key. One or
more keys can be generated for each Cloud IAM service account. Keys are sensitive
and need to be carefully managed because they give you access to resources. When
you run applications on Compute Engine or App Engine, Google manages the keys
for you and automatically rotates them. You never have the risk of losing/exposing
your key. When you run apps elsewhere, you can generate and download the keys to
use in your code. It is a best practice to keep them safe and rotate them.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Resource hierarchy
● Use projects to group resources that share the same trust boundary.
● Check the policy granted on each resource and make sure you understand the
inheritance.
● Use "principle of least privilege" when granting roles.
● Audit policies in Cloud audit logs: setiampolicy.
● Audit membership of groups used in policies.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
1. Mirror your Cloud IAM policy hierarchy structure to your organization structure.
2. Use Google Cloud Platform projects to group resources that share the same
trust boundary. For example, resources for the same product or microservice
can belong to the same Google Cloud Platform project.
3. Set policies at the organization level and at the project level instead of at the
resource level.
4. Check the policy granted on every resource and understand the hierarchical
inheritance.
5. If you need to grant a role to a user or group that spans across multiple
projects, set that role at the organization level instead of setting it at the
project level.
6. Use labels to annotate, group, and filter resources.
7. If you want to limit project creation in your organization, modify the
organization-level policy to grant the Project Creator role to a group that you
manage.
8. Use the security principle of least privilege to grant roles.
9. Grant roles at the smallest scope needed.
10. Audit your policies to ensure compliance. Cloud audit logs contain all the calls
to setiampolicy so you are able to trace when a policy has been enacted.
11. Audit the ownership and the membership of the Google groups used in
policies.
12. Grant roles at the smallest scope needed. For example, if a user only needs
access to publish messages to a Pub/Sub topic, grant the Publisher role to the
user for that topic.
Groups
Grant roles to Google groups instead of individuals:
• Update group membership instead of changing Cloud IAM policy.
• Audit membership of groups used in policies.
• Control the ownership of the Google group used in Cloud IAM policies.
In the diagram, a single group was created that was associated with a job role,
"network admin." However, the Cloud IAM administration soon realized that there
were different sub-groups requiring different permissions. In this example, standard
settings are kept in files in a bucket. Some network admins need access to view these
files. A few select individuals have the authority to edit and delete these files.
The original group is still used for group mailings and for those roles that every
network administrator needs, but the other groups and their membership were
established only to assign additional Cloud IAM roles. Adding and removing
individuals from all three groups controls their total access.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
1. Restrict who can act as service accounts. Users who are Service Account
Users for a service account can access all the resources for which the service
account has access. Therefore be cautious when granting the
serviceAccountUser role to a user.
2. Grant the service account only the minimum set of permissions required to
achieve its goal.
3. Create service accounts for each service with only the permissions required
for that service.
4. Use the display name of a service account to keep track of the service
accounts. When you create a service account, populate its display name with
the purpose of the service account.
5. Define a naming convention for your service accounts.
6. Implement processes to automate the rotation of user-managed service
account keys.
7. Take advantage of the Cloud IAM service account API to implement key
rotation.
8. Audit service accounts and keys using either the serviceAccount.keys.list()
method or the Logs Viewer page in the console.
9. Do not delete service accounts that are in use by running instances on App
Engine or Compute Engine.
Cloud Identity-Aware Proxy (Cloud IAP)
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud IAP lets you establish a central authorization layer for applications accessed by
HTTPS, so you can use an application-level access control model instead of relying
on network-level firewalls.
Applications and resources protected by Cloud IAP can only be accessed through the
proxy by users and groups with the correct Cloud IAM role. When you grant a user
access to an application or resource by Cloud IAP, they’re subject to the fine-grained
access controls implemented by the product in use without requiring a VPN. Cloud
IAP performs authentication and authorization checks when a user tries to access a
Cloud IAP-secured resource.
Cloud IAP secures authentication and authorization of all requests to App Engine or
Cloud Load Balancing HTTPS. Cloud IAP doesn't protect against the following:
● Activity inside your VM, such as if someone accesses the VM via SSH. This
includes the App Engine flexible environment when direct SSH access to your
VM is enabled.
● Activity within a project, such as another VM inside the project.
For more information, see: https://cloud.google.com/iap/docs/concepts-overview
Agenda ● Cloud Identity and Access
Management (IAM)
● Organization
● Roles
● Members
● Service accounts
● Cloud IAM best practices
● Quiz
● Lab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Quiz
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Quiz
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Explanation:
Cloud IAM administration uses pre-defined roles for administration of user access.
The roles are defined by more granular permissions. But permissions are not applied
to users directly; only through the roles that are assigned to them.
Quiz
1. User identities are created from the Cloud Identity console that is only visible to
GCP Super-administrators.
2. User identities are created from the Cloud IAM area of the GCP Console, or by
using the gcloud command.
3. User identities are created through a federated Active Directory domain.
4. User identities are created from outside of GCP in a Google-administered domain.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Quiz
1. User identities are created from the Cloud Identity console that is only visible to
GCP Super-administrators.
2. User identities are created from the Cloud IAM area of the GCP Console, or using
the gcloud command.
3. User identities are created through a federated Active Directory domain.
4. User identities are created from outside of GCP in a Google-administered domain. *
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Explanation:
Cloud IAM access is built on top of an identity authorization and access management
system that is used by all Google Cloud products, not just GCP.
Quiz
What technology can be used along with Cloud IAM to provide another layer of security
and access control in GCP?
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Quiz
What technology can be used along with Cloud IAM to provide another layer of security
and access control in GCP?
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Explanation:
Because GCP is a collection of networked services, you can administer fine-grained
access to resources by limiting network access. Example: Using Cloud IAM roles, you
could grant a group of users access to a particular VM running an application. Using
firewall rules, you could permit access to the VM only from specific IP ranges, so that
those users could only gain access to the VM from the corporate network, and not
from another location.
Agenda ● Cloud Identity and Access
Management (IAM)
● Organization
● Roles
● Members
● Service accounts
● Cloud IAM best practices
● Quiz
● Lab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Cloud IAM
Objectives
Completion: 30 minutes
In this lab, you learn how to perform the
following tasks: Access: 60 minutes
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab review
You could allocate Service Account User credentials and "bake" them into a
VM to create specific-purpose authorized bastion hosts.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
More resources
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.