Cloud IAM Qwik Start
Cloud IAM Qwik Start
Student Resources
Manage Access Control with Google Cloud IAM
https://youtu.be/PqMGmRhKsnM
Overview
Google Cloud's Identity and Access Management (IAM) service lets you create and
manage permissions for Google Cloud resources. Cloud IAM unifies access control
for Google Cloud services into a single system and provides a consistent set of
operations.
In this lab, you sign in with 2 different sets of credentials to experience how
granting and revoking permissions works from Google Cloud Project Owner and
Viewer roles.
What you'll learn
Assign a role to a second user
Remove assigned roles associated with Cloud IAM
Prerequisites
This is an introductory level lab. Little to no prior knowledge of Cloud IAM is
expected. Experience with Cloud Storage is helpful to complete the tasks in this lab,
but is not required. Make sure that you have a file in .txt or .html available. If you
are looking for more advanced practice with Cloud IAM, be sure to check out the
following Google Cloud Skills Boost lab, IAM Custom Roles.
Once you're prepared, scroll down and follow the steps to get your lab environment
set up.
Setup and requirements
As mentioned earlier, this lab provides two sets of credentials to illustrate IAM
policies and what permissions are available for specific roles.
In the Lab Connection panel on the left side of your lab, you see a list of
credentials that resembles the following:
Notice that there are two usernames: Username 1 and Username 2. These represent
identities in Cloud IAM, each with different access permissions allocated to them.
These "roles" set constraints on what you can and cannot do with Google Cloud
resources in the project you've been allocated.
Sign in to Cloud Console as the first user
1. Click on the Open Google Console button. This opens a new browser tab. If
you are asked to Choose an account, click Use another account.
2. The Google Cloud sign in page opens. A Sign in page opens—copy and paste
the Username 1 credential that
resembles [email protected] into the "Email or phone"
field and then click Next.
3. Copy the password from the Lab Connection panel and paste into the
Google Sign in password field.
4. Click Next and then Accept the terms of service. The Cloud Console opens.
Agree to the terms of service and click Agree and Continue.
Sign in to Cloud Console as the second user
1. Click on the Open Google Console button again. A new browser tab opens,
if you are asked to Choose an account, click Use another account.
2. The Google Cloud sign in page opens. Copy and paste the Username
2 credential that resembles [email protected] into
the Email or phone field and then click Next.
3. Copy the password from the Lab Connection panel and paste into the
Google Sign in password field.
4. Click Next and then Accept the terms of service. The Cloud Console opens.
Agree to the terms of service and click Agree and Continue.
You should now have two Cloud Console tabs open in your browser—one signed in
with Username 1 and the other with Username 2.
View or reset the user in a browser tab
Occasionally, a user is overwritten in a browser tab or you may be confused about
which user is signed into which browser tab.
To view which user is signed into a browser tab, hover over your Avatar to view your
username in that browser tab.
Role
Permissions
Name
roles/ Permissions for read-only actions that do not affect state, such as
viewer viewing (but not modifying) existing resources or data.
roles/ All viewer permissions, plus permissions for actions that modify state,
editor such as changing existing resources.
Since you are able to manage roles and permissions for this project, Username 1
has Project owner permissions.
4. Click CANCEL to exit out of the "Add principal" panel.
Explore the editor role
Now switch to the Username 2 console.
1. Navigate to the IAM & Admin console, select Navigation menu > IAM &
Admin > IAM.
2. Search through the table to find Username 1 and Username 2 and examine
the roles they are granted. The Username 1 and Username 2 roles are listed
inline and to the right of each user.
You should see:
Username 2 has the "Viewer" role granted to it.
The +GRANT ACCESS button at the top is grayed out—if you try to click on it
you get the message, "You need permissions for this action. Required
permission(s): resource manager.projects.setIamPolicy".
This is one example of how IAM roles affect what you can and cannot do in Google
Cloud.
3. Switch back to the Username 1 console for the next step.
Task 2. Prepare a Cloud Storage bucket for access testing
Ensure that you are in the Username 1 Cloud Console.
Create a bucket
1. Create a Cloud Storage bucket with a unique name. From the Cloud Console,
select Navigation menu > Cloud Storage > Buckets.
2. Click +CREATE.
Note: If you get a permissions error for bucket creation, sign out and then sign in
back in with the Username 1 credentials.
3. Update the following fields, leave all others at their default values:
Property Value