Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/aml managed vnet #43

Open
wants to merge 144 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 127 commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
138f355
Update recipe-template.md
yogitasrivastava Jan 9, 2024
63062ce
Update recipe-template.md
yogitasrivastava Jan 9, 2024
cde911d
Create architecture_managedvnetworkspace.jpg
yogitasrivastava Jan 9, 2024
fce3fff
Delete src/az-managed-vnet-workspace/media/architecture_managedvnetwo…
yogitasrivastava Jan 9, 2024
0734859
Create architecture_managedvnetworkspace
yogitasrivastava Jan 9, 2024
b14f769
Delete src/az-managed-vnet-workspace/media/architecture_managedvnetwo…
yogitasrivastava Jan 9, 2024
d0e865d
Create test
yogitasrivastava Jan 9, 2024
b99f2de
Create test
yogitasrivastava Jan 9, 2024
765dc66
Delete test
yogitasrivastava Jan 9, 2024
bb1087a
Delete src/az-managed-vnet-workspace directory
yogitasrivastava Jan 9, 2024
848a497
Create az-managed-vnet-workspace
yogitasrivastava Jan 9, 2024
924d34d
Delete src/az-managed-vnet-workspace
yogitasrivastava Jan 9, 2024
e2a2845
Create test
yogitasrivastava Jan 9, 2024
2fbbe33
Delete src/az-managed-vnet-workspace/media directory
yogitasrivastava Jan 9, 2024
13d890e
created aml recipes
RenSilvaAU Jan 9, 2024
21d2e41
Update README.md
yogitasrivastava Jan 10, 2024
5136224
Add files via upload
yogitasrivastava Jan 10, 2024
40ef920
Delete src/az-aml-managed-vnet/recipe-template.md
yogitasrivastava Jan 10, 2024
143fd1d
Update README.md
yogitasrivastava Jan 10, 2024
25ed102
Add files via upload
yogitasrivastava Jan 10, 2024
fc0ed4c
Delete src/az-aml-managed-vnet/deploy/bicep directory
yogitasrivastava Jan 10, 2024
3315b9b
Add files via upload
yogitasrivastava Jan 10, 2024
e36b713
Delete src/az-aml-managed-vnet/media/solution-architecture.png
yogitasrivastava Jan 10, 2024
338dcf8
template
yogitasrivastava Jan 10, 2024
d281902
Delete src/az-aml-managed-vnet/bicep/test.bicep.txt
yogitasrivastava Jan 10, 2024
1a1dc53
Add files via upload
yogitasrivastava Jan 10, 2024
ed199f5
Add files via upload
yogitasrivastava Jan 10, 2024
afab950
Update README.md
yogitasrivastava Jan 11, 2024
6d4b464
Delete src/az-aml-managed-vnet/bicep/template.bicep
yogitasrivastava Jan 11, 2024
d790a3c
Update README.md
yogitasrivastava Jan 11, 2024
69f2f91
Add files via upload
yogitasrivastava Jan 11, 2024
b842d53
Add files via upload
yogitasrivastava Jan 11, 2024
ef1db4d
Add files via upload
yogitasrivastava Jan 11, 2024
71b6042
building deployment
RenSilvaAU Jan 11, 2024
e497ae3
Merge branch 'storm-managed-vnet' of https://github.com/Azure-Samples…
RenSilvaAU Jan 11, 2024
610270b
preparing bicep
RenSilvaAU Jan 11, 2024
9d088e2
Update hub_deploy.bicep
yogitasrivastava Jan 11, 2024
49ee9ab
Update hub_deploy.bicep
yogitasrivastava Jan 11, 2024
610bd1b
Update hub_parameters.json
yogitasrivastava Jan 11, 2024
f64060c
Update hub_parameters.json
yogitasrivastava Jan 11, 2024
c36f8e3
Update hub_deploy.bicep
yogitasrivastava Jan 11, 2024
e46b666
Update hub_parameters.json
yogitasrivastava Jan 11, 2024
e9853ed
Update hub_parameters.json
yogitasrivastava Jan 11, 2024
17ac743
Update hub_deploy.bicep
yogitasrivastava Jan 11, 2024
ddbf0a0
Update hub_deploy.bicep
yogitasrivastava Jan 11, 2024
7e633d3
updated aml vnet bicep
RenSilvaAU Jan 11, 2024
56706fe
Merge branch 'storm-managed-vnet' of https://github.com/Azure-Samples…
RenSilvaAU Jan 11, 2024
16fc9ce
updated readme aml vnets
RenSilvaAU Jan 11, 2024
e510809
addressing errors on vnet aml deployment
RenSilvaAU Jan 11, 2024
8a823bb
Update spoke_deploy.bicep
yogitasrivastava Jan 11, 2024
4d86ae9
Update spoke_deploy.bicep
yogitasrivastava Jan 11, 2024
fba7f27
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
2eda8c0
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
8d6fd5e
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
3a3f2b1
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
c95c897
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
22e01c3
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
b3d1a3d
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
7aca62d
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
123d7b9
Update spoke_deploy.bicep
yogitasrivastava Jan 12, 2024
d1b9123
fixed errors
yogitasrivastava Jan 12, 2024
505543b
Merge branch 'storm-managed-vnet' of https://github.com/Azure-Samples…
yogitasrivastava Jan 12, 2024
eab2e87
fixed errors
yogitasrivastava Jan 12, 2024
efb5413
fixing aml vnet problems
RenSilvaAU Jan 12, 2024
cf48477
modified workspace code
yogitasrivastava Jan 15, 2024
41b77b5
fixed workspace errors
yogitasrivastava Jan 15, 2024
7594fa1
fixed location errors
yogitasrivastava Jan 15, 2024
60aeda3
managed vnet Install_steps
yogitasrivastava Jan 15, 2024
5141c2f
workspace outbound rules yaml
yogitasrivastava Jan 15, 2024
39cabde
Update README.md
yogitasrivastava Jan 22, 2024
f91b0c1
updated rule names on workspace.yaml
RenSilvaAU Jan 24, 2024
97351f5
updated workspace yaml with outbound rules for vscode desktop, vscod…
yogitasrivastava Jan 24, 2024
7d4f1ee
Update README.md
yogitasrivastava Jan 24, 2024
c9eba79
Update README.md
yogitasrivastava Jan 24, 2024
c1a71f2
Add files via upload
yogitasrivastava Jan 24, 2024
3d1f8b7
Add files via upload
yogitasrivastava Jan 24, 2024
3ad09bb
Delete src/az-aml-managed-vnet/media/connectivity_via_bridge_network.png
yogitasrivastava Jan 24, 2024
146ba03
Add files via upload
yogitasrivastava Jan 24, 2024
fef4b1a
Create main.tf
yogitasrivastava Jan 24, 2024
b902493
Update README.md
yogitasrivastava Jan 24, 2024
6be9988
Delete src/az-aml-managed-vnet/deploy/bicep/workspace.yaml
yogitasrivastava Jan 24, 2024
19883ad
Create workspace_outbound_rules.yaml
yogitasrivastava Jan 24, 2024
ecfbdb6
Create az_script.sh
yogitasrivastava Jan 24, 2024
7f5ebe5
Update main.tf
yogitasrivastava Jan 24, 2024
3f2e905
Create variables.tf
yogitasrivastava Jan 24, 2024
a29403e
Create workspace.tf
yogitasrivastava Jan 24, 2024
9975053
Update README.md
yogitasrivastava Jan 24, 2024
94e0154
Update README.md
yogitasrivastava Feb 7, 2024
0a4fdb4
Add files via upload
yogitasrivastava Feb 7, 2024
0cf4ac5
Update workspace.tf
yogitasrivastava Feb 14, 2024
e08d94e
Update main.tf
yogitasrivastava Feb 14, 2024
a07cee3
Update variables.tf
yogitasrivastava Feb 14, 2024
574da8a
Update README.md
yogitasrivastava Feb 22, 2024
28d5cfb
Update README.md
yogitasrivastava Feb 22, 2024
d610f24
Update README.md
yogitasrivastava Feb 23, 2024
37007f5
Update README.md
yogitasrivastava Feb 23, 2024
8a19960
Delete src/az-aml-managed-vnet/media/managed-vnet-mlops-architecture_…
yogitasrivastava Feb 23, 2024
2ab8a1b
Delete src/az-aml-managed-vnet/media/managed-vnet-mlops-architecture_…
yogitasrivastava Feb 23, 2024
394a375
Add files via upload
yogitasrivastava Feb 23, 2024
4df491a
Update README.md
yogitasrivastava Feb 23, 2024
1542c5b
Update README.md
yogitasrivastava Feb 23, 2024
205c0c4
Update README.md
yogitasrivastava Feb 23, 2024
9dcea6d
Update README.md
yogitasrivastava Feb 23, 2024
692ea82
Update README.md with how to connect to the workspace
oloomi Feb 23, 2024
37829da
Update README.md
yogitasrivastava Feb 23, 2024
4755cc2
Update README.md and add testing solution
oloomi Feb 23, 2024
d96457f
Update README.md
yogitasrivastava Feb 27, 2024
4c62514
Update README.md
yogitasrivastava Feb 27, 2024
a94e475
Update README.md
yogitasrivastava Feb 27, 2024
767775c
Update README.md
yogitasrivastava Feb 27, 2024
9dcb88a
Update README.md
yogitasrivastava Feb 27, 2024
3ef8f22
Update README.md
yogitasrivastava Feb 27, 2024
e2fb9d6
Update README.md
yogitasrivastava Feb 28, 2024
a93b0fd
Add files via upload
yogitasrivastava Feb 28, 2024
d29be92
Update README.md
yogitasrivastava Feb 28, 2024
fea7172
Update README.md
yogitasrivastava Feb 28, 2024
640a553
Delete src/az-aml-managed-vnet/media/gitbash_pwd.png
yogitasrivastava Feb 28, 2024
fe577e1
Add files via upload
yogitasrivastava Feb 28, 2024
4646576
Update README.md
yogitasrivastava Feb 28, 2024
a4e6400
Update README.md
yogitasrivastava Feb 28, 2024
b32885a
Update README.md
yogitasrivastava Feb 28, 2024
5dbb84a
Add files via upload
yogitasrivastava Feb 28, 2024
c17f87d
Update README.md
yogitasrivastava Feb 28, 2024
7569010
Update README.md
yogitasrivastava Feb 28, 2024
c9fdff9
Update README.md
yogitasrivastava Feb 28, 2024
d019f6c
Add files via upload
yogitasrivastava Feb 28, 2024
ced173d
Update README.md
yogitasrivastava Feb 28, 2024
bdda06e
Update README.md
yogitasrivastava Jul 31, 2024
4787c6a
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
9e3db15
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
99fa4ab
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
517f9d0
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
22ceb73
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
ab2d3cf
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
3415d67
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
00a904f
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
3b44bc6
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
c970e0c
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
8bb176a
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
cde7b73
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
f8b64ac
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
3848473
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
9b8109b
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
43f82c8
Update src/az-aml-managed-vnet/README.md
yogitasrivastava Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions src/az-aml-byo-vnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Protect MLOps Solutions using Azure Network Security Capabilities

