Skip to content

Commit 2693d6a

Browse files
authored
Merge pull request #227532 from spelluru/ehubuiupdates0215
Event Hubs security articles: steps & screenshots
2 parents 4b69b59 + 769a8be commit 2693d6a

File tree

8 files changed

+59
-48
lines changed

8 files changed

+59
-48
lines changed

articles/event-hubs/event-hubs-ip-filtering.md

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Event Hubs Firewall Rules | Microsoft Docs
33
description: Use Firewall Rules to allow connections from specific IP addresses to Azure Event Hubs.
44
ms.topic: article
5-
ms.date: 02/23/2022
5+
ms.date: 02/15/2023
66
---
77

88
# Allow access to Azure Event Hubs namespaces from specific IP addresses or ranges
@@ -11,12 +11,12 @@ By default, Event Hubs namespaces are accessible from internet as long as the re
1111
This feature is helpful in scenarios in which Azure Event Hubs should be only accessible from certain well-known sites. Firewall rules enable you to configure rules to accept traffic originating from specific IPv4 addresses. For example, if you use Event Hubs with [Azure Express Route][express-route], you can create a **firewall rule** to allow traffic from only your on-premises infrastructure IP addresses.
1212

1313
## IP firewall rules
14-
The IP firewall rules are applied at the Event Hubs namespace level. So, the rules apply to all connections from clients using any supported protocol. Any connection attempt from an IP address that doesn't match an allowed IP rule on the Event Hubs namespace is rejected as unauthorized. The response doesn't mention the IP rule. IP filter rules are applied in order, and the first rule that matches the IP address determines the accept or reject action.
14+
You specify IP firewall rules at the Event Hubs namespace level. So, the rules apply to all connections from clients using any supported protocol. Any connection attempt from an IP address that doesn't match an allowed IP rule on the Event Hubs namespace is rejected as unauthorized. The response doesn't mention the IP rule. IP filter rules are applied in order, and the first rule that matches the IP address determines the accept or reject action.
1515

1616

