Skip to content

Commit 92ac95a

Browse files
authored
Merge pull request #291825 from craigshoemaker/signalr/ropc/disclaimer
[SignalR] Add connection string discliamer
2 parents 0a88378 + bb0de3d commit 92ac95a

25 files changed

+130
-15
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ms.author: kenchen
1212

1313
A connection string contains information about how to connect to Azure SignalR Service. In this article, you learn the basics of connection strings and how to configure one in your application.
1414

15+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
16+
1517
## What a connection string is
1618

1719
When an application needs to connect to Azure SignalR Service, it needs the following information:
@@ -192,6 +194,8 @@ Endpoint=https://<resource_name>.service.signalr.net;AccessKey=<access_key>;Serv
192194

193195
## Configure a connection string in your application
194196

197+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
198+
195199
There are two ways to configure a connection string in your application.
196200

197201
You can set the connection string when calling the `AddAzureSignalR()` API:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: include file
3+
description: include file
4+
author: vicancy
5+
ms.service: azure-signalr-service
6+
ms.topic: include
7+
ms.date: 12/11/2024
8+
ms.author: lianwei
9+
ms.custom: include file
10+
---
11+
12+
Raw connection strings appear in this article for demonstration purposes only. In production environments, always protect your access keys. Use Azure Key Vault to manage and rotate your keys securely and [secure your connection string using Microsoft Entra ID](../concept-connection-string.md#use-microsoft-entra-id).
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: include file
3+
description: include file
4+
author: vicancy
5+
ms.service: azure-signalr-service
6+
ms.topic: include
7+
ms.date: 12/11/2024
8+
ms.author: lianwei
9+
ms.custom: include file
10+
---
11+
12+
> [!IMPORTANT]
13+
> Raw connection strings appear in this article for demonstration purposes only.
14+
>
15+
> A connection string includes the authorization information required for your application to access Azure Web PubSub service. The access key inside the connection string is similar to a root password for your service. In production environments, always protect your access keys. Use Azure Key Vault to manage and rotate your keys securely and [secure your connection string using Microsoft Entra ID](../concept-connection-string.md#use-microsoft-entra-id).
16+
>
17+
> Avoid distributing access keys to other users, hard-coding them, or saving them anywhere in plain text that is accessible to others. Rotate your keys if you believe they may have been compromised.
Binary file not shown.

articles/azure-signalr/scripts/signalr-cli-create-with-app-service.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ This sample script creates a new Azure SignalR Service resource, which is used t
1818

1919
[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
2020

21+
[!INCLUDE [Connection string security](../includes/signalr-connection-string-security.md)]
22+
2123
## Sample script
2224

2325
[!INCLUDE [cli-launch-cloud-shell-sign-in.md](~/reusable-content/ce-skilling/azure/includes/cli-launch-cloud-shell-sign-in.md)]
2426

2527
### Run the script
2628

29+
[!INCLUDE [Connection string security comment](../includes/signalr-connection-string-security-comment.md)]
30+
2731
:::code language="azurecli" source="~/azure_cli_scripts/azure-signalr/create-signalr-with-app-service/create-signalr-with-app-service.sh" id="FullScript":::
2832

2933
## Clean up resources

articles/azure-signalr/signalr-concept-client-negotiation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ms.date: 04/02/2024
1212

1313
The first request between a client and a server is the negotiation request. When you use self-hosted SignalR, you use the request to establish a connection between the client and the server. And when you use Azure SignalR Service, clients connect to the service instead of the application server. This article shares concepts about negotiation protocols and ways to customize a negotiation endpoint.
1414

15+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
16+
1517
## What is negotiation?
1618

1719
The response to the `POST [endpoint-base]/negotiate` request contains one of three types of responses:
@@ -155,7 +157,9 @@ private class CustomRouter : EndpointRouterDecorator
155157
}
156158
```
157159

158-
Also register the router to dependency injection:
160+
Also register the router to dependency injection.
161+
162+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
159163

160164
```cs
161165
// Sample of configuring multiple endpoints and dependency injection

articles/azure-signalr/signalr-concept-serverless-development-config.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Azure Functions applications can use the [Azure SignalR Service bindings](../azu
1717

1818
This article describes the concepts for developing and configuring an Azure Function app that is integrated with SignalR Service.
1919

20+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
21+
2022
## SignalR Service configuration
2123

2224
Azure SignalR Service can be configured in [different modes](concept-service-mode.md). When used with Azure Functions, the service must be configured in **Serverless** mode.
@@ -153,7 +155,10 @@ public interface IChatClient
153155
}
154156
```
155157

156-
Then you can use the strongly typed methods as follows:
158+
Then you can use the strongly typed methods as follows.
159+
160+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
161+
157162
```cs
158163
[SignalRConnection("AzureSignalRConnectionString")]
159164
public class Functions : ServerlessHub<IChatClient>

articles/azure-signalr/signalr-howto-diagnostic-logs.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ You can enable other types of data collection after some configuration. This art
1919
- For more information about monitoring Azure SignalR Service, see [Monitor Azure SignalR Service](monitor-signalr.md).
2020
- For a detailed listing of the metrics and logs collected for Azure SignalR Service, see [Azure SignalR Service monitoring data reference](monitor-signalr-reference.md).
2121

22+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
23+
2224
## Prerequisites
2325

2426
To enable resource logs, you need to set up a place to store your log data, such as Azure Storage or Log Analytics.
@@ -241,7 +243,9 @@ To enable this behavior, uncheck the checkbox for a specific log type in the **T
241243

242244
##### Server side
243245

244-
Also set up `ServiceOptions.DiagnosticClientFilter` to define a filter of diagnostic clients based on the http context comes from clients. For example, make client with hub URL `<HUB_URL>?diag=yes`, then set up `ServiceOptions.DiagnosticClientFilter` to filter the diagnostic client. If it returns `true`, the client is marked as diagnostic client. Otherwise, it stays as normal client. The `ServiceOptions.DiagnosticClientFilter` can be set in your startup class like this:
246+
Also set up `ServiceOptions.DiagnosticClientFilter` to define a filter of diagnostic clients based on the http context comes from clients. For example, make client with hub URL `<HUB_URL>?diag=yes`, then set up `ServiceOptions.DiagnosticClientFilter` to filter the diagnostic client. If it returns `true`, the client is marked as diagnostic client. Otherwise, it stays as normal client. The following example show how to use the `ServiceOptions.DiagnosticClientFilter` in your startup class.
247+
248+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
245249

246250
``` C#
247251
// sample: mark a client as diagnostic client when it has query string "?diag=yes" in hub URL

articles/azure-signalr/signalr-howto-emulator.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ When developing serverless applications, we provide an Azure SignalR Local Emula
1717
* Latest Rest API support
1818
* Upstream
1919

20+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
21+
2022
## Walkthrough
2123

2224
We use [this serverless sample](https://github.com/Azure/azure-functions-signalrservice-extension/tree/3e87c3ce277265866ca9d0bf51bb9c7ecea39e14/samples/bidirectional-chat) to show how to use the emulator.
2325

26+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
27+
2428
1. Clone the sample repo to local
2529
```
2630
git clone https://github.com/Azure/azure-functions-signalrservice-extension.git
@@ -69,9 +73,7 @@ We use [this serverless sample](https://github.com/Azure/azure-functions-signalr
6973
asrs-emulator start
7074
```
7175
72-
After the emulator is successfully started, it generates the ConnectionString to be used later, for example, the ConnectionString is `Endpoint=http://localhost;Port=8888;AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH;Version=1.0;` as the below screenshot shows.
73-
74-
:::image type="content" source="./media/signalr-howto-emulator/emulator-command-running.png" alt-text="Screenshot of the emulator command is running.":::
76+
After the emulator is successfully started, it generates the ConnectionString to be used later.
7577
7678
The emulator also provides advanced options when start, for example, you can use `asrs-emulator start -p 8999` to customize the port the emulator used. Type `asrs-emulator start --help` to check the options available.
7779

articles/azure-signalr/signalr-howto-event-grid-integration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Azure Event Grid is a fully managed event routing service that provides uniform
1919
[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
2020

2121
- The Azure CLI commands in this article are formatted for the **Bash** shell. If you're using a different shell like PowerShell or Command Prompt, you may need to adjust line continuation characters or variable assignment lines accordingly. This article uses variables to minimize the amount of command editing required.
22+
23+
[!INCLUDE [Connection string security](includes/signalr-connection-string-security.md)]
2224

2325
## Create a resource group
2426

@@ -139,6 +141,8 @@ When the subscription is completed, you should see output similar to the followi
139141

140142
Switch to the service mode to `Serverless Mode` and set up a client connection to the SignalR Service. You can take [Serverless Sample](https://github.com/aspnet/AzureSignalR-samples/tree/master/samples/Serverless) as a reference.
141143

144+
[!INCLUDE [Connection string security comment](includes/signalr-connection-string-security-comment.md)]
145+
142146
```bash
143147
git clone [email protected]:aspnet/AzureSignalR-samples.git
144148

0 commit comments

Comments
 (0)