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/signalr-concept-authorize-azure-active-directory.md
+32-53Lines changed: 32 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.topic: conceptual
10
10
11
11
# Authorize access with Azure Active Directory for Azure SignalR Service
12
12
13
-
Azure SignalR Service supports using Azure Active Directory (Azure AD) to authorize requests to SignalR resources. With Azure AD, you can use role-based access control (RBAC) to grant permissions to a security principal<sup>[<ahref="#security-principal">1</a>]</sup>. The security principal will be authenticated by Azure AD, who will return an OAuth 2.0 token. The token can then be used to authorize a request against the SignalR resource.
13
+
Azure SignalR Service supports Azure Active Directory (Azure AD) to authorize requests to SignalR resources. With Azure AD, you can use role-based access control (RBAC) to grant permissions to a security principal<sup>[<ahref="#security-principal">1</a>]</sup>. The security principal is authenticated by Azure AD, which returns an OAuth 2.0 token. The token is used to authorize a request against the SignalR resource.
14
14
15
-
Authorizing requests against SignalR with Azure AD provides superior security and ease of use over Access Key authorization. Microsoft recommends using Azure AD authorization with your SignalR resources when possible to assure access with minimum required privileges.
15
+
Authorizing requests against SignalR with Azure AD provides superior security and ease of use over Access Key authorization. It's recommended using Azure AD authorization with your SignalR resources when possible to assure access with minimum required privileges.
16
16
17
17
<aid="security-principal"></a>
18
18
*[1] security principal: a user/resource group, an application, or a service principal such as system-assigned identities and user-assigned identities.*
@@ -21,23 +21,23 @@ Authorizing requests against SignalR with Azure AD provides superior security an
21
21
22
22
When a security principal attempts to access a SignalR resource, the request must be authorized. With Azure AD, access to a resource requires 2 steps.
23
23
24
-
1.First, the security principal has to be authenticated by Azure, who will return an OAuth 2.0 token.
25
-
2. Next, the token is passed as part of request to the SignalR resource and used by the service to authorize access to the specified resource.
24
+
1.The security principal has to be authenticated by Azure, who will return an OAuth 2.0 token.
25
+
1. The token is passed as part of a request to the SignalR resource to authorize access to the resource.
26
26
27
27
### Client-side authentication while using Azure AD
28
28
29
-
When using Access Key, the key is shared between your app server (or Function App) and the SignalR resource, results in the SignalR service could authenticate the client connection request with the shared key. However, there is no shared key when using Azure AD to authorize.
29
+
When using Access Key, the key is shared between your app server (or Function App) and the SignalR resource. The SignalR service authenticates the client connection request with the shared key.
30
30
31
-
To solve this problem, we introduced a **temporary access key** that can be used to sign tokens for client connections. The workflow contains four steps.
31
+
Using Azure AD there is no shared key. Instead SignalR uses a **temporary access key** to sign tokens for client connections. The workflow contains four steps.
32
32
33
-
1.First, the security principal requires an OAuth 2.0 token from Azure to authenticate itself.
34
-
2.Second, the security principal calls SignalR Auth API to get a **temporary access key**.
35
-
3.Next, the security principal signs a client token with the **temporary access key** for client connections during negotiation.
36
-
4.Finally, the client uses the client token to connect to Azure SignalR resources.
33
+
1.The security principal requires an OAuth 2.0 token from Azure to authenticate itself.
34
+
2.The security principal calls SignalR Auth API to get a **temporary access key**.
35
+
3.The security principal signs a client token with the **temporary access key** for client connections during negotiation.
36
+
4.The client uses the client token to connect to Azure SignalR resources.
37
37
38
-
The **temporary access key**will expire in 90 minutes, which means it's recommend getting a new one and rotate the old one once an hour.
38
+
The **temporary access key**expires in 90 minutes. It's recommend getting a new one and rotate the old one once an hour.
39
39
40
-
The workflow is built in our [Server SDK](https://github.com/Azure/azure-signalr).
40
+
The workflow is built in the [Azure SignalR SDK for app server](https://github.com/Azure/azure-signalr).
41
41
42
42
## Assign Azure roles for access rights
43
43
@@ -49,58 +49,37 @@ You may have to determine the scope of access that the security principal should
49
49
50
50
You can scope access to Azure SignalR resources at the following levels, beginning with the narrowest scope:
51
51
52
-
-**An individual resource.**
52
+
| Scope | Description |
53
+
|-|-|
54
+
|**An individual resource.**| Applies to only the target resource.|
55
+
|**A resource group.**|Applies to all of the resources in a resource group.|
56
+
|**A subscription.**| Applies to all of the resources in a subscription.|
57
+
|**A management group.**|Applies to all of the resources in the subscriptions included in a management group.|
53
58
54
-
At this scope, a role assignment applies to only the target resource.
55
-
56
-
-**A resource group.**
57
-
58
-
At this scope, a role assignment applies to all of the resources in the resource group.
59
-
60
-
-**A subscription.**
61
-
62
-
At this scope, a role assignment applies to all of the resources in all of the resource groups in the subscription.
63
-
64
-
-**A management group.**
65
-
66
-
At this scope, a role assignment applies to all of the resources in all of the resource groups in all of the subscriptions in the management group.
Access to Websocket connection creation API and Auth APIs.
73
-
74
-
This is the most common used role for an App Server.
75
-
76
-
-[SignalR Service Owner](../role-based-access-control/built-in-roles.md#signalr-service-owner)
77
-
78
-
Full access to all data-plane APIs, including all REST APIs, WebSocket connection creation API and Auth APIs.
79
-
80
-
**Serverless mode** should use this role to support Authorization with Azure AD since it requires both REST APIs permissions and Auth API permissions.
81
-
82
-
-[SignalR REST API Owner](../role-based-access-control/built-in-roles.md#signalr-rest-api-owner)
83
-
84
-
Full access to data-plane REST APIs.
85
-
86
-
It is usually used when you'd like to write a management tool that manages connections and groups but does **NOT** make connections or call Auth APIs.
87
-
88
-
-[SignalR REST API Reader](../role-based-access-control/built-in-roles.md#signalr-rest-api-reader)
89
-
90
-
Read-only access to data-plane REST APIs.
91
-
92
-
It is usually used when you'd like to write a monitoring tool that calls **ONLY** SignalR data-plane **READONLY** REST APIs.
62
+
|Role|Description|Use case|
63
+
|-|-|-|
64
+
|[SignalR App Server](../role-based-access-control/built-in-roles.md#signalr-app-server)|Access to Websocket connection creation API and Auth APIs.|Most commonly for an App Server.|
65
+
|[SignalR Service Owner](../role-based-access-control/built-in-roles.md#signalr-service-owner)|Full access to all data-plane APIs, including REST APIs, WebSocket connection creation API and Auth APIs.|Use for **Serverless mode** for Authorization with Azure AD since it requires both REST APIs permissions and Auth API permissions.|
66
+
|[SignalR REST API Owner](../role-based-access-control/built-in-roles.md#signalr-rest-api-owner)|Full access to data-plane REST APIs.|Often used to write a tool that manages connections and groups but does **NOT** make connections or call Auth APIs.|
67
+
|[SignalR REST API Reader](../role-based-access-control/built-in-roles.md#signalr-rest-api-reader)|Read-only access to data-plane REST APIs.| Commonly used to write a monitoring tool that calls **ONLY** SignalR data-plane **READONLY** REST APIs.|
93
68
94
69
## Next steps
95
70
96
-
To learn how to create an Azure application and use Azure AD Auth, see
71
+
To learn how to create an Azure application and use Azure AD Auth, see:
72
+
97
73
-[Authorize request to SignalR resources with Azure AD from Azure applications](signalr-howto-authorize-application.md)
98
74
99
-
To learn how to configure a managed identity and use Azure AD Auth, see
75
+
To learn how to configure a managed identity and use Azure AD Auth, see:
76
+
100
77
-[Authorize request to SignalR resources with Azure AD from managed identities](signalr-howto-authorize-managed-identity.md)
101
78
102
-
To learn more about roles and role assignments, see
79
+
To learn more about roles and role assignments, see:
80
+
103
81
-[What is Azure role-based access control (Azure RBAC)?](../role-based-access-control/overview.md).
104
82
105
-
To learn how to create custom roles, see
83
+
To learn how to create custom roles, see:
84
+
106
85
-[Steps to create a custom role](../role-based-access-control/custom-roles.md#steps-to-create-a-custom-role)
0 commit comments