- Lab
- A Cloud Guru
Implement Defense in Depth on Azure
Defense in depth is a strategy that utilizes multiple protection measures to secure a workload. Each measure is designed to slow the advance of an attacker. These measures are applied at many or all of the security layers so that if one layer is breached, protection measures are already in place to prevent the next layer from being breached. In the Defense in depth strategy, the security layers are: * Data * Application * Compute * Network * Perimeter * Identity and access There is also a physical layer, but that is taken care of by Microsoft as part of the shared responsibility model. In this lab, you will configure protection at each security layer.
Path Info
Table of Contents
-
Challenge
Secure Identities
-
Enable a system-assigned managed identity for webserver1
-
Enforce Entra ID Authentication for Azure SQL Database
- Set your cloud student user account as the Admin account
- Require Entra ID authentication
-
Configure the Azure SQL Server Service Firewall
- Allow access from Azure resources and your IP address
-
Create a database contained user for webserver1
-
Update the Web Application to use Entra ID Passwordless Authentication
- Update
C:\inetpub\wwwroot\appsettings.json
on webserver1 with the passwordless connection string for the database
- Update
-
Test the Web Application
-
-
Challenge
Secure the Network Perimeter - Part 2
-
Create and Associate Route Table with the web-subnet
- Configure a route table with the name rt-01 and associate it with the web-subnet
- Configure a default route to send traffic to the Azure Firewall, using the name: main-fw-route
Note: The names rt-01, and main-fw-route is used to grade the lab.
-
Configure a DNAT rule (with the collection named natcollection) to forward HTTP traffic through the Firewall to webserver1
-
-
Challenge
Secure the Internal Network
-
Create a Subnet for the Azure SQL Database
-
Create Private Endpoint for the Azure SQL Database
- Use the name pe-sql for the Private Endpoint
Note: The name pe-sql is used to grade the lab.
-
Disable the SQL Server Public Endpoint
-
Test the Web Application
-
-
Challenge
Secure Compute and Application Resources
-
Deploy Azure Bastion
-
Remove the Public IP Address from the Virtual Machine
-
Schedule Automatic Updates on webserver1
- Schedule to the updates to start today, run weekly on Sunday at midnight, in your local timezone
-
-
Challenge
Secure Data
-
Create a Subnet for Key Vault
- Deploy a new subnet for Key Vault in the exsting Virtual Network
-
Deploy Key Vault
- Create a private endpoint and
- Permit public access until the end of this objective, to allow easier completion of the objective
-
Configure Azure Disk Encryption
- Encrypt the Operating System and Data disks on webserver1
- Ensure the RSA key size for the Key is set to: 4096
-
Generate a HTTPS Certificate
- Store the certificate in Key Vault
- Use the Subject: CN=webserver1
-
Bind the HTTPS Certificate to the Web Server
- Ensure webserver1 is listening on port 443 for HTTPS traffic using the certificate stored in Key Vault, use the below script from within cloudshell to configure the binding:
$VaultID = (Get-AzKeyVault).ResourceId $VaultName = (Get-AzKeyVault).VaultName $ResourceGroup = (Get-AzResourceGroup).ResourceGroupName $VMName = "webserver1" $CertificateURL = (Get-AzKeyVaultSecret -VaultName $VaultName -Name $VMName ).id $VM = Get-AzVM -ResourceGroupName $resourceGroup -Name $VMName Add-AzVMSecret -VM $VM -SourceVaultId $VaultID -CertificateStore "My" -CertificateUrl $CertificateURL | Update-AzVM Invoke-AzVMRunCommand -ResourceGroupName $ResourceGroup -VMName $VMName -CommandId 'RunPowerShellScript' -ScriptString 'New-WebBinding -Name "WebApp" -Protocol https -Port 443; Get-ChildItem cert:\localmachine\My | Where-Object Subject -eq "CN=webserver1" | New-Item -Path IIS:\SslBindings\!443'
-
Update the Firewall Rules to forward HTTPS traffic
-
Prevent Public Access to Key Vault
-
Configure SQL Server Dynamic Data Masking to mask Credit Card Data
-
-
Challenge
Improve Security Operations - Part 1
-
Deploy Log Analytics
- For the Log Analytics workspace, use the name log-sentinel
Note: The name the workspace must be log-sentinel to be graded successfully.
-
Create a Data Collection Endpoint
-
Create a Data Collection Rule to collect IIS WebServer Logs from webserver1
-
Enable Sentinel on the Log Analytics Workspace
-
Install the Web Session Essentials from the Content Hub in Microsoft Sentinel
-
-
Challenge
Secure the Network Perimeter - Part 1
-
Deploy required subnets to support Azure Firewall
-
Deploy Azure Firewall
- For the Firewall, use the name: fw-01
- For the Firewall Policy, use the name: fwpolicy-01
Note: The names fw-01 and fwpolicy-01 are used to grade the lab.
-
-
Challenge
Improve Security Operations - Part 2
-
Enable Sentinel Analytics Rules
- Create an analytics rule based on the template: Identify instances where a single source is observed using multiple user agents
-
Test the Web Application
Note: If receiving a gateway timeout error, try adding HTTPS:// before the public IP of the firewall resource.
-
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.