# Types of VNET

- Azure Managed VNET
- Customer VNET

# Typical Functional Components in MLOps Solution
- Data storage: Azure Blob Storage
- Model training, validation and registration: Azure Machine Learning
- Model deployment: Azure Machine Learning endpoints and Azure Kubernetes Service
- Model monitor: Azure Monitor for Application Insights
- MLOps pipelines: Azure DevOps and Azure Pipelines

# Azure Services used to help protect MLOps Solution
- Azure Key Vault for managing secrets/keys used in the solution
- Azure Policy for meeting regulatory and compliance requirements
- Microsoft Entra for Authentication and Authorization
- Virtual Network for network security

# Benefits of Managed VNET
- Easy to configure
- Automatically secures your workspace and managed compute resources
- Outbound traffic required by the Azure ML service us automatically enabled
- Can be implemented in two patterns: allow internet outbound mode or allow only approved outbound mode (recommended)

# Securing VNET along with data exfiltration prevention and data protection
- Use Azure virtual network for network isolation
- Put all the resources in the same region
- Have Hub VNET that contains the firewall. Use FQDNs in firewall in addition to service tags to prevent data exfiltation.
- Firewall in Hub VNET will control the internet outbound from your virtual networks.
- A spoke VNET to contain the following resources
- Training subnet that contains compute instance and compute clusters used for training the models
- Configure service endpoint with service endpoint policy to prevent data exfiltration
- Configure the resources in the training subnet with no public ip.
- Scoring subnet containing AKS cluster
- Private end point subnet that will contain the private endpoints used to connect to the workspace and its workspace components. Private endpoint will use private ip from the VNET pool of private ip addresses.
- Compute resources should be able to reach the firewall in hub VNET.
- Managed online endpoint that will use private endpoint of the workspace to process the incoming requests.
- Private endpoint to allow managed online endpoint deployments to access private storage.
- **Allow inbound from Azure ML service tag using NSG ans UDR to skip firewall when using compute instance or cluster with public ip.
- Enable "Allow trusted Microsoft services to bypass this firewall" for Azure Key Vault.
- Enable "Grant access to trusted Azure services" for Azure Storage account.
- Enable "Allow trusted services" for Azure container registry.

