Skip to content

Commit d652ebe

Browse files
committed
finish review.
1 parent 4a28efb commit d652ebe

8 files changed

+132
-158
lines changed

articles/azure-signalr/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
href: howto-shared-private-endpoints-key-vault.md
124124
- name: Use managed identity
125125
href: howto-use-managed-identity.md
126-
- name: Authorize from Azure Application
126+
- name: Authorize from Azure Applications
127127
href: signalr-howto-authorize-application.md
128128
- name: Authorize from Managed Identity
129129
href: signalr-howto-authorize-managed-identity.md

articles/azure-signalr/concept-connection-string.md

Lines changed: 56 additions & 61 deletions
Large diffs are not rendered by default.

articles/azure-signalr/howto-network-access-control.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,41 @@ services: signalr
66
author: vicancy
77
ms.service: signalr
88
ms.topic: conceptual
9-
ms.date: 05/06/2020
9+
ms.date: 35/29/2023
1010
ms.author: lianwei
1111
---
1212

1313
# Configure network access control
1414

15-
Azure SignalR Service enables you to secure and control the level of access to your service endpoint, based on the request type and subset of networks used. When network rules are configured, only applications requesting data over the specified set of networks can access your Azure SignalR Service.
15+
Azure SignalR Service enables you to secure and control the level of access to your service endpoint based on the request type and subset of networks. When network rules are configured, only applications requesting data over the specified set of networks can access your SignalR Service.
1616

17-
Azure SignalR Service has a public endpoint that is accessible through the internet. You can also create [Private Endpoints for your Azure SignalR Service](howto-private-endpoints.md). Private Endpoint assigns a private IP address from your VNet to the Azure SignalR Service, and secures all traffic between your VNet and the Azure SignalR Service over a private link. The Azure SignalR Service network access control provides access control for both public endpoint and private endpoints.
17+
SignalR Service has a public endpoint that is accessible through the internet. You can also create [private endpoints for your Azure SignalR Service](howto-private-endpoints.md). A private endpoint assigns a private IP address from your VNet to the SignalR Service, and secures all traffic between your VNet and the SignalR Service over a private link. The SignalR Service network access control provides access control for both public and private endpoints.
1818

