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-signalr/concept-service-mode.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
@@ -59,7 +59,7 @@ Serverless mode doesn't have connection stickiness, but you can still have a ser
59
59
> [!NOTE]
60
60
> Both REST API and WebSockets are supported in SignalR service [management SDK](https://github.com/Azure/azure-signalr/blob/dev/docs/management-sdk-guide.md). If you're using a language other than .NET, you can also manually invoke the REST APIs following this [specification](https://github.com/Azure/azure-signalr/blob/dev/docs/rest-api.md).
61
61
62
-
It's also possible for your server application to receive messages and connection events from clients. SignalR Service will deliver messages and connection events to pre-configured endpoints (called *upstream endpoints*) using web hooks. Upstream endpoints can only be configured in Serverless mode. For more information, see [Upstream settings](concept-upstream.md).
62
+
It's also possible for your server application to receive messages and connection events from clients. SignalR Service will deliver messages and connection events to pre-configured endpoints (called *upstream endpoints*) using web hooks. Upstream endpoints can only be configured in Serverless mode. For more information, see [Upstream endpoints](concept-upstream.md).
Copy file name to clipboardExpand all lines: articles/azure-signalr/concept-upstream.md
+43-40Lines changed: 43 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,41 @@
1
1
---
2
-
title: Upstream settings in Azure SignalR Service
3
-
description: Get an introduction of upstream settings and protocols of upstream messages.
2
+
title: Upstream endpoints in Azure SignalR Service
3
+
description: Introduction to upstream endpoints settings and upstream message protocols.
4
4
author: vicancy
5
5
ms.service: signalr
6
6
ms.topic: conceptual
7
7
ms.date: 12/09/2022
8
8
ms.author: lianwei
9
9
---
10
10
11
-
# Upstream settings
11
+
# Upstream endpoints
12
12
13
-
Upstream is a feature that allows Azure SignalR Service to send messages and connection events to a set of endpoints in serverless mode. You can use upstream to invoke a hub method from clients in serverless mode and let endpoints get notified when client connections are connected or disconnected.
13
+
The upstream endpoints feature allows Azure SignalR Service to send messages and connection events to a set of endpoints in serverless mode. You can use upstream endpoints to invoke a hub method from clients in serverless mode to notify endpoints when client connections are connected or disconnected.
14
14
15
15
> [!NOTE]
16
-
> Only serverless mode can configure upstream settings.
16
+
> Upstream endpoints can only be configured in serverless mode.
17
17
18
-
## Details of upstream settings
18
+
## Upstream endpoint settings
19
19
20
-
Upstream settings consist of a list of order-sensitive items. Each item consists of:
20
+
An upstream endpoint's settings consist of a list of order-sensitive items:
21
21
22
22
* A URL template, which specifies where messages send to.
23
23
* A set of rules.
24
-
* Authentication configurations.
24
+
* Authentication configurations.
25
25
26
-
When the specified event happens, an item's rules are checked one by one in order. Messages will be sent to the first matching item's upstream URL.
26
+
When an event is fired, an item's rules are checked one by one in order. Messages will be sent to the first matching item's upstream endpoint URL.
27
27
28
28
### URL template settings
29
29
30
-
You can parameterize the URL to support various patterns. There are three predefined parameters:
30
+
You can parameterize the upstream endpoint URL to support various patterns. There are three predefined parameters:
31
31
32
32
|Predefined parameter|Description|
33
33
|---------|---------|
34
34
|{hub}| A hub is a concept of Azure SignalR Service. A hub is a unit of isolation. The scope of users and message delivery is constrained to a hub.|
35
-
|{category}| A category can be one of the following values: <ul><li>**connections**: Connection lifetime events. It's fired when a client connection is connected or disconnected. It includes connected and disconnected events.</li><li>**messages**: Fired when clients invoke a hub method. It includes all other events, except those in the **connections** category.</li></ul>|
35
+
|{category}| A category can be one of the following values: <ul><li>**connections**: Connection lifetime events. It's fired when a client connection is connected or disconnected. It includes connected and disconnected events.</li><li>**messages**: Fired when clients invoke a hub method. It includes all other events, except events in the **connections** category.</li></ul>|
36
36
|{event}| For the **messages** category, an event is the target in an [invocation message](https://github.com/dotnet/aspnetcore/blob/master/src/SignalR/docs/specs/HubProtocol.md#invocation-message-encoding) that clients send. For the **connections** category, only *connected* and *disconnected* are used.|
37
37
38
-
These predefined parameters can be used in the URL pattern. Parameters will be replaced with a specified value when you're evaluating the upstream URL. For example:
38
+
These predefined parameters can be used in the URL pattern. Parameters will be replaced with a specified value when you're evaluating the upstream endpoint URL. For example:
### Key Vault secret reference in URL template settings
52
52
53
-
The URL of upstream is not encryption at rest. If you have any sensitive information, it's suggested to use Key Vault to save them where access control has better insurance. Basically, you can enable the managed identity of Azure SignalR Service and then grant read permission on a Key Vault instance and use Key Vault reference instead of plaintext in Upstream URL Pattern.
53
+
The upstream endpoint URL isn't encrypted. You can secure sensitive upstream endpoints using Key Vault and access them with a managed identity.
54
54
55
-
1. Add a system-assigned identity or user-assigned identity. See [How to add managed identity in Azure Portal](./howto-use-managed-identity.md#add-a-system-assigned-identity)
55
+
To enable managed identity in your SignalR service instance and grant it Key Vault access:
56
56
57
+
1. Add a system-assigned identity or user-assigned identity. See [How to add managed identity in Azure portal](./howto-use-managed-identity.md#add-a-system-assigned-identity).
57
58
2. Grant secret read permission for the managed identity in the Access policies in the Key Vault. See [Assign a Key Vault access policy using the Azure portal](../key-vault/general/assign-access-policy-portal.md)
58
59
59
-
3. Replace your sensitive text with the below syntax in the Upstream URL Pattern:
60
+
3. Replace your sensitive text with the below syntax in the upstream endpoint URL Pattern:
`<secret-identity>` is the full data-plane URI of a secret in Key Vault, optionally including a version, e.g., https://myvault.vault.azure.net/secrets/mysecret/ or https://myvault.vault.azure.net/secrets/mysecret/ec96f02080254f109c51a1f14cdb1931
64
65
65
66
For example, a complete reference would look like the following:
> The service rereads the secret content every 30 minutes or whenever the upstream settings or managed identity changes. Try updating the Upstream settings if you'd like an immediate update when the Key Vault content is changed.
77
+
> Every 30 minutes, or whenever the upstream endpoint settings or managed identity change, the service rereads the secret content. You can immediately trigger an update by changing the upstream endpoint settings.
77
78
78
79
### Rule settings
79
80
80
-
You can set rules for *hub rules*, *category rules*, and *event rules* separately. The matching rule supports three formats. Take event rules as an example:
81
-
- Use an asterisk(*) to match any events.
82
-
- Use a comma (,) to join multiple events. For example, `connected, disconnected` matches the connected and disconnected events.
83
-
- Use the full event name to match the event. For example, `connected` matches the connected event.
81
+
You can set *hub rules*, *category rules*, and *event rules* separately. The matching rule supports three formats:
82
+
83
+
* Use an asterisk (*) to match any event.
84
+
* Use a comma (,) to join multiple events. For example, `connected, disconnected` matches the connected and disconnected events.
85
+
* Use the full event name to match the event. For example, `connected` matches the connected event.
84
86
85
87
> [!NOTE]
86
-
> If you're using Azure Functions and[SignalR trigger](../azure-functions/functions-bindings-signalr-service-trigger.md), SignalR trigger will expose a single endpoint in the following format: `<Function_App_URL>/runtime/webhooks/signalr?code=<API_KEY>`.
88
+
> If you're using Azure Functions with [SignalR trigger](../azure-functions/functions-bindings-signalr-service-trigger.md), SignalR trigger will expose a single endpoint in the following format: `<Function_App_URL>/runtime/webhooks/signalr?code=<API_KEY>`.
87
89
> You can just configure **URL template settings** to this url and keep **Rule settings** default. See [SignalR Service integration](../azure-functions/functions-bindings-signalr-service-trigger.md#signalr-service-integration) for details about how to find `<Function_App_URL>` and `<API_KEY>`.
88
90
89
91
### Authentication settings
90
92
91
-
You can configure authentication for each upstream setting item separately. When you configure authentication, a token is set in the `Authentication` header of the upstream message. Currently, Azure SignalR Service supports the following authentication types:
93
+
You can configure authentication for each upstream endpoint setting separately. When you configure authentication, a token is set in the `Authentication` header of the upstream message. Currently, Azure SignalR Service supports the following authentication types:
92
94
- `None`
93
95
- `ManagedIdentity`
94
96
95
-
When you select `ManagedIdentity`, you must enable a managed identity in Azure SignalR Service in advance and optionally specify a resource. See [Managed identities for Azure SignalR Service](howto-use-managed-identity.md) for details.
97
+
When you select `ManagedIdentity`, you must first enable a managed identity in Azure SignalR Service and optionally, specify a resource. See [Managed identities for Azure SignalR Service](howto-use-managed-identity.md) for details.
96
98
97
-
## Create upstream settings via the Azure portal
99
+
## Configure upstream endpoint settings via the Azure portal
98
100
99
101
> [!NOTE]
100
102
> Integration with App Service Environment is currently not supported.
101
103
102
104
1. Go to Azure SignalR Service.
103
-
2. Select **Settings** and switch **Service Mode** to **Serverless**. The upstream settings will appear:
3. Add URLs under **Upstream URL Pattern**. Then settings such as **Hub Rules** will show the default value.
108
-
4. To set settings for **Hub Rules**, **Event Rules**, **Category Rules**, and **Upstream Authentication**, select the value of **Hub Rules**. A page that allows you to edit settings appears:
105
+
1. Select **Settings**.
106
+
1. Switch **Service Mode** to **Serverless**.
107
+
1. Add URLs under **Upstream URL Pattern**.
108
+
:::image type="content" source="media/concept-upstream/upstream-portal.png" alt-text="Screenshot of AzureSignalR Service Upstream settings.":::
109
+
1. Select **Hub Rules** to open **Upstream Settings**.
110
+
:::image type="content" source="media/concept-upstream/upstream-detail-portal.png" alt-text="Screenshot of Azure SignalR Upstream setting details.":::
111
+
1. Change **Hub Rules**, **Event Rules** and **Category Rules** by entering rule value in the corresponding field.
112
+
1. Under **Upstream Authentication** select
113
+
1. **Use Managed Identity**. (Ensure that you've enabled managed identity)
114
+
1. Choose any options under **Audience in the issued token**. See [Managed identities for Azure SignalR Service](howto-use-managed-identity.md) for details.
## Configure upstream endpoint settings via Resource Manager template
111
117
112
-
5. To set **Upstream Authentication**, make sure you've enabled a managed identity first. Then select **Use Managed Identity**. According to your needs, you can choose any options under **Auth Resource ID**. See [Managed identities for Azure SignalR Service](howto-use-managed-identity.md) for details.
113
-
114
-
## Create upstream settings via Resource Manager template
115
-
116
-
To create upstream settings by using an [Azure Resource Manager template](../azure-resource-manager/templates/overview.md), set the `upstream` property in the `properties` property. The following snippet shows how to set the `upstream` property for creating and updating upstream settings.
118
+
To configure upstream endpoint settings by using an [Azure Resource Manager template](../azure-resource-manager/templates/overview.md), set the `upstream` property in the `properties` property. The following snippet shows how to set the `upstream` property for creating and updating upstream endpoint settings.
117
119
118
120
```JSON
119
121
{
@@ -186,8 +188,9 @@ Content-Type: `application/json` or `application/x-msgpack`
186
188
187
189
### Signature
188
190
189
-
The service will calculate SHA256 code for the `X-ASRS-Connection-Id` value by using both the primary access key and the secondary access key as the `HMAC` key. The service will set it in the `X-ASRS-Signature` header when making HTTP requests to upstream:
190
-
```
191
+
The service will calculate SHA256 code for the `X-ASRS-Connection-Id` value by using both the primary access key and the secondary access key as the `HMAC` key. The service will set it in the `X-ASRS-Signature` header when making HTTP requests to an upstream endpoint:
Copy file name to clipboardExpand all lines: articles/azure-signalr/howto-use-managed-identity.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,18 +64,18 @@ Azure SignalR Service is a fully managed service. It uses a managed identity to
64
64
65
65
### Enable managed identity authentication in upstream settings
66
66
67
-
Once you've added a [system-assigned identity](#add-a-system-assigned-identity) or [user-assigned identity](#add-a-user-assigned-identity) to your SignalR instance, you can enable managed identity authentication in the upstream settings.
67
+
Once you've added a [system-assigned identity](#add-a-system-assigned-identity) or [user-assigned identity](#add-a-user-assigned-identity) to your SignalR instance, you can enable managed identity authentication in the upstream endpoint settings.
68
68
69
69
1. Browse to your SignalR instance.
70
70
1. Select **Settings** from the menu.
71
71
1. Select the **Serverless** service mode.
72
-
1. Enter the upstream URL pattern in the **Add an upstream URL pattern** text box. See [URL template settings](concept-upstream.md#url-template-settings)
73
-
1. Select Add one Upstream Setting and select any asterisk to get into a detailed page as shown below.
1. Enter the upstream endpoint URL pattern in the **Add an upstream URL pattern** text box. See [URL template settings](concept-upstream.md#url-template-settings)
73
+
1. Select Add one Upstream Setting and select any asterisk go to **Upstream Settings**.
74
+
:::image type="content" source="media/signalr-howto-use-managed-identity/pre-msi-settings.png" alt-text="Screenshot of Azure SignalR service Settings.":::
:::image type="content" source="media/signalr-howto-use-managed-identity/msi-settings.png" alt-text="Screenshot of Azure SignalR service Upstream settings.":::
79
79
80
80
1. In the managed identity authentication settings, for **Resource**, you can specify the target resource. The resource will become an `aud` claim in the obtained access token, which can be used as a part of validation in your upstream endpoints. The resource can be one of the following formats:
81
81
- Empty
@@ -101,7 +101,9 @@ Libraries and code samples that show how to handle token validation are availabl
101
101
You can easily set access validation for a Function App without code changes using the Azure portal.
102
102
103
103
1. Go to the Function App in the Azure portal.
104
-
1. In the **Authentication** page, select **Add identity provider**
104
+
1. Select **Authentication** from the menu.
105
+
1. Select **Add identity provider**.
106
+
1. In the **Basics** tab, select **Microsoft** from the **Identity provider** dropdown.
105
107
1. Select **Log in with Azure Active Directory** in **Action to take when request is not authenticated**.
106
108
1. Select **Microsoft** in the identity provider dropdown. The option to create a new registration is selected by default. You can change the name of the registration. For more information on enabling Azure AD provider, see [Configure your App Service or Azure Functions app to use Azure AD login](../app-service/configure-authentication-provider-aad.md)
Copy file name to clipboardExpand all lines: articles/azure-signalr/signalr-concept-serverless-development-config.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
@@ -49,7 +49,7 @@ Use the `SignalRTrigger` binding to handle messages sent from SignalR Service. Y
49
49
50
50
For more information, see the [SignalR Service trigger binding reference](../azure-functions/functions-bindings-signalr-service-trigger.md).
51
51
52
-
You also need to configure your function endpoint as an upstream so that service will trigger the function when there's message from a client. For more information about how to configure upstream, see [Upstream settings in Azure SignalR Service](concept-upstream.md).
52
+
You also need to configure your function endpoint as an upstream endpoint so that service will trigger the function when there's message from a client. For more information about how to configure upstream endpoints, see [Upstream endpoints](concept-upstream.md).
53
53
54
54
> [!NOTE]
55
55
> SignalR Service doesn't support the `StreamInvocation` message from a client in Serverless Mode.
0 commit comments