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-authorize-from-application.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.topic: conceptual
12
12
13
13
Azure Web PubSub supports Microsoft Entra ID for authorizing requests from [applications](../active-directory/develop/app-objects-and-service-principals.md).
14
14
15
-
This article shows you how to configure your Web PubSub resource and code to authorize the request to a Web PubSub resource from an Azure application.
15
+
This article shows you how to configure your Web PubSub resource and code to authorize a request to a Web PubSub resource from an Azure application.
16
16
17
17
## Register an application
18
18
@@ -21,11 +21,10 @@ The first step is to register an Azure application.
21
21
1. In the [Azure portal](https://portal.azure.com/), search for and then select **Microsoft Entra ID**
22
22
1. On the left menu under **Manage**, select **App registrations**.
23
23
1. Select **New registration**.
24
-
25
-
:::image type="content" source="media/howto-authorize-from-application/register-an-application.png" alt-text="Screenshot that shows registering an application.":::
26
-
27
24
1. For **Name**, enter a name to use for your application.
28
-
1. Select **Register** to confirm the register.
25
+
1. Select **Register** to confirm the application registration.
26
+
27
+
:::image type="content" source="media/howto-authorize-from-application/register-an-application.png" alt-text="Screenshot that shows registering an application.":::
29
28
30
29
When your application is registered, go to the application overview to view the values for **Application (client) ID** and **Directory (tenant) ID**. You use these values in the following sections.
31
30
@@ -37,6 +36,8 @@ For more information about registering an application, see the quickstart [Regis
37
36
38
37
You can add both certificates and client secrets (a string) as credentials to your confidential client app registration.
39
38
39
+
For more information about adding credentials, see [Add credentials](../active-directory/develop/quickstart-register-app.md#add-credentials).
40
+
40
41
### Add a client secret
41
42
42
43
The application requires a client secret for a client to prove its identity when it requests a token.
@@ -48,34 +49,32 @@ To create a client secret:
48
49
49
50
:::image type="content" source="media/howto-authorize-from-application/new-client-secret.png" alt-text="Screenshot that shows creating a client secret.":::
50
51
51
-
1. Enter a description for the client secret, and then choose an expire time for the secret.
52
+
1. Enter a description for the client secret, and then choose an **Expires** time for the secret.
52
53
1. Copy the value of the client secret, and then paste it to a secure location to save for later use.
53
54
54
55
> [!NOTE]
55
56
> The secret is visible only when you create the secret. You can't view the client secret in the portal later.
56
57
57
58
### Add a certificate
58
59
59
-
You can also upload a certificate instead of creating a client secret.
60
+
You can upload a certificate instead of creating a client secret.
60
61
61
62
:::image type="content" source="media/howto-authorize-from-application/upload-certificate.png" alt-text="Screenshot that shows uploading a certificate.":::
62
63
63
-
For more information about adding credentials, see [Add credentials](../active-directory/develop/quickstart-register-app.md#add-credentials).
64
-
65
64
## Add a role assignment in the Azure portal
66
65
67
66
This section demonstrates how to assign a Web PubSub Service Owner role to a service principal (application) for a Web PubSub resource.
68
67
69
68
> [!NOTE]
70
-
> You can assign a role to any scope, including management group, subscription, resource group, and single resource. For more information about scope, see [Understand scope for Azure RBAC](../role-based-access-control/scope-overview.md).
69
+
> You can assign a role to any scope, including management group, subscription, resource group, and single resource. For more information about scope, see [Understand scope for Azure role-based access control](../role-based-access-control/scope-overview.md).
71
70
72
71
1. In the [Azure portal](https://portal.azure.com/), go to your Web PubSub resource.
73
72
74
-
1. On the left menu, select **Access control (IAM)** to display access control settings for your Web PubSub resource.
73
+
1. On the left menu, select **Access control (IAM)** to display access control settings for the resource.
75
74
76
75
1. Select the **Role assignments** tab and view the role assignments at this scope.
77
76
78
-
The following screenshot shows an example of the Access control (IAM) pane for a Web PubSub resource:
77
+
The following figure shows an example of the **Access control (IAM)** pane for a Web PubSub resource:
79
78
80
79
:::image type="content" source="media/howto-authorize-from-application/access-control.png" alt-text="Screenshot that shows an example of the Access control (IAM) pane.":::
81
80
@@ -89,9 +88,9 @@ This section demonstrates how to assign a Web PubSub Service Owner role to a ser
89
88
90
89
1. Select the **Members** tab. Under **Assign access to**, select **User, group, or service principal**.
91
90
92
-
1. Choose **Select Members**
91
+
1. Choose **Select members**.
93
92
94
-
1. Search for and select the application that you want to assign the role to.
93
+
1. Search for and select the application to assign the role to.
95
94
96
95
1. Choose **Select** to confirm the selection.
97
96
@@ -118,7 +117,7 @@ To learn more about how to assign and manage Azure role assignments, see these a
118
117
119
118
1. For **Method**, select **GET**.
120
119
121
-
1. For **URI**, enter `https://login.microsoftonline.com/<TENANT ID>/oauth2/token`. Replace `<TENANT ID>` with the value for **Directory (tenant) ID** on the **Overview**tab of the application you created.
120
+
1. For **URI**, enter `https://login.microsoftonline.com/<TENANT ID>/oauth2/token`. Replace `<TENANT ID>` with the value for **Directory (tenant) ID** on the **Overview**pane of the application you created.
122
121
123
122
1. Select the **Headers** tab, and then add the following keys and values:
124
123
@@ -132,8 +131,8 @@ To learn more about how to assign and manage Azure role assignments, see these a
132
131
1. Under **Key**, add the following keys and values:
133
132
134
133
1. Select **grant_type**, and then select the value **client_credentials**.
135
-
1. Select **client_id**, and then paste the value of **Application (client) ID** from the **Overview**tab of the application you created.
136
-
1. Select **client_secret**, and then paste the value of client secret you saved.
134
+
1. Select **client_id**, and then paste the value of **Application (client) ID** from the **Overview**pane of the application you created.
135
+
1. Select **client_secret**, and then paste the value of the client secret you saved.
137
136
1. Select **resource**, and then enter `https://webpubsub.azure.com` for the value.
138
137
139
138
:::image type="content" source="media/howto-authorize-from-application/get-azure-ad-token-using-postman-body.png" alt-text="Screenshot that shows the Body tab parameters when you use Postman to get the token.":::
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-client-certificate.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ You can restrict access to your instance of Azure Web PubSub by turning on diffe
25
25
26
26
## Deploy Web PubSub
27
27
28
-
In this example, you use a function called `func-client-cert` as an event handler to process `connect` events. Clients connect to a hub called `echo`. Here are the Bicep and Azure Resource Manager templates you use to deploy an Azure Web PubSub service with client certificate authentication enabled and event handlers configured.
28
+
In this example, you use a function called `func-client-cert` as an event handler to process `connect` events. Clients connect to a hub called `echo`. The next sections have Bicep and Azure Resource Manager templates that you can use to deploy an Azure Web PubSub service with client certificate authentication enabled and event handlers configured.
29
29
30
30
The templates enable client certificate authentication via the property `tls.clientCertEnabled`.
## Validate a client certificate in an event handler
142
142
143
-
You can validate an incoming client certificate via its SHA-1 thumbprint in the `connect` event. The value is available in `clientCertificates` field. For more information, see [CloudEvents HTTP extension for event handler](reference-cloud-events.md#connect).
143
+
You can validate an incoming client certificate via its SHA-1 thumbprint in the `connect` event. The value is available in `clientCertificates`. For more information, see [CloudEvents HTTP extension for event handler](reference-cloud-events.md#connect).
144
144
145
-
The following code samples have function codes that you can use to implement validation logic.
145
+
The following code sample has function code that you can use to implement validation logic.
If you want to rotate the certificate, you can update your event handler code to accept multiple thumbprints.
180
180
181
-
## Missing client certificate
181
+
## Handle a missing client certificate
182
182
183
183
Azure Web PubSub doesn't abort a TLS handshake when a client doesn't provide a client certificate. It's up to the event handler to decide whether to accept or reject a connection without a client certificate.
184
184
185
185
## Related content
186
186
187
-
*[How to configure event handler](howto-develop-eventhandler.md)
187
+
*[How to configure an event handler](howto-develop-eventhandler.md)
The Health API should return a `200` status code without any certificate errors.
203
203
204
-
## Private network key vault
204
+
## Configure a private network key vault
205
205
206
206
If you configure a [private endpoint](../private-link/private-endpoint-overview.md) to your key vault, Web PubSub can't access the key vault by using a public network. You must set up a [shared private endpoint](./howto-secure-shared-private-endpoints-key-vault.md) to give Web PubSub access to your key vault via a private network.
207
207
208
208
After you create a shared private endpoint, you can create a custom certificate as usual. You *don't have to change the domain in the key vault URI*. For example, if your key vault base URI is `https://contoso.vault.azure.net`, continue to use this URI to configure a custom certificate.
209
209
210
210
You don't have to explicitly allow Web PubSub IP addresses in your key vault firewall settings. For more information, see [Key vault private link diagnostics](/azure/key-vault/general/private-link-diagnostics).
211
211
212
-
## Certificate rotation
212
+
## Rotate the certificate
213
213
214
-
If you don't specify a secret version when you create a custom certificate, Web PubSub periodically checks for the latest version in the key vault. When a new version is detected, it's automatically applied. The delay is usually within an hour.
214
+
If you don't specify a secret version when you create a custom certificate, Web PubSub periodically checks for the latest version in the key vault. When a new version is detected, it's automatically applied. The delay is typically less than an hour.
215
215
216
216
Alternatively, you can pin a custom certificate to a specific secret version in your key vault. When you need to apply a new certificate, you can edit the secret version, and then update the custom certificate proactively.
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-secure-network-access-control.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ The next sections describe your two options to control access to your Web PubSub
23
23
- Deny all requests that originate in a public endpoint.
24
24
- Allow only client connections from a public network.
25
25
26
-
###Deny all public traffic
26
+
## Deny all public traffic
27
27
28
28
To completely deny all public traffic, first configure the public network rule to allow no request type. Then, configure rules that grant access to traffic from specific virtual networks. This configuration enables you to build a secure network boundary for your applications.
29
29
30
-
###Allow only client connections from a public network
30
+
## Allow only client connections from a public network
31
31
32
32
In this scenario, you configure the public network rule to allow only client connections from a public network. You can then configure private network rules to allow other types of requests that originate from a specific virtual network. This configuration hides your app servers on a public network and establishes secure connections between your app servers and Azure Web PubSub.
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-secure-rotate-access-key.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Rotate access keys for Azure Web PubSub
2
+
title: Rotate access keys
3
3
description: Learn how and when to rotate Azure Web PubSub access keys by regenerating one key at a time.
4
4
author: yjin81
5
5
ms.author: yajin1
@@ -30,18 +30,16 @@ In some scenarios, Azure Web PubSub might enforce a mandatory access key rotatio
30
30
31
31
1. Go to the Web PubSub instance that has keys you want to rotate.
32
32
33
-
1. On the resource menu, select **Keys**.
33
+
1. On the left menu, select **Keys**.
34
34
35
-
1. Select **Regenerate Primary Key** or **Regenerate Secondary Key**.
36
-
37
-
A new key and a corresponding connection string are created. You manage them in your Web PubSub instance.
35
+
1. Select **Regenerate Primary Key** or **Regenerate Secondary Key**. A new key and a corresponding connection string are created. You manage them in your Web PubSub instance.
38
36
39
37
When the Azure Web PubSub service becomes generally available, you can also regenerate a key by using the Azure CLI.
40
38
41
39
## Update configurations with the new connection string
42
40
43
41
1. Copy the new connection string.
44
42
45
-
1. Update all configurations to use the new connection string.
43
+
1. Update all existing configurations to use the new connection string.
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-secure-shared-private-endpoints.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This article shows you how to configure your Web PubSub resource to send upstrea
20
20
21
21
This outbound method is subject to the following requirements:
22
22
23
-
- The network endpoint must be deployed by using Azure App Service or Azure Functions.
23
+
- The upstream endpoint must be deployed by using Azure App Service or Azure Functions.
24
24
- The Web PubSub resource must be on the Standard tier or the Premium tier.
25
25
- An Azure App Service or an Azure Functions resource must be created by choosing a specific tier to create the resource. For more information, see [Use private endpoints for Azure Web App](../app-service/networking/private-endpoint.md).
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-use-managed-identity.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Use a managed identity in Azure Web PubSub
2
+
title: Use a managed identity
3
3
description: Learn how managed identities work in Azure Web PubSub and how to use a managed identity in a serverless scenario.
4
4
author: vicancy
5
5
ms.service: azure-web-pubsub
@@ -8,7 +8,7 @@ ms.date: 08/16/2024
8
8
ms.author: lianwei
9
9
---
10
10
11
-
# Use a managed identity in Azure Web PubSub
11
+
# Use a managed identity
12
12
13
13
This article shows you how to create and use a managed identity for Azure Web PubSub.
14
14
@@ -51,7 +51,7 @@ Azure Web PubSub is a fully managed service, so you can't use a managed identity
51
51
52
52
1. Add a system-assigned identity or a user-assigned identity.
53
53
54
-
1. Go to **Configure hub settings** and add or edit an event handler for the network.
54
+
1. Go to **Configure hub settings** and add or edit an upstream event handler.
55
55
56
56
:::image type="content" source="media/howto-use-managed-identity/msi-settings.png" alt-text="Screenshot that shows settings to use on the Configure hub settings pane.":::
0 commit comments