title | titleSuffix | description | services | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|
Configure network access control | Azure SignalR Service | Configure network access control for your Azure SignalR Service. | signalr | vicancy | azure-signalr-service | conceptual | 03/29/2023 | lianwei |
Azure SignalR Service allows you to secure and manage access to your service endpoint based on request types and network subsets. When you configure network access control rules, only applications making requests from the specified networks can access your SignalR Service.
:::image type="content" alt-text="Screenshot showing network access control decision flow chart." source="media\howto-network-access-control\network-acl-decision-flow-chart.png" :::
Important
An application that accesses a SignalR Service when network access control rules are in effect still requires proper authorization for the request.
We offer a single, unified switch to simplify the configuration of public network access. The switch has following options:
- Disabled: Completely blocks public network access. All other network access control rules are ignored for public networks.
- Enabled: Allows public network access, which is further regulated by additional network access control rules.
Go to the SignalR Service instance you want to secure.
Select Networking from the left side menu. Select Public access tab:
:::image type="content" alt-text="Screenshot showing how to configure public network access." source="media\howto-network-access-control\portal-public-network-access.png" :::
Select Disabled or Enabled.
Select Save to apply your changes.
The following template disables public network access:
resourcesignalr'Microsoft.SignalRService/SignalR@2024-08-01-preview' = { name: 'foobar'location: 'eastus'properties: { publicNetworkAccess: 'Disabled' } }
The default action is applied when no other rule matches.
Go to the SignalR Service instance you want to secure.
Select Network access control from the left side menu.
To edit the default action, toggle the Allow/Deny button.
Select Save to apply your changes.
The following template sets the default action to Deny
.
resourcesignalr'Microsoft.SignalRService/SignalR@2024-08-01-preview' = { name: 'foobar'location: 'eastus'properties: { networkACLs: { defaultAction: 'Deny' } }
You can configure rules to allow or deny specified request types for both the public network and each private endpoint.
For example, Server Connections are typically high-privileged. To enhance security, you may want to restrict their origin. You can configure rules to block all Server Connections from public network, and only allow they originate from a specific virtual network.
If no rule matches, the default action is applied.
Go to the SignalR Service instance you want to secure.
Select Network access control from the left side menu.
To edit public network rule, select allowed types of requests under Public network.
To edit private endpoint network rules, select allowed types of requests in each row under Private endpoint connections.
Select Save to apply your changes.
The following template denies all requests from the public network except Client Connections. Additionally, it allows only Server Connections, REST API calls, and Trace calls from a specific private endpoint.
The name of the private endpoint connection can be inspected in the privateEndpointConnections
sub-resource. It's automatically generated by the system.
resourcesignalr'Microsoft.SignalRService/SignalR@2024-08-01-preview' = { name: 'foobar'location: 'eastus'properties: { networkACLs: { defaultAction: 'Deny'publicNetwork: { allow: ['ClientConnection'] } privateEndpoints: [ { name: 'foo.0000aaaa-11bb-cccc-dd22-eeeeee333333'allow: ['ServerConnection', 'RESTAPI', 'Trace'] } ] } }
IP rules allow you to grant or deny access to specific public internet IP address ranges. These rules can be used to permit access for certain internet-based services and on-premises networks or to block general internet traffic.
The following restrictions apply:
- You can configure up to 30 rules.
- Address ranges must be specified using CIDR notation, such as
16.17.18.0/24
. Both IPv4 and IPv6 addresses are supported. - IP rules are evaluated in the order they are defined. If no rule matches, the default action is applied.
- IP rules apply only to public traffic and cannot block traffic from private endpoints.
Go to the SignalR Service instance you want to secure.
Select Networking from the left side menu. Select Access control rules tab:
:::image type="content" alt-text="Screenshot showing how to configure IP rules." source="media\howto-network-access-control\portal-ip-rules.png" :::
Edit the list under IP rules section.
Select Save to apply your changes.
The following template has these effects:
- Requests from
123.0.0.0/8
and2603::/8
are allowed. - Requests from all other IP ranges are denied.
resourcesignalr'Microsoft.SignalRService/SignalR@2024-08-01-preview' = { name: 'foobar'location: 'eastus'properties: { networkACLs: { defaultAction: 'Deny'ipRules: [ { value: '123.0.0.0/8'action: 'Allow' } { value: '2603::/8'action: 'Allow' } { value: '0.0.0.0/0'action: 'Deny' } { value: '::/0'action: 'Deny' } ] } } }
Learn more about Azure Private Link.