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/azure-web-pubsub/howto-service-tags.md
+66-9Lines changed: 66 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,31 +12,88 @@ ms.author: dayshen
12
12
13
13
# Use service tags for Azure Web PubSub Service
14
14
15
-
You can use [Service Tags](../virtual-network/network-security-groups-overview.md#service-tags) for Azure Web PubSub service when configuring [Network Security Group](../virtual-network/network-security-groups-overview.md#network-security-groups). It allows you to define inbound/outbound network security rule for Azure Web PubSub Service endpoints without need to hardcode IP addresses.
15
+
You can use [Service Tags](../virtual-network/service-tags-overview.md) to identify Azure Web PubSub Service traffic. A service tag represents a group of IP address prefixes. Azure Web PubSub Service manages a service tag called `AzureWebPubSub` for both inbound and outbound traffic.
16
16
17
-
Azure Web PubSub service manages these service tags. You can't create your own service tag or modify an existing tag. Microsoft manages the address prefixes that match to the service tag and automatically updates the service tag as addresses change.
17
+
A service tag can be used when for configuring **Network Security Group**. Alternatively, you can query the IP address prefixes using [Service Tag Discovery API](../virtual-network/service-tags-overview.md#service-tags-on-premises).
18
18
19
-
> [!Note]
20
-
> Starting from 15 August 2021, Azure Web PubSub service supports bidirectional Service Tag for both inbound and outbound traffic.
19
+
## Outbound traffic
20
+
21
+
Endpoints of Azure Web PubSub Service resources are guaranteed to be within IP ranges of Service Tag `AzureWebPubSub`.
22
+
23
+
### Access Azure Web PubSub Service from virtual network
24
+
25
+
You can allow outbound traffic from your network to Azure Web PubSub Service by adding a new outbound network security rule.
26
+
27
+
#### [Azure portal](#tab/azure-portal)
28
+
29
+
1. On portal, go to the network security group.
30
+
1. Select on the settings menu called **Outbound security rules**.
31
+
1. Select the **Add** button.
32
+
1. Select **Destination** and choose **Service Tag**.
33
+
1. Select **Destination service tag** and choose **AzureWebPubSub**.
34
+
1. Enter **443** in **Destination port ranges**.
21
35
22
-
## Use service tag via Azure CLI
36
+
:::image type="content" alt-text="Screenshot showing dialogue to create an outbound security rule." source="media/howto-service-tags/portal-add-outbound-security-rule.png" :::
23
37
24
-
### Configure outbound traffic
38
+
1. Adjust other fields as needed.
39
+
1. Select **Add**.
25
40
26
-
You can allow outbound traffic to Azure Web PubSub service by adding a new outbound network security rule:
In following scenarios, Azure Web PubSub Service can generate network traffic to your resource. The source of traffic is guaranteed to be within IP ranges of Service Tag `AzureWebPubSub`.
52
+
53
+
* Use [event handlers](howto-develop-eventhandler.md).
54
+
* Use [event listeners](howto-develop-event-listener.md)
55
+
* Use [Key Vault secret reference](howto-use-managed-identity.md#use-a-managed-identity-for-key-vault-reference) in URL template settings.
56
+
* Use [custom certificate](howto-custom-domain.md#add-a-custom-certificate).
57
+
58
+
### Event handler endpoints in virtual network
59
+
60
+
You can configure **Network Security Group** to allow inbound traffic to virtual network.
61
+
62
+
#### [Azure portal](#tab/azure-portal)
33
63
34
-
If you're using [event handler](concept-service-internals.md#event-handler), you can also allow inbound traffic from Azure Web PubSub service by adding a new inbound network security rule:
64
+
1. On portal, go to the network security group.
65
+
1. Select **Inbound security rules**.
66
+
1. Select the **Add** button.
67
+
1. Select **Source** and choose **Service Tag** from the list.
68
+
1. Select **Source service tag** and choose **AzureWebPubSub** from the list.
69
+
1. Enter \* in **Source port ranges**.
70
+
71
+
:::image type="content" alt-text="Screenshot showing dialogue to create an inbound security rule." source="media/howto-service-tags/portal-add-inbound-security-rule.png" :::
> Azure Web PubSub Service is a shared service. By allowing Service Tag `AzureWebPubSub` or its associated IP address prefixes, you also allow traffic from other resources, even if they belong to other customers. Make sure you implement appropriate authentication on your endpoints.
86
+
87
+
### Event handler endpoints of Azure Function
88
+
89
+
You can configure a [service tag-based rule](../app-service/app-service-ip-restrictions.md#set-a-service-tag-based-rule).
90
+
91
+
Alternatively, you can use [Shared Private Endpoints](howto-secure-shared-private-endpoints.md) for better security. Shared Private Endpoints are dedicated to your resources. No traffic from other resources can access your endpoints.
92
+
93
+
### Event Hubs and Key Vault access
94
+
95
+
We recommend [Shared Private Endpoints](howto-secure-shared-private-endpoints-key-vault.md) for best security.
96
+
40
97
## Next steps
41
98
42
99
-[Network security groups: service tags](../virtual-network/network-security-groups-overview.md#security-rules)
0 commit comments