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
# Access to the namespace endpoints should be restricted to only allowed sources
10
+
11
+
## SYNOPSIS
12
+
13
+
Access to the namespace endpoints should be restricted to only allowed sources.
14
+
15
+
## DESCRIPTION
16
+
17
+
By default, Event Hub namespaces are accessible from public internet.
18
+
19
+
With the firewall feature, it is possible to either fully disabling public network access by ensuring that the namespace endpoints isn't exposed on the public internet or configure rules to only accept traffic from specific addresses.
20
+
21
+
## RECOMMENDATION
22
+
23
+
Consider restricting network access to the Event Hub namespace by requiring private endpoints or by limiting access to permitted client addresses with the service firewall.
24
+
25
+
## EXAMPLES
26
+
27
+
### Configure with Azure template
28
+
29
+
To deploy Event Hub namespaces that pass this rule:
30
+
31
+
- Set the `properties.publicNetworkAccess` property to `Disabled` to require private endpoints. OR
32
+
- Alternatively, you can configure the `Microsoft.EventHub/namespaces/networkRuleSets` sub-resource by:
33
+
- Setting the `properties.publicNetworkAccess` property to `Disabled` to require private endpoints. OR
34
+
- Setting the `properties.defaultAction` property to `Deny` to restrict network access to the service by default.
35
+
36
+
For example:
37
+
38
+
```json
39
+
{
40
+
"type": "Microsoft.EventHub/namespaces",
41
+
"apiVersion": "2024-01-01",
42
+
"name": "[parameters('name')]",
43
+
"location": "[parameters('location')]",
44
+
"identity": {
45
+
"type": "SystemAssigned"
46
+
},
47
+
"sku": {
48
+
"name": "Standard"
49
+
},
50
+
"properties": {
51
+
"disableLocalAuth": true,
52
+
"minimumTlsVersion": "1.2",
53
+
"publicNetworkAccess": "Disabled",
54
+
"zoneRedundant": true
55
+
}
56
+
}
57
+
```
58
+
59
+
### Configure with Bicep
60
+
61
+
To deploy Event Hub namespaces that pass this rule:
62
+
63
+
- Set the `properties.publicNetworkAccess` property to `Disabled` to require private endpoints. OR
64
+
- Alternatively, you can configure the `Microsoft.EventHub/namespaces/networkRuleSets` sub-resource by:
65
+
- Setting the `properties.publicNetworkAccess` property to `Disabled` to require private endpoints. OR
66
+
- Setting the `properties.defaultAction` property to `Deny` to restrict network access to the service by default.
If there are no IP and virtual network rules, all the traffic flows into the namespace even if you set the defaultAction to `deny` on the firewall. The namespace can be accessed over the public internet. Specify at least one IP rule or virtual network rule for the namespace to activate the default action on the firewall.
92
+
93
+
The firewall feature isn't supported in the `basic` tier.
-[NS-2: Secure cloud services with network controls](https://learn.microsoft.com/security/benchmark/azure/baselines/event-hubs-security-baseline#ns-1-establish-network-segmentation-boundaries)
101
+
-[Allow access to Azure Event Hub namespaces from specific IP addresses or ranges](https://learn.microsoft.com/azure/event-hubs/event-hubs-ip-filtering)
102
+
-[Allow access to Azure Event Hub namespaces from specific virtual networks](https://learn.microsoft.com/azure/event-hubs/event-hubs-service-endpoints)
103
+
-[Allow access to Azure Event Hub namespaces via private endpoints](https://learn.microsoft.com/azure/event-hubs/private-link-service)
0 commit comments