## Limitations
Workspace and default storage account must be in the same VNET
AKV and ACR for the workspace to be in the same VNET, or in a peered VNET
Azure Compute instance and compute clusters must be in the same VNET, region anf subscription as the workspace and its associated resources

# List of Required Rules
These rules are automatically created with the managed VNET regardless of public network access mode for those resources
- Types of outbound: read only and read/write
- read only outbound cannot be explited by the malicious actors but read/write outbound can be.
- **Azure Storage and Azure Frontdoor are read/write outbound.** Hence to minimise the data exfiltration risk use a service endpoint policy with and Azure ML alias to allow outbound to only Azure ML managed storage accounts. There is no need to open outbound to storage on the firewall.
- Azure Service Tags required to allow outbound from compute instance and cluster to access Azure ML managed storage accounts to get scripts etc.
- Outbound service tag: AzureActiveDirectory Protocol:TCP Port:80, 443
- Outbound service tag: AzureResourceManager Protocol:TCP Port:443
- Outbound service tag:AzureMachineLearning Protocol:UDP Port:5831
- Outbound service tag:BatchNodeManagement Protocol:TCP Port:443
- Outbound service tag: AzureFrontDoor Protocol: Port:
- Outbound service tag: MicrosoftContainerRegistry Protocol: Port:
- Outbound service tag:AzureMonitor Protocol: Port:
- Inbound: AzureMachineLearning