19-
Optionally, you can choose to allow or deny certain types of requests for public endpoint and each private endpoint. For example, you can block all [Server Connections](signalr-concept-internals.md#application-server-connections) from public endpoint and make sure they only originate from a specific VNet.
19+
Optionally, you can choose to allow or deny certain types of requests for the public endpoint and each private endpoint. For example, you can block all [Server Connections](signalr-concept-internals.md#application-server-connections) from public endpoint and make sure they only originate from a specific VNet.
2020

21-
An application that accesses an Azure SignalR Service when network access control rules are in effect still requires proper authorization for the request.
21+
An application that accesses a SignalR Service when network access control rules are in effect still requires proper authorization for the request.
2222

2323
## Scenario A - No public traffic
2424

25-
To completely deny all public traffic, you should first configure the public network rule to allow no request type. Then, you should configure rules that grant access to traffic from specific VNets. This configuration enables you to build a secure network boundary for your applications.
25+
To completely deny all public traffic, first configure the public network rule to allow no request type. Then, you can configure rules that grant access to traffic from specific VNets. This configuration enables you to build a secure network boundary for your applications.
2626

2727
## Scenario B - Only client connections from public network
2828

29-
In this scenario, you can configure the public network rule to only allow [Client Connections](signalr-concept-internals.md#client-connections) from public network. You can then configure private network rules to allow other types of requests originating from a specific VNet. This configuration hides your app servers from public network and establishes secure connections between your app servers and Azure SignalR Service.
29+
In this scenario, you can configure the public network rule to only allow [Client Connections](signalr-concept-internals.md#client-connections) from the public network. You can then configure private network rules to allow other types of requests originating from a specific VNet. This configuration hides your app servers from the public network and establishes secure connections between your app servers and SignalR Service.
3030

3131
## Managing network access control
3232

33-
You can manage network access control for Azure SignalR Service through the Azure portal.
33+
You can manage network access control for SignalR Service through the Azure portal.
3434

35-
### Azure portal
36-
37-
1. Go to the Azure SignalR Service you want to secure.
38-
39-
1. Select on the settings menu called **Network access control**.
35+
1. Go to the SignalR Service instance you want to secure.
36+
1. Select **Network access control** from the left side menu.
4037

4138
![Network ACL on portal](media/howto-network-access-control/portal.png)
4239

4340
1. To edit default action, toggle the **Allow/Deny** button.
4441

4542
> [!TIP]
46-
> The default action is the action the service takes when there is no ACL rule matches. For example, if the default action is **Deny**, then the request types that are not explicitly approved will be denied.
43+
> The default action is the action the service takes when no access control rule matches a request. For example, if the default action is **Deny**, then the request types that are not explicitly approved will be denied.
4744
4845
1. To edit public network rule, select allowed types of requests under **Public network**.
4946

articles/azure-signalr/signalr-concept-internals.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ ms.service: signalr
66
ms.topic: conceptual
77
ms.devlang: csharp
88
ms.custom: devx-track-csharp
9-
ms.date: 01/05/2023
10-
ms.author: lianwei
9+
ms.date: 03/29/2023
10+
ms.author: lanwei
1111
---
1212
# Azure SignalR Service internals
1313

1414
Azure SignalR Service is built on top of ASP.NET Core SignalR framework. It also supports ASP.NET SignalR by reimplementing ASP.NET SignalR's data protocol on top of the ASP.NET Core framework.
1515

16-
You can easily migrate a local ASP.NET Core SignalR or an ASP.NET SignalR application to work with SignalR Service, with a few lines of code change.
16+
You can easily migrate a local ASP.NET Core SignalR or an ASP.NET SignalR application to work with SignalR Service, with by changing few lines of code.
1717

1818
The diagram describes the typical architecture when you use the SignalR Service with your application server.
1919

@@ -28,7 +28,7 @@ A self-hosted ASP.NET Core SignalR application server listens to and connects cl
2828
With SignalR Service, the application server no longer accepts persistent client connections, instead:
2929

3030
1. A `negotiate` endpoint is exposed by Azure SignalR Service SDK for each hub.
31-
1. The endpoint responds to client's negotiation requests and redirect clients to SignalR Service.
31+
1. The endpoint responds to client negotiation requests and redirect clients to SignalR Service.
3232
1. The clients connect to SignalR Service.
3333

3434
For more information, see [Client connections](#client-connections).
@@ -41,15 +41,11 @@ Once the application server is started:
4141

4242
The initial number of connections defaults to 5 and is configurable using the `InitialHubServerConnectionCount` option in the SignalR Service SDK. For more information, see [configuration](https://github.com/Azure/azure-signalr/blob/dev/docs/run-asp-net-core.md#maxhubserverconnectioncount).
4343

44-
While the application server is connected to the SignalR service, the Azure SignalR service may send load-balancing messages to the server. Then, the SDK starts new server connections to the service for better performance.
45-
46-
<!-- Question: What does this mean? Are the connections client <-> service? -->
47-
Messages to and from clients are multiplexed into these connections.
48-
44+
While the application server is connected to the SignalR service, the Azure SignalR service may send load-balancing messages to the server. Then, the SDK starts new server connections to the service for better performance. Messages to and from clients are multiplexed into these connections.
4945

5046
Server connections are persistently connected to the SignalR Service. If a server connection is disconnected due to a network issue:
5147

52-
- All clients served by this server connection disconnect (for more information, see [Data transmission between client and server](#data-transmission-between-client-and-server)).
48+
- All clients served by this server connection disconnect. For more information, see [Data transmission between client and server](#data-transmission-between-client-and-server).
5349
- The server automatically reconnects the clients.
5450

5551
## Client connections
@@ -91,7 +87,7 @@ At this point, the application server receives an event with information from th
9187
9288
SignalR Service transmits data from the client to the pairing application server. Data from the application server is sent to the mapped clients.
9389
94-
SignalR Service doesn't save or store customer data, all customer data received is transmitted to target server or clients in real-time.
90+
SignalR Service doesn't save or store customer data, all customer data received is transmitted to the target server or clients in real-time.
9591
9692
The Azure SignalR Service acts as a logical transport layer between application server and clients. All persistent connections are offloaded to SignalR Service. As a result, the application server only needs to handle the business logic in the hub class, without worrying about client connections.
9793

articles/azure-signalr/signalr-howto-authorize-managed-identity.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Authorize managed identity requests to a SignalR resource
33
description: This article provides information about authorizing request to SignalR resources with Azure AD from managed identities
44
author: vicancy
55
ms.author: lianwei
6-
ms.date: 07/18/2022
6+
ms.date: 03/28/2023
77
ms.service: signalr
88
ms.topic: how-to
99
ms.devlang: csharp
@@ -12,7 +12,7 @@ ms.custom: subject-rbac-steps
1212

1313
# Authorize managed identity requests to a SignalR resource
1414

15-
Azure SignalR Service supports Azure Active Directory (Azure AD) authorizing requests from Azure resources using [Managed identities for Azure resources
15+
Azure SignalR Service supports Azure Active Directory (Azure AD) authorizing requests from Azure resources using [managed identities for Azure resources
1616
](../active-directory/managed-identities-azure-resources/overview.md).
1717

1818
This article shows how to configure your SignalR resource and code to authorize a managed identity request to a SignalR resource.
@@ -30,8 +30,7 @@ This example shows you how to configure `System-assigned managed identity` on a
3030
1. Select the **Save** button to confirm the change.
3131

3232

33-
To learn how to create user-assigned managed identities, see this article:
34-
- [Create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#create-a-user-assigned-managed-identity)
33+
To learn how to create user-assigned managed identities, see [Create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#create-a-user-assigned-managed-identity)
3534

3635
To learn more about configuring managed identities, see one of these articles:
3736

@@ -66,7 +65,7 @@ The following steps describe how to assign a `SignalR App Server` role to a syst
6665

6766
1. Select your Azure subscription.
6867

69-
1. Select **System-assigned managed identity**, search for a virtual machine to which would you'd like to assign the role, and then select it.
68+
1. Select **System-assigned managed identity**, search for a virtual machine to which you'd like to assign the role, and then select it.
7069

7170
1. On the **Review + assign** tab, select **Review + assign** to assign the role.
7271

@@ -86,11 +85,9 @@ To learn more about how to assign and manage Azure role assignments, see these a
8685

8786
#### Using system-assigned identity
8887

89-
You can use either [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme#defaultazurecredential) or [ManagedIdentityCredential](/dotnet/api/azure.identity.managedidentitycredential) to configure your SignalR endpoints.
88+
You can use either [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme#defaultazurecredential) or [ManagedIdentityCredential](/dotnet/api/azure.identity.managedidentitycredential) to configure your SignalR endpoints. However, the best practice is to use `ManagedIdentityCredential` directly.
9089

91-
However, the best practice is to use `ManagedIdentityCredential` directly.
92-
93-
The system-assigned managed identity will be used by default, but **make sure that you don't configure any environment variables** that the [EnvironmentCredential](/dotnet/api/azure.identity.environmentcredential) preserved if you were using `DefaultAzureCredential`. Otherwise it will fall back to use `EnvironmentCredential` to make the request and it will result to a `Unauthorized` response in most cases.
90+
The system-assigned managed identity is used by default, but **make sure that you don't configure any environment variables** that the [EnvironmentCredential](/dotnet/api/azure.identity.environmentcredential) preserved if you were using `DefaultAzureCredential`. Otherwise it falls back to use `EnvironmentCredential` to make the request and it results to a `Unauthorized` response in most cases.
9491

9592
```C#
9693
services.AddSignalR().AddAzureSignalR(option =>
@@ -127,14 +124,14 @@ You might need a group of key-value pairs to configure an identity. The keys of
127124

128125
#### Using system-assigned identity
129126

130-
If you only configure the service URI, then the `DefaultAzureCredential` is used. This class is useful when you want to share the same configuration on Azure and local dev environment. To learn how `DefaultAzureCredential` works, see [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme#defaultazurecredential).
127+
If you only configure the service URI, then the `DefaultAzureCredential` is used. This class is useful when you want to share the same configuration on Azure and local development environments. To learn how `DefaultAzureCredential` works, see [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme#defaultazurecredential).
131128

132-
On Azure portal, use the following example to configure a `DefaultAzureCredential`. If don't configure any [environment variables listed here](/dotnet/api/overview/azure/identity-readme#environment-variables), then the system-assigned identity will be used to authenticate.
129+
In the Azure portal, use the following example to configure a `DefaultAzureCredential`. If you don't configure any [environment variables listed here](/dotnet/api/overview/azure/identity-readme#environment-variables), then the system-assigned identity is used to authenticate.
133130
```
134131
<CONNECTION_NAME_PREFIX>__serviceUri=https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
135132
```
136133

137-
Here's a config sample of `DefaultAzureCredential` in the `local.settings.json` file. At the local scope there's no managed identity, and the authentication via Visual Studio, Azure CLI, and Azure PowerShell accounts will be attempted in order.
134+
Here's a config sample of `DefaultAzureCredential` in the `local.settings.json` file. At the local scope there's no managed identity, and the authentication via Visual Studio, Azure CLI, and Azure PowerShell accounts are attempted in order.
138135
```json
139136
{
140137
"Values": {
@@ -143,7 +140,7 @@ Here's a config sample of `DefaultAzureCredential` in the `local.settings.json`
143140
}
144141
```
145142

146-
If you want to use system-assigned identity independently and without the influence of [other environment variables](/dotnet/api/overview/azure/identity-readme#environment-variables), you should set the `credential` key with connection name prefix to `managedidentity`. Here's an application settings sample:
143+
If you want to use system-assigned identity independently and without the influence of [other environment variables](/dotnet/api/overview/azure/identity-readme#environment-variables), you should set the `credential` key with the connection name prefix to `managedidentity`. Here's an application settings sample:
147144

148145
```
149146
<CONNECTION_NAME_PREFIX>__serviceUri = https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
@@ -152,12 +149,14 @@ If you want to use system-assigned identity independently and without the influe
152149

153150
#### Using user-assigned identity
154151

155-
If you want to use user-assigned identity, you need to assign one more `clientId` key with connection name prefix compared to system-assigned identity. Here's the application settings sample:
152+
If you want to use user-assigned identity, you need to assign `clientId`in addition to the `serviceUri` and `credential` keys with the connection name prefix. Here's the application settings sample:
153+
156154
```
157155
<CONNECTION_NAME_PREFIX>__serviceUri = https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
158156
<CONNECTION_NAME_PREFIX>__credential = managedidentity
159157
<CONNECTION_NAME_PREFIX>__clientId = <CLIENT_ID>
160158
```
159+
161160
## Next steps
162161

163162
See the following related articles:

articles/azure-signalr/signalr-howto-key-rotation.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,32 @@ description: An overview on why the customer needs to routinely rotate the acces
44
author: vicancy
55
ms.service: signalr
66
ms.topic: how-to
7-
ms.date: 07/18/2022
7+
ms.date: 03/29/2023
88
ms.author: lianwei
99
---
1010
# Rotate access keys for Azure SignalR Service
1111

12-
For security reasons and compliance requirements, it is important to routinely rotate your access keys. This article describes how to rotate access keys for Azure SignalR Service.
12+
For security reasons and compliance requirements, it's important to routinely rotate your access keys. This article describes how to rotate access keys for Azure SignalR Service.
1313

1414
Each Azure SignalR Service instance has a primary and a secondary key. They're used to authenticate SignalR clients when requests are made to the service. The keys are associated with the instance endpoint URL. Keep your keys secure, and rotate them regularly. You're provided with two access keys so that you can maintain connections by using one key while regenerating the other.
1515

1616

1717
## Regenerate access keys
1818

19-
1. Go to the [Azure portal](https://portal.azure.com/), and sign in with your credentials.
20-
21-
1. Find the **Keys** section in the Azure SignalR Service instance with the keys that you want to regenerate.
22-
23-
1. Select **Keys** on the navigation menu.
24-
19+
1. Go to your SignalR instance in the [Azure portal](https://portal.azure.com/).
20+
1. Select **Keys** on the left side menu.
2521
1. Select **Regenerate Primary Key** or **Regenerate Secondary Key**.
2622

27-
A new key and corresponding connection string are created and displayed.
23+
A new key and corresponding connection string are created and displayed.
2824

29-
![Regenerate Keys](media/signalr-howto-key-rotation/regenerate-keys.png)
25+
:::image type="content" source="media/signalr-howto-key-rotation/regenerate-keys.png" alt-text="Screenshot of SignalR key rotation.":::
3026

3127
You also can regenerate keys by using the [Azure CLI](/cli/azure/signalr/key#az-signalr-key-renew).
3228

3329
## Update configurations with new connection strings
3430

3531
1. Copy the newly generated connection string.
36-
3732
1. Update all configurations to use the new connection string.
38-
3933
1. Restart the application as needed.
4034

4135
## Forced access key regeneration

0 commit comments

Comments
 (0)