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
+37-37Lines changed: 37 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,107 +20,107 @@ 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're developing your LLM application using prompt flow, you want a secured environment. You can make the following services private via network settings.
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 nonAzure resources such as SerpAPI etc. If you have strict outbound rule, you need add FQDN rule to access them.
25
+
- Workspace: you can make the Azure Machine Learning workspace private and limit its inbound and outbound traffic.
26
+
- Compute resource: you can also limit inbound and outbound rules of the compute resource in the workspace.
27
+
- Storage account: you can limit the accessibility of the storage account to a specific virtual network.
28
+
- Container registry: you also want to secure your container registry with a virtual network.
29
+
- Endpoint: you want to limit which Azure services or IP addresses can access your endpoint.
30
+
- Related Azure AI Services such as Azure OpenAI, Azure content safety, and Azure AI Search: you can use network configuration to make them private and then use private endpoints to let Azure Machine Learning services communicate with them.
31
+
- Other non-Azure resources such as SerpAPI: If you have strict outbound rules, you need to add FQDN rules to access them.
32
32
33
-
## Options in different network set up
33
+
## Options in different network setups
34
34
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).
35
+
In Azure Machine Learning, we have two options to secure network isolation: bring your own network or use workspace managed virtual network. Learn more about [Secure workspace resources](../how-to-network-isolation-planning.md).
36
36
37
-
Here is table to illustrate the options in different network set up for prompt flow.
37
+
Here is a table to illustrate the options in different network setups for prompt flow.
38
38
39
39
|Ingress|Egress |Compute type in authoring |Compute type in inference |Network options for workspace|
- In private VNet scenario, we would recommend to use workspaceenabled managed virtual network. It's the easiest way to secure your workspace and related resources.
48
+
- In private VNet scenarios, we recommend using workspace-enabled managed virtual network. It's the easiest way to secure your workspace and related resources.
49
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.
51
-
50
+
- The use of managed virtual network and bring your own virtual network in a single workspace is not 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.
52
51
53
52
## Secure prompt flow with workspace managed virtual network
54
53
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.
54
+
Workspace managed virtual network is the recommended way to support network isolation in prompt flow. It provides easy configuration to secure your workspace. After you enable managed virtual network 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.
> 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.
59
+
> 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
60
```bash
62
61
az ml workspace provision-network --subscription <sub_id> -g <resource_group_name> -n <workspace_name>
63
62
```
64
63
65
-
2. Add workspace MSI as `Storage File Data Privileged Contributor` to storage account linked with workspace.
64
+
2. Add workspace MSI as `Storage File Data Privileged Contributor` to the storage account linked with the workspace.
66
65
67
-
2.1 Go to Azure portal, find the workspace.
66
+
2.1 Go to Azure portal and find the workspace.
68
67
69
68
:::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
69
71
-
72
-
2.2 Find the storage account linked with workspace.
70
+
2.2 Find the storage account linked with the workspace.
73
71
74
72
:::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
73
76
-
2.3 Jump to role assignment page of storage account.
74
+
2.3 Navigate to the role assignment page of the storage account.
77
75
78
76
:::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
77
80
-
2.4 Find storage file data privileged contributor role.
78
+
2.4 Find the storage file data privileged contributor role.
81
79
82
80
:::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
81
84
-
2.5 Assign storage file data privileged contributor role to workspace managed identity.
82
+
2.5 Assign the storage file data privileged contributor role to the workspace managed identity.
85
83
86
84
:::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
85
88
86
> [!NOTE]
89
87
> This operation might take several minutes to take effect.
90
88
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.
89
+
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 auto-approval. If the status is stuck in pending, go to the related resource to approve the private endpoint manually.
92
90
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":::
91
+
:::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
92
95
93
:::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
94
97
95
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
96
99
97
:::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
98
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.
99
+
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
100
103
-
## Secure prompt flow use your own virtual network
101
+
## Secure prompt flow using your own virtual network
104
102
105
103
- 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)
104
+
- 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).
105
+
- 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 virtual network](#secure-prompt-flow-with-workspace-managed-virtual-network).
106
+
- If you are using serverless compute type in 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
112
```
115
113
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.
114
+
- Meanwhile, you can follow [private Azure AI Services](/azure/ai-services/cognitive-services-virtual-networks) to make them private.
115
+
- 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).
116
+
- You can either create a private endpoint to the same virtual network or leverage virtual network peering to make them communicate with each other.
119
117
120
118
## Known limitations
121
119
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.
120
+
- Azure AI Foundry doesn't support bring your own virtual network; it only supports workspace managed virtual network.
121
+
- Managed online endpoints with selected egress require a workspace with managed virtual network. If you're using your own virtual network, consider this two-workspace approach:
122
+
- Use one workspace with your virtual network for prompt flow authoring
123
+
- Use a separate workspace with managed virtual network for prompt flow deployment via managed online endpoint
0 commit comments