- Outbound FQDNs required to allow outbound from compute instance and cluster to access Azure ML managed storage accounts to get scripts etc.
- mcr.microsoft.com Protocol:TCP Port:443
- *.data.mcr.microsoft.com Protocol:TCP Port:443
- ml.azure.com Protocol:TCP Port:443
- automlresources-prod.azureedge.net Protocol:TCP Port:443

![Defaultoutboundrules](images/managedvnet_automaticrules.png)


## Public vs Private ML workspace
Public workspace can show data in your private storage account, so we recommend using private workspace.
Use Microsoft Entra authentication and authorization with conditional access if you want to access workspace publicly.



## Managed online endpoint security - outbound and inbound
Enable network isolation for the managed online endpoints to secure the following network traffic:
- Inbound scoring requests
- Outbound communication with the workspace, ACR and Azure Blob storage

## Private IP requirements
- One IP per compute instance, compute cluster node, and private endpoint
- IP's for AKS

## Challenges due to shortage of Private IPs
Private IP address shortage in your main network. The hub-spoke network connected with your on-prem network might not have large enough private IP address space. In this case, use isolated, not peered VNets for Azure ML resources.



## Built-in-policies (Azure Policy)



## Image build compute for ACR behind VNET

## Enable ML Studio UI with private link enabled workspace along with data exfiltration prevention

## Enabling Defender for Cloud

## Assigning Azure Policies for compliance
Policy | Description|
--- | --- |
Customer-managed key |Audit or enforce whether workspaces must use a customer-managed key. |
Private link | Audit or enforce whether workspaces use a private endpoint to communicate with a virtual network. |
Private endpoint | Configure the Azure Virtual Network subnet where the private endpoint should be created. |
Private DNS zone | Configure the private DNS zone to use for the private link. |
User-assigned managed identity | Audit or enforce whether workspaces use a user-assigned managed identity. |
Disable public network access | Audit or enforce whether workspaces disable access from the public internet. |
Disable local authentication | Audit or enforce whether Azure Machine Learning compute resources should have local authentication methods disabled. |
Modify/disable local authentication | Configure compute resources to disable local authentication methods. |
Compute cluster and instance is behind virtual network | Audit whether compute resources are behind a virtual network.|


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading