1
1
---
2
- reviewed : 2022-01-22
2
+ reviewed : 2024-02-24
3
3
severity : Important
4
4
pillar : Security
5
- category : Authentication
5
+ category : SE:05 Identity and access management
6
6
resource : Event Hub
7
7
online version : https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.EventHub.DisableLocalAuth/
8
8
---
@@ -11,20 +11,20 @@ online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.EventH
11
11
12
12
## SYNOPSIS
13
13
14
- Authenticate Event Hub publishers and consumers with Azure AD identities.
14
+ Authenticate Event Hub publishers and consumers with Entra ID identities.
15
15
16
16
## DESCRIPTION
17
17
18
- To publish or consume events from Event Hubs cryptographic keys, or Azure AD identities can be used.
18
+ To publish or consume events from Event Hubs cryptographic keys, or Entra ID (previously Azure AD) identities can be used.
19
19
Cryptographic keys include Shared Access Policy keys or Shared Access Signature (SAS) tokens.
20
- With Azure AD authentication, the identity is validated against Azure AD.
21
- Using Azure AD identities centralizes identity management and auditing.
20
+ With Entra ID authentication, the identity is validated against Azure AD.
21
+ Using Entra ID identities centralizes identity management and auditing.
22
22
23
- Once you decide to use Azure AD authentication, you can disable authentication using keys or SAS tokens.
23
+ Once you decide to use Entra ID authentication, you can disable authentication using keys or SAS tokens.
24
24
25
25
## RECOMMENDATION
26
26
27
- Consider only using Azure AD identities to publish or consume events from Event Hub.
27
+ Consider only using Entra ID identities to publish or consume events from Event Hub.
28
28
Then disable authentication based on access keys or SAS tokens.
29
29
30
30
## EXAMPLES
@@ -39,22 +39,24 @@ For example:
39
39
40
40
``` json
41
41
{
42
- "type" : " Microsoft.EventHub/namespaces" ,
43
- "apiVersion" : " 2021-11-01" ,
44
- "name" : " [parameters('name')]" ,
45
- "location" : " [parameters('location')]" ,
46
- "identity" : {
47
- "type" : " SystemAssigned"
48
- },
49
- "sku" : {
50
- "name" : " Standard"
51
- },
52
- "properties" : {
53
- "disableLocalAuth" : true ,
54
- "isAutoInflateEnabled" : true ,
55
- "maximumThroughputUnits" : 10 ,
56
- "zoneRedundant" : true
57
- }
42
+ "type" : " Microsoft.EventHub/namespaces" ,
43
+ "apiVersion" : " 2024-01-01" ,
44
+ "name" : " [parameters('name')]" ,
45
+ "location" : " [parameters('location')]" ,
46
+ "identity" : {
47
+ "type" : " SystemAssigned"
48
+ },
49
+ "sku" : {
50
+ "name" : " Standard"
51
+ },
52
+ "properties" : {
53
+ "disableLocalAuth" : true ,
54
+ "minimumTlsVersion" : " 1.2" ,
55
+ "publicNetworkAccess" : " Disabled" ,
56
+ "isAutoInflateEnabled" : true ,
57
+ "maximumThroughputUnits" : 10 ,
58
+ "zoneRedundant" : true
59
+ }
58
60
}
59
61
```
60
62
@@ -67,7 +69,7 @@ To deploy Event Hub namespaces that pass this rule:
67
69
For example:
68
70
69
71
``` bicep
70
- resource ns 'Microsoft.EventHub/namespaces@2021-11 -01' = {
72
+ resource ns 'Microsoft.EventHub/namespaces@2024-01 -01' = {
71
73
name: name
72
74
location: location
73
75
identity: {
@@ -78,6 +80,8 @@ resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
78
80
}
79
81
properties: {
80
82
disableLocalAuth: true
83
+ minimumTlsVersion: '1.2'
84
+ publicNetworkAccess: 'Disabled'
81
85
isAutoInflateEnabled: true
82
86
maximumThroughputUnits: 10
83
87
zoneRedundant: true
@@ -87,7 +91,7 @@ resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
87
91
88
92
## LINKS
89
93
90
- - [ Use identity-based authentication ] ( https://learn.microsoft.com/azure/well-architected/security/design- identity-authentication #use-identity-based-authentication )
91
- - [ Authorize access to Event Hubs resources using Azure Active Directory ] ( https://docs .microsoft.com/azure/event-hubs/authorize-access-azure-active-directory )
92
- - [ Disabling Local/SAS Key authentication] ( https://docs .microsoft.com/azure/event-hubs/authenticate-shared-access-signature#disabling-localsas-key-authentication )
93
- - [ Azure deployment reference] ( https://docs .microsoft.com/azure/templates/microsoft.eventhub/namespaces )
94
+ - [ SE:05 Identity and access management ] ( https://learn.microsoft.com/azure/well-architected/security/identity-access #use-identity-based-authentication )
95
+ - [ Authorize access to Event Hubs resources using Microsoft Entra ID ] ( https://learn .microsoft.com/azure/event-hubs/authorize-access-azure-active-directory )
96
+ - [ Disabling Local/SAS Key authentication] ( https://learn .microsoft.com/azure/event-hubs/authenticate-shared-access-signature#disabling-localsas-key-authentication )
97
+ - [ Azure deployment reference] ( https://learn .microsoft.com/azure/templates/microsoft.eventhub/namespaces )
0 commit comments