Skip to content

Commit a0bb5d6

Browse files
authored
Documentation and metadata updates (Azure#2703)
1 parent 65710c3 commit a0bb5d6

9 files changed

+125
-101
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
reviewed: 2022-01-22
2+
reviewed: 2024-02-24
33
severity: Important
44
pillar: Security
5-
category: Authentication
5+
category: SE:05 Identity and access management
66
resource: Event Hub
77
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.EventHub.DisableLocalAuth/
88
---
@@ -11,20 +11,20 @@ online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.EventH
1111

1212
## SYNOPSIS
1313

14-
Authenticate Event Hub publishers and consumers with Azure AD identities.
14+
Authenticate Event Hub publishers and consumers with Entra ID identities.
1515

1616
## DESCRIPTION
1717

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.
1919
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.
2222

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.
2424

2525
## RECOMMENDATION
2626

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.
2828
Then disable authentication based on access keys or SAS tokens.
2929

3030
## EXAMPLES
@@ -39,22 +39,24 @@ For example:
3939

4040
```json
4141
{
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+
}
5860
}
5961
```
6062

@@ -67,7 +69,7 @@ To deploy Event Hub namespaces that pass this rule:
6769
For example:
6870

6971
```bicep
70-
resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
72+
resource ns 'Microsoft.EventHub/namespaces@2024-01-01' = {
7173
name: name
7274
location: location
7375
identity: {
@@ -78,6 +80,8 @@ resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
7880
}
7981
properties: {
8082
disableLocalAuth: true
83+
minimumTlsVersion: '1.2'
84+
publicNetworkAccess: 'Disabled'
8185
isAutoInflateEnabled: true
8286
maximumThroughputUnits: 10
8387
zoneRedundant: true
@@ -87,7 +91,7 @@ resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
8791

8892
## LINKS
8993

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)

docs/en/rules/Azure.EventHub.MinTLS.md

+27-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2+
reviewed: 2024-02-24
23
severity: Critical
34
pillar: Security
4-
category: Encryption
5+
category: SE:07 Encryption
56
resource: Event Hub
67
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.EventHub.MinTLS/
78
---
@@ -30,23 +31,29 @@ Configure the minimum supported TLS version to be 1.2.
3031

3132
To deploy Event Hub namespaces that pass this rule:
3233

33-
- Set the `properties.minimumlTlsVersion` property to `1.2`.
34+
- Set the `properties.minimumTlsVersion` property to `1.2`.
3435

3536
For example:
3637

3738
```json
3839
{
3940
"type": "Microsoft.EventHub/namespaces",
40-
"apiVersion": "2022-01-01-preview",
41-
"name": "[parameters('eventHubNamespaceName')]",
41+
"apiVersion": "2024-01-01",
42+
"name": "[parameters('name')]",
4243
"location": "[parameters('location')]",
44+
"identity": {
45+
"type": "SystemAssigned"
46+
},
4347
"sku": {
44-
"name": "[parameters('eventHubSku')]",
45-
"tier": "[parameters('eventHubSku')]",
46-
"capacity": 1,
48+
"name": "Standard"
4749
},
4850
"properties": {
51+
"disableLocalAuth": true,
4952
"minimumTlsVersion": "1.2",
53+
"publicNetworkAccess": "Disabled",
54+
"isAutoInflateEnabled": true,
55+
"maximumThroughputUnits": 10,
56+
"zoneRedundant": true
5057
}
5158
}
5259
```
@@ -55,28 +62,34 @@ For example:
5562

5663
To deploy Event Hub namespaces that pass this rule:
5764

58-
- Set the `properties.minimumlTlsVersion` property to `1.2`.
65+
- Set the `properties.minimumTlsVersion` property to `1.2`.
5966

6067
For example:
6168

6269
```bicep
63-
resource eventHubNamespace 'Microsoft.EventHub/namespaces@2022-01-01-preview' = {
64-
name: eventHubNamespaceName
70+
resource ns 'Microsoft.EventHub/namespaces@2024-01-01' = {
71+
name: name
6572
location: location
73+
identity: {
74+
type: 'SystemAssigned'
75+
}
6676
sku: {
67-
name: eventHubSku
68-
tier: eventHubSku
69-
capacity: 1
77+
name: 'Standard'
7078
}
7179
properties: {
80+
disableLocalAuth: true
7281
minimumTlsVersion: '1.2'
82+
publicNetworkAccess: 'Disabled'
83+
isAutoInflateEnabled: true
84+
maximumThroughputUnits: 10
85+
zoneRedundant: true
7386
}
7487
}
7588
```
7689

7790
## LINKS
7891

79-
- [Data encryption in Azure](https://learn.microsoft.com/azure/architecture/framework/security/design-storage-encryption#data-in-transit)
92+
- [SE:07 Encryption](https://learn.microsoft.com/azure/well-architected/security/encryption)
8093
- [Enforce a minimum required version of Transport Layer Security (TLS) for requests to an Event Hubs namespace](https://learn.microsoft.com/azure/event-hubs/transport-layer-security-enforce-minimum-version)
8194
- [Preparing for TLS 1.2 in Microsoft Azure](https://azure.microsoft.com/updates/azuretls12/)
8295
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.eventhub/namespaces)

docs/en/rules/Azure.NSG.AnyInboundSource.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2+
reviewed: 2024-02-24
23
severity: Critical
34
pillar: Security
4-
category: Application endpoints
5+
category: SE:06 Network controls
56
resource: Network Security Group
67
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.NSG.AnyInboundSource/
78
---
@@ -38,15 +39,15 @@ If inbound access from Internet-based sources is intended, consider using the se
3839

3940
To deploy Network Security Groups that pass this rule:
4041

41-
- Set the `sourceAddressPrefix` or `sourceAddressPrefixes` to a value other then `*` for inbound allow rules.
42+
- Set the `sourceAddressPrefix` or `sourceAddressPrefixes` property to a value other then `*` for inbound allow rules.
4243

4344
For example:
4445

4546
```json
4647
{
4748
"type": "Microsoft.Network/networkSecurityGroups",
48-
"apiVersion": "2022-01-01",
49-
"name": "[parameters('nsgName')]",
49+
"apiVersion": "2023-09-01",
50+
"name": "[parameters('name')]",
5051
"location": "[parameters('location')]",
5152
"properties": {
5253
"securityRules": [
@@ -120,8 +121,8 @@ For example:
120121
```json
121122
{
122123
"type": "Microsoft.Network/applicationSecurityGroups",
123-
"apiVersion": "2022-01-01",
124-
"name": "[parameters('asgName')]",
124+
"apiVersion": "2023-09-01",
125+
"name": "[parameters('name')]",
125126
"location": "[parameters('location')]",
126127
"properties": {}
127128
}
@@ -131,13 +132,13 @@ For example:
131132

132133
To deploy Network Security Groups that pass this rule:
133134

134-
- Set the `sourceAddressPrefix` or `sourceAddressPrefixes` to a value other then `*` for inbound allow rules.
135+
- Set the `sourceAddressPrefix` or `sourceAddressPrefixes` property to a value other then `*` for inbound allow rules.
135136

136137
For example:
137138

138139
```bicep
139-
resource nsg 'Microsoft.Network/networkSecurityGroups@2022-01-01' = {
140-
name: nsgName
140+
resource nsg 'Microsoft.Network/networkSecurityGroups@2023-09-01' = {
141+
name: name
141142
location: location
142143
properties: {
143144
securityRules: [
@@ -208,20 +209,20 @@ resource nsg 'Microsoft.Network/networkSecurityGroups@2022-01-01' = {
208209
To create an Application Security Group, use the `Microsoft.Network/applicationSecurityGroups` resource.
209210
For example:
210211

211-
```Bicep
212-
resource asg 'Microsoft.Network/applicationSecurityGroups@2022-01-01' = {
213-
name: asgName
214-
location:location
212+
```bicep
213+
resource asg 'Microsoft.Network/applicationSecurityGroups@2023-09-01' = {
214+
name: name
215+
location: location
215216
properties: {}
216217
}
217218
```
218219

219220
## LINKS
220221

221-
- [Best practices for endpoint security on Azure](https://learn.microsoft.com/azure/architecture/framework/security/design-network-endpoints)
222+
- [SE:06 Network controls](https://learn.microsoft.com/azure/well-architected/security/networking)
223+
- [Network Security Groups](https://learn.microsoft.com/azure/virtual-network/network-security-groups-overview)
222224
- [Service Tags Overview](https://learn.microsoft.com/azure/virtual-network/service-tags-overview)
223-
- [Network Security Groups](https://docs.microsoft.com/azure/virtual-network/security-overview)
224-
- [Logically segment subnets](https://docs.microsoft.com/azure/security/fundamentals/network-best-practices#logically-segment-subnets)
225-
- [What is Azure Application Gateway?](https://docs.microsoft.com/azure/application-gateway/overview)
226-
- [Azure DDoS Protection Standard overview](https://docs.microsoft.com/azure/virtual-network/ddos-protection-overview)
225+
- [Logically segment subnets](https://learn.microsoft.com/azure/security/fundamentals/network-best-practices#logically-segment-subnets)
226+
- [What is Azure Application Gateway?](https://learn.microsoft.com/azure/application-gateway/overview)
227+
- [What is Azure DDoS Protection?](https://learn.microsoft.com/azure/ddos-protection/ddos-protection-overview)
227228
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.network/networksecuritygroups/securityrules)

docs/examples-eventhub.bicep

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ param name string
99
@description('The location resources will be deployed.')
1010
param location string = resourceGroup().location
1111

12-
// An example Event Hub namespace
13-
resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
12+
// An example Event Hub namespace.
13+
resource ns 'Microsoft.EventHub/namespaces@2024-01-01' = {
1414
name: name
1515
location: location
1616
identity: {
@@ -21,6 +21,8 @@ resource ns 'Microsoft.EventHub/namespaces@2021-11-01' = {
2121
}
2222
properties: {
2323
disableLocalAuth: true
24+
minimumTlsVersion: '1.2'
25+
publicNetworkAccess: 'Disabled'
2426
isAutoInflateEnabled: true
2527
maximumThroughputUnits: 10
2628
zoneRedundant: true

docs/examples-eventhub.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.4.1124.51302",
8-
"templateHash": "8147439201000013969"
7+
"version": "0.25.53.49325",
8+
"templateHash": "955114084331896299"
99
}
1010
},
1111
"parameters": {
@@ -26,7 +26,7 @@
2626
"resources": [
2727
{
2828
"type": "Microsoft.EventHub/namespaces",
29-
"apiVersion": "2021-11-01",
29+
"apiVersion": "2024-01-01",
3030
"name": "[parameters('name')]",
3131
"location": "[parameters('location')]",
3232
"identity": {
@@ -37,6 +37,8 @@
3737
},
3838
"properties": {
3939
"disableLocalAuth": true,
40+
"minimumTlsVersion": "1.2",
41+
"publicNetworkAccess": "Disabled",
4042
"isAutoInflateEnabled": true,
4143
"maximumThroughputUnits": 10,
4244
"zoneRedundant": true

0 commit comments

Comments
 (0)