1717
## Important points
1818
- This feature isn't supported in the **basic** tier.
19-
- Turning on firewall rules for your Event Hubs namespace blocks incoming requests by default, unless requests originate from a service operating from allowed public IP addresses. Requests that are blocked include those from other Azure services, from the Azure portal, from logging and metrics services, and so on. As an exception, you can allow access to Event Hubs resources from certain **trusted services** even when the IP filtering is enabled. For a list of trusted services, see [Trusted Microsoft services](#trusted-microsoft-services).
19+
- Turning on firewall rules for your Event Hubs namespace blocks incoming requests by default, unless requests originate from a service operating from allowed public IP addresses. Requests that are blocked include the requests from other Azure services, from the Azure portal, from logging and metrics services, and so on. As an exception, you can allow access to Event Hubs resources from certain **trusted services** even when the IP filtering is enabled. For a list of trusted services, see [Trusted Microsoft services](#trusted-microsoft-services).
2020
- Specify **at least one IP firewall rule or virtual network rule** for the namespace to allow traffic only from the specified IP addresses or subnet of a virtual network. If there are no IP and virtual network rules, the namespace can be accessed over the public internet (using the access key).
2121

2222

@@ -25,20 +25,16 @@ This section shows you how to use the Azure portal to create IP firewall rules f
2525

2626
1. Navigate to your **Event Hubs namespace** in the [Azure portal](https://portal.azure.com).
2727
4. Select **Networking** under **Settings** on the left menu.
28-
1. On the **Networking** page, for **Public network access**, you can set one of the three following options. Choose **Selected networks** option to allow access from only specified IP addresses.
29-
- **Disabled**. This option disables any public access to the namespace. The namespace will be accessible only through [private endpoints](private-link-service.md).
30-
31-
:::image type="content" source="./media/event-hubs-firewall/public-access-disabled.png" alt-text="Networking page - public access tab - public network access is disabled.":::
28+
1. On the **Networking** page, for **Public network access**, choose **Selected networks** option to allow access from only specified IP addresses.
29+
30+
Here are more details about options available in the **Public network access** page:
31+
- **Disabled**. This option disables any public access to the namespace. The namespace is accessible only through [private endpoints](private-link-service.md).
3232
- **Selected networks**. This option enables public access to the namespace using an access key from selected networks.
3333

3434
> [!IMPORTANT]
35-
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
36-
37-
:::image type="content" source="./media/event-hubs-firewall/selected-networks.png" alt-text="Networking page with the selected networks option selected." lightbox="./media/event-hubs-firewall/selected-networks.png":::
35+
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
3836
- **All networks** (default). This option enables public access from all networks using an access key. If you select the **All networks** option, the event hub accepts connections from any IP address (using the access key). This setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
39-
40-
:::image type="content" source="./media/event-hubs-firewall/firewall-all-networks-selected.png" lightbox="./media/event-hubs-firewall/firewall-all-networks-selected.png" alt-text="Screenshot that shows the Public access page with the All networks option selected.":::
41-
1. To restrict access to **specific IP addresses**, follow these steps:
37+
1. To restrict access to **specific IP addresses**, select **Selected networks** option, and then follow these steps:
4238
1. In the **Firewall** section, select **Add your client IP address** option to give your current client IP the access to the namespace.
4339
3. For **address range**, enter a specific IPv4 address or a range of IPv4 address in CIDR notation.
4440

@@ -71,56 +67,79 @@ The following Resource Manager template enables adding an IP filter rule to an e
7167
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
7268
"contentVersion": "1.0.0.0",
7369
"parameters": {
74-
"eventhubNamespaceName": {
70+
"namespace_name": {
71+
"defaultValue": "contosoehub1333",
7572
"type": "String"
7673
}
7774
},
75+
"variables": {},
7876
"resources": [
7977
{
8078
"type": "Microsoft.EventHub/namespaces",
81-
"apiVersion": "2021-11-01",
82-
"name": "[parameters('eventhubNamespaceName')]",
79+
"apiVersion": "2022-01-01-preview",
80+
"name": "[parameters('namespace_name')]",
8381
"location": "East US",
8482
"sku": {
8583
"name": "Standard",
8684
"tier": "Standard",
8785
"capacity": 1
8886
},
8987
"properties": {
88+
"minimumTlsVersion": "1.2",
89+
"publicNetworkAccess": "Enabled",
9090
"disableLocalAuth": false,
9191
"zoneRedundant": true,
9292
"isAutoInflateEnabled": false,
9393
"maximumThroughputUnits": 0,
9494
"kafkaEnabled": true
9595
}
9696
},
97+
{
98+
"type": "Microsoft.EventHub/namespaces/authorizationrules",
99+
"apiVersion": "2022-01-01-preview",
100+
"name": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]",
101+
"location": "eastus",
102+
"dependsOn": [
103+
"[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]"
104+
],
105+
"properties": {
106+
"rights": [
107+
"Listen",
108+
"Manage",
109+
"Send"
110+
]
111+
}
112+
},
97113
{
98114
"type": "Microsoft.EventHub/namespaces/networkRuleSets",
99-
"apiVersion": "2021-11-01",
100-
"name": "[concat(parameters('eventhubNamespaceName'), '/default')]",
115+
"apiVersion": "2022-01-01-preview",
116+
"name": "[concat(parameters('namespace_name'), '/default')]",
101117
"location": "East US",
102118
"dependsOn": [
103-
"[resourceId('Microsoft.EventHub/namespaces', parameters('eventhubNamespaceName'))]"
119+
"[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]"
104120
],
105121
"properties": {
106122
"publicNetworkAccess": "Enabled",
107123
"defaultAction": "Deny",
108124
"virtualNetworkRules": [],
109125
"ipRules": [
110126
{
111-
"ipMask":"10.1.1.1",
112-
"action":"Allow"
127+
"ipMask": "10.1.1.1",
128+
"action": "Allow"
113129
},
114130
{
115-
"ipMask":"11.0.0.0/24",
116-
"action":"Allow"
117-
}
131+
"ipMask": "11.0.0.0/24",
132+
"action": "Allow"
133+
},
134+
{
135+
"ipMask": "172.72.157.204",
136+
"action": "Allow"
137+
}
118138
]
119139
}
120140
}
121141
]
122142
}
123-
124143
```
125144

126145
To deploy the template, follow the instructions for [Azure Resource Manager][lnk-deploy].
@@ -145,7 +164,7 @@ For more information about these properties, see [Create or Update Network Rule
145164
146165
### Azure portal
147166

148-
Azure portal always uses the latest API version to get and set properties. If you had previously configured your namespace using **2021-01-01-preview and earlier** with `defaultAction` set to `Deny`, and specified zero IP filters and VNet rules, the portal would have previously checked **Selected Networks** on the **Networking** page of your namespace. Now, it checks the **All networks** option.
167+
Azure portal always uses the latest API version to get and set properties. If you had configured your namespace using **2021-01-01-preview and earlier** with `defaultAction` set to `Deny`, and specified zero IP filters and VNet rules, the portal would have previously checked **Selected Networks** on the **Networking** page of your namespace. Now, it checks the **All networks** option.
149168

150169
:::image type="content" source="./media/event-hubs-firewall/firewall-all-networks-selected.png" lightbox="./media/event-hubs-firewall/firewall-all-networks-selected.png" alt-text="Screenshot that shows the Public access page with the All networks option selected.":::
151170

articles/event-hubs/event-hubs-service-endpoints.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Virtual Network service endpoints - Azure Event Hubs | Microsoft Docs
33
description: This article provides information on how to add a Microsoft.EventHub service endpoint to a virtual network.
44
ms.topic: article
5-
ms.date: 02/23/2021
5+
ms.date: 02/15/2023
66
---
77

88
# Allow access to Azure Event Hubs namespaces from specific virtual networks
@@ -40,18 +40,14 @@ This section shows you how to use Azure portal to add a virtual network service
4040
1. Navigate to your **Event Hubs namespace** in the [Azure portal](https://portal.azure.com).
4141
4. Select **Networking** under **Settings** on the left menu.
4242
1. On the **Networking** page, for **Public network access**, you can set one of the three following options. Choose **Selected networks** option to allow access only from specific virtual networks.
43+
44+
Here are more details about options available in the **Public network access** page:
4345
- **Disabled**. This option disables any public access to the namespace. The namespace will be accessible only through [private endpoints](private-link-service.md).
44-
45-
:::image type="content" source="./media/event-hubs-firewall/public-access-disabled.png" alt-text="Networking page - public access tab - public network access is disabled.":::
4646
- **Selected networks**. This option enables public access to the namespace using an access key from selected networks.
4747

4848
> [!IMPORTANT]
49-
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
50-
51-
:::image type="content" source="./media/event-hubs-firewall/selected-networks.png" alt-text="Networking page with the selected networks option selected." lightbox="./media/event-hubs-firewall/selected-networks.png":::
49+
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
5250
- **All networks** (default). This option enables public access from all networks using an access key. If you select the **All networks** option, the event hub accepts connections from any IP address (using the access key). This setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
53-
54-
:::image type="content" source="./media/event-hubs-firewall/firewall-all-networks-selected.png" lightbox="./media/event-hubs-firewall/firewall-all-networks-selected.png" alt-text="Screenshot that shows the Public access page with the All networks option selected.":::
5551
1. To restrict access to specific networks, choose the **Selected Networks** option at the top of the page if it isn't already selected.
5652
2. In the **Virtual networks** section of the page, select **+Add existing virtual network***. Select **+ Create new virtual network** if you want to create a new VNet.
5753

-8.14 KB
Loading
-2.06 KB
Loading
1.21 KB
Loading
-32.2 KB
Loading
-52 KB
Loading

articles/event-hubs/private-link-service.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Integrate Azure Event Hubs with Azure Private Link Service
33
description: Learn how to integrate Azure Event Hubs with Azure Private Link Service
4-
ms.date: 08/26/2022
4+
ms.date: 02/15/2023
55
ms.topic: article
66
ms.custom: devx-track-azurepowershell
77
---
@@ -22,7 +22,7 @@ For more information, see [What is Azure Private Link?](../private-link/private-
2222

2323
### Prerequisites
2424

25-
To integrate an Event Hubs namespace with Azure Private Link, you'll need the following entities or permissions:
25+
To integrate an Event Hubs namespace with Azure Private Link, you need the following entities or permissions:
2626

2727
- An Event Hubs namespace.
2828
- An Azure virtual network.
@@ -40,18 +40,14 @@ If you already have an Event Hubs namespace, you can create a private link conne
4040
2. In the search bar, type in **event hubs**.
4141
3. Select the **namespace** from the list to which you want to add a private endpoint.
4242
1. On the **Networking** page, for **Public network access**, you can set one of the three following options. Select **Disabled** if you want the namespace to be accessed only via private endpoints.
43-
- **Disabled**. This option disables any public access to the namespace. The namespace will be accessible only through [private endpoints](private-link-service.md).
44-
45-
:::image type="content" source="./media/event-hubs-firewall/public-access-disabled.png" alt-text="Networking page - public access tab - public network access is disabled.":::
43+
44+
Here are more details about options available in the **Public network access** page:
45+
- **Disabled**. This option disables any public access to the namespace. The namespace is accessible only through [private endpoints](private-link-service.md).
4646
- **Selected networks**. This option enables public access to the namespace using an access key from selected networks.
4747

4848
> [!IMPORTANT]
49-
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
50-
51-
:::image type="content" source="./media/event-hubs-firewall/selected-networks.png" alt-text="Networking page with the selected networks option selected." lightbox="./media/event-hubs-firewall/selected-networks.png":::
49+
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
5250
- **All networks** (default). This option enables public access from all networks using an access key. If you select the **All networks** option, the event hub accepts connections from any IP address (using the access key). This setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
53-
54-
:::image type="content" source="./media/event-hubs-firewall/firewall-all-networks-selected.png" lightbox="./media/event-hubs-firewall/firewall-all-networks-selected.png" alt-text="Screenshot that shows the Public access page with the All networks option selected.":::
5551
1. Switch to the **Private endpoint connections** tab.
5652
1. Select the **+ Private Endpoint** button at the top of the page.
5753

@@ -61,7 +57,7 @@ If you already have an Event Hubs namespace, you can create a private link conne
6157
2. Select the **resource group** for the private endpoint resource.
6258
3. Enter a **name** for the private endpoint.
6359
1. Enter a **name for the network interface**.
64-
1. Select a **region** for the private endpoint. Your private endpoint must be in the same region as your virtual network, but can be in a different region from the private link resource that you are connecting to.
60+
1. Select a **region** for the private endpoint. Your private endpoint must be in the same region as your virtual network, but can be in a different region from the private link resource that you're connecting to.
6561
1. Select **Next: Resource >** button at the bottom of the page.
6662

6763
:::image type="content" source="./media/private-link-service/create-private-endpoint-basics-page.png" alt-text="Screenshot showing the Basics page of the Create private endpoint wizard.":::
@@ -201,7 +197,7 @@ There are four provisioning states:
201197
5. Go to the appropriate section below based on the operation you want to: approve, reject, or remove.
202198

203199
### Approve a private endpoint connection
204-
1. If there are any connections that are pending, you'll see a connection listed with **Pending** in the provisioning state.
200+
1. If there are any connections that are pending, you see a connection listed with **Pending** in the provisioning state.
205201
2. Select the **private endpoint** you wish to approve
206202
3. Select the **Approve** button.
207203

@@ -211,7 +207,7 @@ There are four provisioning states:
211207

212208
### Reject a private endpoint connection
213209

214-
1. If there are any private endpoint connections you want to reject, whether it's a pending request or existing connection, select the connection and click the **Reject** button.
210+
1. If there are any private endpoint connections you want to reject, whether it's a pending request or existing connection, select the connection and select the **Reject** button.
215211

216212
![Reject private endpoint](./media/private-link-service/private-endpoint-reject-button.png)
217213
2. On the **Reject connection** page, enter a comment (optional), and select **Yes**. If you select **No**, nothing happens.
@@ -221,7 +217,7 @@ There are four provisioning states:
221217

222218
1. To remove a private endpoint connection, select it in the list, and select **Remove** on the toolbar.
223219
2. On the **Delete connection** page, select **Yes** to confirm the deletion of the private endpoint. If you select **No**, nothing happens.
224-
3. You should see the status changed to **Disconnected**. Then, the endpoint will disappear from the list.
220+
3. You should see the status changed to **Disconnected**. Then, the endpoint disappears from the list.
225221

226222
## Validate that the private link connection works
227223

0 commit comments

Comments
 (0)