- Lab
- A Cloud Guru
Creating and Manage IAM Roles on Google Cloud
Google Cloud Identity and Access Management (IAM) service is a critical gateway for the entire platform. One of Cloud IAM's primary features is the ability to assign a range of roles, which determine the permissions available for targeted resources. There are a large number of pre-defined roles, with set permissions, available as well as the capability to create custom roles. In this hands-on lab, you'll add a new member to the team with a pre-defined role of Compute Network Admin. Then, you'll expand that member's responsibilities to administering firewall rules by creating a custom role. Next, I'll show you how to combine both pre-defined and custom roles into a single custom role. Finally, you'll log in as the new member to verify the IAM permissions are working as expected.
Path Info
Table of Contents
-
Challenge
Add IAM member to project.
- From the Google Cloud console's main navigation, choose IAM & admin > IAM.
- Click GRANT ACCESS.
- In the Add Princippals panel, enter the email address for the secondary user for this hands-on lab.
- In the Select a role field, enter
Compute Network
and choose Compute Network Admin. - Click Save.
-
Challenge
Create a custom IAM role.
- From the IAM navigation, choose Roles.
- Click Create Role.
- On the Create Role page, enter the following:
- Title:
Firewall Admin
- ID:
FirewallAdmin
- Role launch stage:
Beta
- Click Add Permissions.
- In the Add Permissions dialog, click Filter Table and enter firewalls; press Return.
- Select all permissions beginning with
compute.firewalls
. - Click Add.
- Click Create.
-
Challenge
Assign custom role.
- From the IAM navigation, choose IAM.
- In the row of the newly added member, click Edit (the pencil icon).
- Click Add Another Role.
- In the Select a role field, enter Firewall and select Firewall Admin.
- Click Save.
-
Challenge
Create a new custom role
- From the IAM navigation, choose Roles.
- In the Filter table field, enter Compute Network and choose Compute Network Admin.
- Click OR.
- In the Filter table field, enter Firewall and choose Firewall Admin.
- Select the checkboxes next to the two roles.
- Choose Create Role from Selection.
- On the Create Role page, enter the following:
- Title: Compute Network and Firewall Admin
- ID: ComputeNetworkAndFirewallAdmin
- Role launch stage: Beta
- Click Create.
-
Challenge
Assign the new role.
- From the IAM navigation, choose IAM.
- In the row of the newly added member, click Edit (the pencil icon).
- In the Edit Permissions panel, click the Trashcan icon next to the Firewall Admin role.
- Click in the Compute Network Admin role field.
- Select Custom and then Compute Network and Firewall Admin.
- Click Save.
-
Challenge
Verify Permissions
- From the main Google Cloud navigation, choose Compute Engine > VM Instances.
- Choose Create.
- Leave all the values at their defaults.
- In the Firewall section, select both options.
- Click Create.
- Log out of the Google Cloud console.
- Copy the username for the secondary user.
- Open a new browser window for the lab.
- Log in as the secondary user.
- From the Google Cloud console's main navigation, choose IAM & admin > IAM.
- Note that you do not have permission to view this page.
- From the main Google Cloud navigation, choose Compute Engine > VM Instances.
- Note the recently created instance.
- From the main Google Cloud navigation, choose VPC Networks > VPC Networks.
- Note the full admin capabilities here.
- From the VPC Network menu, choose Firewall rules.
- Note the full admin capabilities here.
- Select and delete the HTTPS firewall rule.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.