Manage network access control

Azure Web PubSub 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 Azure Web PubSub instance.

You can configure Azure Web PubSub 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 that request data over the specified set of networks can access your Web PubSub resource.

Screenshot showing network access control decision flow chart.

Public network access

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.
  1. Go to the Azure Web PubSub instance you want to secure.
  2. Select Networking from the left side menu. Select Public access tab:

Screenshot showing how to configure public network access.

  1. Select Disabled or Enabled.

  2. Select Save to apply your changes.

Default action

The default action is applied when no other rule matches.

  1. Go to the Azure Web PubSub instance you want to secure.
  2. Select Network access control from the left side menu.

Screenshot showing default action on portal.

  1. To edit the default action, toggle the Allow/Deny button.
  2. Select Save to apply your changes.

Request type rules

You can configure rules to allow or deny specified request types for both the public network and each private endpoint.

For example, REST API calls are typically high-privileged. To enhance security, you may want to restrict their origin. You can configure rules to block all REST API calls from public network, and only allow they originate from a specific virtual network.

If no rule matches, the default action is applied.

  1. Go to the Azure Web PubSub instance you want to secure.
  2. Select Network access control from the left side menu.

Screenshot showing request type rules on portal.

  1. To edit public network rule, select allowed types of requests under Public network.

Screenshot of selecting allowed request types for public network on portal.

  1. To edit private endpoint network rules, select allowed types of requests in each row under Private endpoint connections.

Screenshot of selecting allowed request types for private endpoints on portal.

  1. Select Save to apply your changes.

IP rules

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.
  1. Go to the Azure Web PubSub instance you want to secure.

  2. Select Networking from the left side menu. Select Access control rules tab:

    Screenshot showing how to configure IP rules.

  3. Edit the list under IP rules section.

  4. Select Save to apply your changes.

Next steps

Learn more about Azure Private Link.