Skip to content

Commit 1a6d1e4

Browse files
authored
Merge pull request #177121 from ArchangelSDY/wps-service-tag
Add Azure Web PubSub service tag doc
2 parents 7b402df + 32fc22f commit 1a6d1e4

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

articles/azure-web-pubsub/howto-secure-shared-private-endpoints.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: dayshen
1212

1313
# Secure Azure Web PubSub outbound traffic through Shared Private Endpoints
1414

15-
If you're using [event handler](https://azure.github.io/azure-webpubsub/concepts/service-internals#event_handler) in Azure Web PubSub Service, you might have outbound traffic to upstream. Upstream such as
15+
If you're using [event handler](concept-service-internals.md#event_handler) in Azure Web PubSub Service, you might have outbound traffic to upstream. Upstream such as
1616
Azure Web App and Azure Functions, can be configured to accept connections from a list of virtual networks and refuse outside connections that originate from a public network. You can create an outbound [private endpoint connection](../private-link/private-endpoint-overview.md) to reach these endpoints.
1717

1818
:::image type="content" alt-text="Shared private endpoint overview." source="media\howto-secure-shared-private-endpoints\shared-private-endpoint-overview.png" border="false" :::
@@ -43,7 +43,7 @@ The rest of the examples show how the _contoso-webpubsub_ service can be configu
4343
You can make the following API call with the [Azure CLI](/cli/azure/) to create a shared private link resource:
4444

4545
```dotnetcli
46-
az rest --method put --uri https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.SignalRService/webPubSub/contoso-webpubsub/sharedPrivateLinkResources/func-pe?api-version=2021-06-01-preview --body @create-pe.json
46+
az rest --method put --uri https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.SignalRService/webPubSub/contoso-webpubsub/sharedPrivateLinkResources/func-pe?api-version=2021-06-01-preview --body @create-pe.json --debug
4747
```
4848

4949
The contents of the *create-pe.json* file, which represent the request body to the API, are as follows:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Use service tags
3+
titleSuffix: Azure Web PubSub service
4+
description: Use service tags to allow outbound traffic to your Azure Web PubSub Service
5+
author: ArchangelSDY
6+
7+
ms.service: azure-web-pubsub
8+
ms.topic: article
9+
ms.date: 10/21/2021
10+
ms.author: dayshen
11+
---
12+
13+
# Use service tags for Azure Web PubSub Service
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.
16+
17+
Azure Web PubSub Service manages these service tags. You can't create your own service tag or modify an existing one. Microsoft manages these address prefixes that match to the service tag and automatically updates the service tag as addresses change.
18+
19+
> [!Note]
20+
> Starting from 15 August 2021, Azure Web PubSub Service supports bidirectional Service Tag for both inbound and outbound traffic.
21+
22+
## Use service tag via Azure CLI
23+
24+
### Configure outbound traffic
25+
26+
You can allow outbound traffic to Azure Web PubSub Service by adding a new outbound network security rule:
27+
28+
```azurecli-interactive
29+
az network nsg rule create -n <rule-name> --nsg-name <nsg-name> -g <resource-group> --priority 100 --direction Outbound --destination-address-prefixes AzureWebPubSub
30+
```
31+
32+
### Configure inbound traffic
33+
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:
35+
36+
```azurecli-interactive
37+
az network nsg rule create -n <rule-name> --nsg-name <nsg-name> -g <resource-group> --priority 100 --direction Inbound --source-address-prefixes AzureWebPubSub
38+
```
39+
40+
## Next steps
41+
42+
- [Network security groups: service tags](../virtual-network/network-security-groups-overview.md#security-rules)

articles/azure-web-pubsub/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
items:
6161
- name: Protect the access key
6262
href: howto-secure-rotate-access-key.md
63+
- name: Use Azure Service Tags
64+
href: howto-service-tags.md
6365
- name: Use Azure private endpoints
6466
href: howto-secure-private-endpoints.md
6567
- name: Manage network access control

0 commit comments

Comments
 (0)