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
- Look at the code of
text_analytics.py
and see if you can spot any issues. - Explore the Cognitive Services resource and determine if there is a way to help secure it.
- Look at the code of
- 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.