You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/prompt-flow/how-to-secure-prompt-flow.md
+58-49Lines changed: 58 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@ ms.subservice: prompt-flow
8
8
ms.custom:
9
9
- ignite-2023
10
10
ms.topic: how-to
11
-
author: lgayhardt
12
-
ms.author: lagayhar
13
-
ms.reviewer: lochen
14
-
ms.date: 11/02/2023
11
+
author: s-polly
12
+
ms.author: scottpolly
13
+
ms.reviewer: sooryar
14
+
ms.date: 7/10/2025
15
15
---
16
16
17
17
# Network isolation in prompt flow
@@ -20,107 +20,116 @@ You can secure prompt flow using private networks. This article explains the req
20
20
21
21
## Involved services
22
22
23
-
When you're developing your LLM application using prompt flow, you want a secured environment. You can make the following services private via network setting.
23
+
When you develop AI applications using prompt flow, you need a secured environment. You can configure network isolation for the following services:
24
24
25
-
- Workspace: you can make Azure Machine Learning workspace as private and limit inbound and outbound of it.
26
-
- Compute resource: you can also limit inbound and outbound rule of compute resource in the workspace.
27
-
- Storage account: you can limit the accessibility of the storage account to specific virtual network.
28
-
- Container registry: you also want to secure your container registry with virtual network.
29
-
- Endpoint: you want to limit Azure services or IP address to access your endpoint.
30
-
- Related Azure Cognitive Services as such Azure OpenAI, Azure content safety and Azure AI Search, you can use network config to make them as private then using private endpoint to let Azure Machine Learning services communicate with them.
31
-
- Other non Azure resources such as SerpAPI etc. If you have strict outbound rule, you need add FQDN rule to access them.
25
+
### Core Azure Machine Learning services
32
26
33
-
## Options in different network set up
27
+
-**Workspace**: Configure the Azure Machine Learning workspace as private and restrict its inbound and outbound traffic.
28
+
-**Compute resource**: Apply inbound and outbound rules to limit compute resource access within the workspace.
29
+
-**Storage account**: Restrict storage account accessibility to a specific virtual network.
30
+
-**Container registry**: Secure your container registry using virtual network configuration.
31
+
-**Endpoint**: Control which Azure services or IP addresses can access your deployed endpoints.
34
32
35
-
In Azure machine learning, we have two options to secure network isolation, bring your own network or using workspace managed virtual network. Learn more about [Secure workspace resources](../how-to-network-isolation-planning.md).
33
+
###Azure AI Services
36
34
37
-
Here is table to illustrate the options in different network set up for prompt flow.
35
+
-**Azure OpenAI**: Use network configuration to make Azure OpenAI private, then use private endpoints for Azure Machine Learning communication.
36
+
-**Azure Content Safety**: Configure private network access and establish private endpoints for secure communication.
37
+
-**Azure AI Search**: Enable private network settings and use private endpoints for secure integration.
38
38
39
-
|Ingress|Egress |Compute type in authoring |Compute type in inference |Network options for workspace|
- In private VNet scenario, we would recommend to use workspace enabled managed virtual network. It's the easiest way to secure your workspace and related resources.
49
-
- You can also have one workspace for prompt flow authoring with your virtual network and another workspace for prompt flow deployment using managed online endpoint with workspace managed virtual network.
50
-
- We didn't support mixed using of managed virtual network and bring your own virtual network in single workspace. And as managed online endpoint is support managed virtual network only, you can't deploy prompt flow to managed online endpoint in workspace which enabled bring your own virtual network.
41
+
-**Non-Azure resources**: For external APIs like SerpAPI, add FQDN rules to your outbound traffic restrictions to maintain access.
51
42
43
+
## Options in different network setups
52
44
53
-
## Secure prompt flow with workspace managed virtual network
45
+
In Azure Machine Learning, we have two options to secure network isolation: bring your own network or use a workspace-managed virtual network. Learn more about [Secure workspace resources](../how-to-network-isolation-planning.md).
54
46
55
-
Workspace managed virtual network is the recommended way to support network isolation in prompt flow. It provides easily configuration to secure your workspace. After you enable managed virtual network in the workspace level, resources related to workspace in the same virtual network, will use the same network setting in the workspace level. You can also configure the workspace to use private endpoint to access other Azure resources such as Azure OpenAI, Azure content safety, and Azure AI Search. You also can configure FQDN rule to approve outbound to non-Azure resources use by your prompt flow such as SerpAPI etc.
47
+
Here's a table to illustrate the options in different network setups for prompt flow.
- In private virtual network scenarios, we recommend using a workspace-enabled managed virtual network. It's the easiest way to secure your workspace and related resources.
59
+
- The use of managed vNet and bring your own virtual network in a single workspace isn't supported. Additionally, since managed online endpoint is supported only with a managed virtual network, you can't deploy prompt flow to managed online endpoint in a workspace with an enabled bring your own virtual network.
60
+
- You can have one workspace for prompt flow authoring with your own virtual network, and another workspace for prompt flow deployment using a managed online endpoint with a workspace-managed virtual network.
61
+
62
+
## Secure prompt flow with workspace-managed virtual network
63
+
64
+
A workspace-managed virtual network is the recommended way to support network isolation in prompt flow. It provides an easy configuration to secure your workspace. After you enable managed vNet at the workspace level, resources related to the workspace in the same virtual network will use the same network settings at the workspace level. You can also configure the workspace to use private endpoints to access other Azure resources such as Azure OpenAI, Azure content safety, and Azure AI Search. You can also configure FQDN rules to approve outbound connections to non-Azure resources used by your prompt flow such as SerpAPI.
65
+
66
+
1. Follow [workspace-managed network isolation](../how-to-managed-network.md) to enable workspace-managed virtual network.
58
67
59
68
> [!IMPORTANT]
60
-
> The creation of the managed virtual network is deferred until a compute resource is created or provisioning is manually started. You can use following command to manually trigger network provisioning.
69
+
> The creation of the managed virtual network is deferred until a compute resource is created or provisioning is manually started. You can use the following command to manually trigger network provisioning.
61
70
```bash
62
71
az ml workspace provision-network --subscription <sub_id> -g <resource_group_name> -n <workspace_name>
63
72
```
64
73
65
-
2. Add workspace MSI as `Storage File Data Privileged Contributor` to storage account linked with workspace.
74
+
2. Add workspace MSI as `Storage File Data Privileged Contributor` to the storage account linked with the workspace.
66
75
67
-
2.1 Go to Azure portal, find the workspace.
76
+
2.1 Go to Azure portal and find the workspace.
68
77
69
78
:::image type="content" source="./media/how-to-secure-prompt-flow/go-to-azure-portal.png" alt-text="Diagram showing how to go from Azure Machine Learning portal to Azure portal." lightbox = "./media/how-to-secure-prompt-flow/go-to-azure-portal.png":::
70
79
71
-
72
-
2.2 Find the storage account linked with workspace.
80
+
2.2 Find the storage account linked with the workspace.
73
81
74
82
:::image type="content" source="./media/how-to-secure-prompt-flow/linked-storage.png" alt-text="Diagram showing how to find workspace linked storage account in Azure portal." lightbox = "./media/how-to-secure-prompt-flow/linked-storage.png":::
75
83
76
-
2.3 Jump to role assignment page of storage account.
84
+
2.3 Navigate to the role assignment page of the storage account.
77
85
78
86
:::image type="content" source="./media/how-to-secure-prompt-flow/add-role-storage.png" alt-text="Diagram showing how to jump to role assignment of storage account." lightbox = "./media/how-to-secure-prompt-flow/add-role-storage.png":::
79
87
80
-
2.4 Find storage file data privileged contributor role.
88
+
2.4 Find the storage file data privileged contributor role.
81
89
82
90
:::image type="content" source="./media/how-to-secure-prompt-flow/storage-file-data-privileged-contributor.png" alt-text="Diagram showing how to find storage file data privileged contributor role." lightbox = "./media/how-to-secure-prompt-flow/storage-file-data-privileged-contributor.png":::
83
91
84
-
2.5 Assign storage file data privileged contributor role to workspace managed identity.
92
+
2.5 Assign the storage file data privileged contributor role to the workspace managed identity.
85
93
86
94
:::image type="content" source="./media/how-to-secure-prompt-flow/managed-identity-workspace.png" alt-text="Diagram showing how to assign storage file data privileged contributor role to workspace managed identity." lightbox = "./media/how-to-secure-prompt-flow/managed-identity-workspace.png":::
87
95
88
96
> [!NOTE]
89
97
> This operation might take several minutes to take effect.
90
98
91
-
3. If you want to communicate with [private Azure Cognitive Services](/azure/ai-services/cognitive-services-virtual-networks), you need to add related userdefined outbound rules to related resource. The Azure Machine Learning workspace creates private endpoint in the related resource with auto approve. If the status is stuck in pending, go to related resource to approve the private endpoint manually.
99
+
3. If you want to communicate with [private Azure AI Services](/azure/ai-services/cognitive-services-virtual-networks), you need to add related user-defined outbound rules to the related resource. The Azure Machine Learning workspace creates a private endpoint in the related resource with autoapproval. If the status is stuck in pending, go to the related resource to approve the private endpoint manually.
92
100
93
-
:::image type="content" source="./media/how-to-secure-prompt-flow/outbound-rule-cognitive-services.png" alt-text="Screenshot of user defined outbound rule for Azure Cognitive Services." lightbox = "./media/how-to-secure-prompt-flow/outbound-rule-cognitive-services.png":::
101
+
:::image type="content" source="./media/how-to-secure-prompt-flow/outbound-rule-cognitive-services.png" alt-text="Screenshot of user defined outbound rule for Azure AI Services." lightbox = "./media/how-to-secure-prompt-flow/outbound-rule-cognitive-services.png":::
94
102
95
103
:::image type="content" source="./media/how-to-secure-prompt-flow/outbound-private-endpoint-approve.png" alt-text="Screenshot of user approve private endpoint." lightbox = "./media/how-to-secure-prompt-flow/outbound-private-endpoint-approve.png":::
96
104
97
105
4. If you're restricting outbound traffic to only allow specific destinations, you must add a corresponding user-defined outbound rule to allow the relevant FQDN.
98
106
99
107
:::image type="content" source="./media/how-to-secure-prompt-flow/outbound-rule-non-azure-resources.png" alt-text="Screenshot of user defined outbound rule for non Azure resource." lightbox = "./media/how-to-secure-prompt-flow/outbound-rule-non-azure-resources.png":::
100
108
101
-
5. In workspaces that enable managed VNet, you can only deploy prompt flow to managed online endpoint. You can follow [Secure your managed online endpoints with network isolation](../how-to-secure-kubernetes-inferencing-environment.md) to secure your managed online endpoint.
109
+
5. In workspaces that enable managed VNet, you can only deploy prompt flow to managed online endpoints. You can follow [Secure your managed online endpoints with network isolation](../how-to-secure-kubernetes-inferencing-environment.md) to secure your managed online endpoint.
102
110
103
-
## Secure prompt flow use your own virtual network
111
+
## Secure prompt flow using your own virtual network
104
112
105
113
- To set up Azure Machine Learning related resources as private, see [Secure workspace resources](../how-to-secure-workspace-vnet.md).
106
-
- If you have strict outbound rule, make sure you have open the [Required public internet access](../how-to-secure-workspace-vnet.md#required-public-internet-access).
107
-
- Add workspace MSI as `Storage File Data Privileged Contributor` to storage account linked with workspace. Please follow step 2 in [Secure prompt flow with workspace managed virtual network](#secure-prompt-flow-with-workspace-managed-virtual-network).
108
-
- If you are using serverless compute type in flow authoring, you need set the custom virtual network in workspace level. Learn more about [Secure an Azure Machine Learning training environment with virtual networks](../how-to-secure-training-vnet.md)
114
+
- If you have strict outbound rules, make sure you have opened the [Required public internet access](../how-to-secure-workspace-vnet.md#required-public-internet-access).
115
+
- Add workspace MSI as `Storage File Data Privileged Contributor` to the storage account linked with the workspace. Follow step 2 in [Secure prompt flow with workspace managed vNet](#secure-prompt-flow-with-workspace-managed-virtual-network).
116
+
- If you're using serverless compute typein flow authoring, you need to set the custom virtual network at the workspace level. Learn more about [Secure an Azure Machine Learning training environment with virtual networks](../how-to-secure-training-vnet.md)
no_public_ip: false# Set to true if you don't want to assign public IP to the compute
114
122
```
115
123
116
-
- Meanwhile, you can follow [private Azure Cognitive Services](/azure/ai-services/cognitive-services-virtual-networks) to make them as private.
117
-
- If you want to deploy prompt flow in workspace which secured by your own virtual network, you can deploy it to AKS cluster which is in the same virtual network. You can follow [Secure Azure Kubernetes Service inferencing environment](../how-to-secure-kubernetes-inferencing-environment.md) to secure your AKS cluster. Learn more about [How to deploy prompt flow to ASK cluster via code](./how-to-deploy-to-code.md).
118
-
- You can either create private endpoint to the same virtual network or leverage virtual network peering to make them communicate with each other.
124
+
- Meanwhile, you can follow [private Azure AI Services](/azure/ai-services/cognitive-services-virtual-networks) to make them private.
125
+
- If you want to deploy prompt flow ina workspace that is secured by your own virtual network, you can deploy it to an AKS cluster that is in the same virtual network. You can follow [Secure Azure Kubernetes Service inferencing environment](../how-to-secure-kubernetes-inferencing-environment.md) to secure your AKS cluster. Learn more about [How to deploy prompt flow to AKS cluster via code](./how-to-deploy-to-code.md).
126
+
- You can either create a private endpoint to the same virtual network or use virtual network peering to make them communicate with each other.
119
127
120
128
## Known limitations
121
129
122
-
- Azure AI Foundry doesn't support bring your own virtual network, it only supports workspace managed virtual network.
123
-
- Managed online endpoint with selected egress only supports workspace with managed virtual network. If you want to use your own virtual network, you might need one workspace for prompt flow authoring with your virtual network and another workspace for prompt flow deployment using managed online endpoint with workspace managed virtual network.
130
+
- Managed online endpoints with selected egress require a workspace with managed vNet. If you're using your own virtual network, consider this two-workspace approach:
131
+
- Use one workspace with your virtual network for prompt flow authoring
132
+
- Use a separate workspace with managed vNet for prompt flow deployment via managed online endpoint
0 commit comments