Fixing Security Misconfigurations with Azure AI

1.5 hours
  • 5 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you are working as an Azure security engineer for Space Corp, a company that specializes in high-tech satellite launches. Recently, you’ve been called into several meetings where it’s been discovered that the AI resources have been misconfigured, and it’s up to you to keep Space Corp safe!

You’ll use Azure Key Vault, networking settings, and environment variables to help secure Azure Cognitive Services.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Connect to the Virtual Machine and Log In to the Azure Portal

Use the instant terminal or SSH to connect to the Linux virtual machine.

Explore the Code Directory in the Virtual Machine and Look at Cognitive Services in the Portal
  1. Look at the code of text_analytics.py and see if you can spot any issues.
  2. Explore the Cognitive Services resource and determine if there is a way to help secure it.
Update the Configuration of the Cognitive Services Resource

Enable the firewall to only allow the VM VNet to communitate to it.

Update the Python Code to Make Use of Environment Variables

Convert the Cognitive Services key to be stored in an environment variable.

Create an Azure Key Vault and Update the Python Code

Create a Key Vault with the Cognitive Services key as a secret and change the code to use the secret from the Key Vault.

Additional Resources

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?