Skip to content

Commit 1078621

Browse files
authored
Documentation improvements Azure#2570 (Azure#2748)
* Documentation improvements Azure#2570 * Fix
1 parent c03e3db commit 1078621

10 files changed

+131
-74
lines changed

data/policy-ignore.json

+8
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,13 @@
209209
],
210210
"reason": "NotApplicable",
211211
"value": "Checking for BYOK of a storage account used for logging activity is not enforcable by code (#2725)."
212+
},
213+
{
214+
"policyDefinitionIds": [
215+
"/providers/Microsoft.Authorization/policyDefinitions/cfb11c26-f069-4c14-8e36-56c394dae5af",
216+
"/providers/Microsoft.Authorization/policyDefinitions/910711a6-8aa2-4f15-ae62-1e5b2ed3ef9e"
217+
],
218+
"reason": "Duplicate",
219+
"value": "Azure.ServiceBus.DisableLocalAuth"
212220
}
213221
]

docs/CHANGELOG-v1.md

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers
3232

3333
## Unreleased
3434

35+
What's changed since v1.34.2:
36+
37+
- General improvements:
38+
- Documentation improvements by @BernieWhite.
39+
[#2570](https://github.com/Azure/PSRule.Rules.Azure/issues/2570)
40+
3541
## v1.34.2
3642

3743
What's changed since v1.34.1:

docs/en/rules/Azure.SQL.AAD.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
---
2-
reviewed: 2023-07-26
2+
reviewed: 2024-03-11
33
severity: Critical
44
pillar: Security
5-
category: Authentication
5+
category: SE:05 Identity and access management
66
resource: SQL Database
77
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.SQL.AAD/
88
---
99

10-
# Use AAD authentication with SQL databases
10+
# Use Entra ID authentication with SQL databases
1111

1212
## SYNOPSIS
1313

14-
Use Azure Active Directory (AAD) authentication with Azure SQL databases.
14+
Use Entra ID authentication with Azure SQL databases.
1515

1616
## DESCRIPTION
1717

18-
Azure SQL Database offer two authentication models, Azure Active Directory (AAD) and SQL authentication.
19-
AAD authentication supports centralized identity management in addition to modern password protections.
20-
Some of the benefits of AAD authentication over SQL authentication including:
18+
Azure SQL Database offer two authentication models, Entra ID (previously known as Azure AD) and SQL authentication.
19+
Entra ID authentication supports centralized identity management in addition to modern password protections.
20+
Some of the benefits of Entra ID authentication over SQL authentication including:
2121

2222
- Support for Azure Multi-Factor Authentication (MFA).
2323
- Conditional-based access with Conditional Access.
2424

25-
It is also possible to disable SQL authentication entirely and only use AAD authentication.
25+
It is also possible to disable SQL authentication entirely and only use Entra ID authentication.
2626

2727
## RECOMMENDATION
2828

29-
Consider using Azure Active Directory (AAD) authentication with SQL databases.
29+
Consider using Entra ID authentication with SQL databases.
3030
Additionally, consider disabling SQL authentication.
3131

3232
## EXAMPLES
@@ -155,17 +155,18 @@ Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName '<resource_group>
155155
## NOTES
156156

157157
In newer API versions the `properties.administrators` property can be configured.
158-
Azure AD authentication can also be configured using the `Microsoft.Sql/servers/administrators` sub-resource.
158+
Entra ID authentication can also be configured using the `Microsoft.Sql/servers/administrators` sub-resource.
159159

160160
If both the `properties.administrators` property and `Microsoft.Sql/servers/administrators` are set,
161161
the sub-resource will override the property.
162162

163163
## LINKS
164164

165-
- [Use modern password protection](https://learn.microsoft.com/azure/architecture/framework/security/design-identity-authentication#use-modern-password-protection)
166-
- [Configure and manage Azure AD authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-aad-configure)
167-
- [Using multi-factor Azure Active Directory authentication](https://learn.microsoft.com/azure/azure-sql/database/authentication-mfa-ssms-overview)
165+
- [SE:05 Identity and access management](https://learn.microsoft.com/azure/well-architected/security/identity-access)
166+
- [IM-1: Use centralized identity and authentication system](https://learn.microsoft.com/security/benchmark/azure/baselines/azure-sql-security-baseline#im-1-use-centralized-identity-and-authentication-system)
167+
- [Configure and manage Microsoft Entra authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-aad-configure)
168+
- [Using Microsoft Entra multi-factor authentication](https://learn.microsoft.com/azure/azure-sql/database/authentication-mfa-ssms-overview)
168169
- [Conditional Access with Azure SQL Database and Azure Synapse Analytics](https://learn.microsoft.com/azure/azure-sql/database/conditional-access-configure)
169-
- [Azure AD-only authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-azure-ad-only-authentication)
170-
- [Azure Policy for Azure Active Directory only authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-azure-ad-only-authentication-policy)
170+
- [Microsoft Entra-only authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-azure-ad-only-authentication)
171+
- [Azure Policy for Microsoft Entra-only authentication with Azure SQL](https://learn.microsoft.com/azure/azure-sql/database/authentication-azure-ad-only-authentication-policy)
171172
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.sql/servers)
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
reviewed: 2022/01/22
2+
reviewed: 2024-03-11
33
severity: Important
44
pillar: Security
5-
category: Authentication
5+
category: SE:05 Identity and access management
66
resource: Service Bus
77
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.ServiceBus.DisableLocalAuth/
88
---
@@ -11,60 +11,61 @@ online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.Servic
1111

1212
## SYNOPSIS
1313

14-
Authenticate Service Bus publishers and consumers with Azure AD identities.
14+
Authenticate Service Bus publishers and consumers with Entra ID identities.
1515

1616
## DESCRIPTION
1717

18-
To publish or consume messages from Service Bus cryptographic keys, or Azure AD identities can be used.
18+
To publish or consume messages from Service Bus cryptographic keys, or Entra ID 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 Entra ID.
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 messages from Service Bus.
27+
Consider only using Entra ID identities to publish or consume messages from Service Bus.
2828
Then disable authentication based on access keys or SAS tokens.
2929

3030
## EXAMPLES
3131

3232
### Configure with Azure template
3333

34-
To deploy Service Bus namespaces that pass this rule:
34+
To deploy namespaces that pass this rule:
3535

3636
- Set the `properties.disableLocalAuth` property to `true`.
3737

3838
For example:
3939

4040
```json
4141
{
42-
"type": "Microsoft.ServiceBus/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-
}
42+
"type": "Microsoft.ServiceBus/namespaces",
43+
"apiVersion": "2022-10-01-preview",
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+
}
5556
}
5657
```
5758

5859
### Configure with Bicep
5960

60-
To deploy Service Bus namespaces that pass this rule:
61+
To deploy namespaces that pass this rule:
6162

6263
- Set the `properties.disableLocalAuth` property to `true`.
6364

6465
For example:
6566

6667
```bicep
67-
resource ns 'Microsoft.ServiceBus/namespaces@2021-11-01' = {
68+
resource ns 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
6869
name: name
6970
location: location
7071
identity: {
@@ -75,12 +76,23 @@ resource ns 'Microsoft.ServiceBus/namespaces@2021-11-01' = {
7576
}
7677
properties: {
7778
disableLocalAuth: true
79+
minimumTlsVersion: '1.2'
7880
}
7981
}
8082
```
8183

84+
### Configure with Azure Policy
85+
86+
To address this issue at runtime use the following policies:
87+
88+
- [Azure Service Bus namespaces should have local authentication methods disabled](https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Service%20Bus/ServiceBus_DisableLocalAuth_AuditDeny.json)
89+
`/providers/Microsoft.Authorization/policyDefinitions/cfb11c26-f069-4c14-8e36-56c394dae5af`
90+
- [Configure Azure Service Bus namespaces to disable local authentication](https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Service%20Bus/ServiceBus_DisableLocalAuth_Modify.json)
91+
`/providers/Microsoft.Authorization/policyDefinitions/910711a6-8aa2-4f15-ae62-1e5b2ed3ef9e`
92+
8293
## LINKS
8394

84-
- [Use identity-based authentication](https://learn.microsoft.com/azure/well-architected/security/design-identity-authentication#use-identity-based-authentication)
85-
- [Service Bus authentication and authorization](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-authentication-and-authorization)
86-
- [Azure deployment reference](https://docs.microsoft.com/azure/templates/microsoft.servicebus/namespaces)
95+
- [SE:05 Identity and access management](https://learn.microsoft.com/azure/well-architected/security/identity-access)
96+
- [IM-1: Use centralized identity and authentication system](https://learn.microsoft.com/security/benchmark/azure/baselines/service-bus-security-baseline#im-1-use-centralized-identity-and-authentication-system)
97+
- [Service Bus authentication and authorization](https://learn.microsoft.com/azure/service-bus-messaging/service-bus-authentication-and-authorization)
98+
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.servicebus/namespaces)
+34-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2+
reviewed: 2024-03-11
23
severity: Important
34
pillar: Security
4-
category: Information protection
5+
category: SE:07 Encryption
56
resource: Service Bus
67
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.ServiceBus.MinTLS/
78
---
@@ -10,34 +11,39 @@ online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.Servic
1011

1112
## SYNOPSIS
1213

13-
Enforce namespaces to require that clients send and receive data with TLS 1.2 version.
14+
Service Bus namespaces should reject TLS versions older than 1.2.
1415

1516
## DESCRIPTION
1617

17-
Communication between a client application and an Azure Service Bus namespace is encrypted using Transport Layer Security (TLS).
18+
Clients connect to Azure Service Bus to send and receive messages over a Transport Layer Security (TLS) encrypted connection.
19+
The minimum version of TLS that Service Bus accepts is configurable.
20+
Older TLS versions are no longer considered secure by industry standards, such as PCI DSS.
21+
Additionally, support for TLS 1.0 and 1.1 are on a deprecation path across Azure services.
1822

19-
Azure Service Bus namespaces permit clients to send and receive data with TLS 1.0 and above. To enforce stricter security measures, you can configure your Service Bus namespace to require that clients send and receive data with a newer version of TLS. If a Service Bus namespace requires a minimum version of TLS, then any requests made with an older version will fail.
23+
Azure lets you disable outdated protocols and require connections to use a minimum of TLS 1.2.
24+
By default, TLS 1.0, TLS 1.1, and TLS 1.2 are accepted.
2025

21-
**Important** If you are using a service that connects to Azure Service Bus, make sure that that service is using the appropriate version of TLS to send requests to Azure Service Bus before you set the required minimum version for a Service Bus namespace.
26+
When clients connect using an older version of TLS that is disabled, the connection will fail.
2227

2328
## RECOMMENDATION
2429

25-
Consider namespaces to require that clients send and receive data with TLS 1.2 version.
30+
Consider configuring the minimum supported TLS version for Service Bus clients to be 1.2.
31+
Support for TLS 1.0/ 1.1 version will be removed.
2632

2733
## EXAMPLES
2834

2935
### Configure with Azure template
3036

31-
To deploy Service Bus namespaces that pass this rule:
37+
To deploy namespaces that pass this rule:
3238

33-
- Set `properties.minimumTlsVersion` to `1.2`.
39+
- Set the `properties.minimumTlsVersion` property to `1.2`.
3440

3541
For example:
3642

3743
```json
3844
{
3945
"type": "Microsoft.ServiceBus/namespaces",
40-
"apiVersion": "2022-01-01-preview",
46+
"apiVersion": "2022-10-01-preview",
4147
"name": "[parameters('name')]",
4248
"location": "[parameters('location')]",
4349
"identity": {
@@ -55,20 +61,14 @@ For example:
5561

5662
### Configure with Bicep
5763

58-
To deploy Service Bus namespaces that pass this rule:
64+
To deploy namespaces that pass this rule:
5965

60-
- Set `properties.minimumTlsVersion` to `1.2`.
66+
- Set the `properties.minimumTlsVersion` property to `1.2`.
6167

6268
For example:
6369

6470
```bicep
65-
@description('The name of the resource.')
66-
param name string
67-
68-
@description('The location resources will be deployed.')
69-
param location string = resourceGroup().location
70-
71-
resource ns 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' = {
71+
resource ns 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
7272
name: name
7373
location: location
7474
identity: {
@@ -84,8 +84,23 @@ resource ns 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' = {
8484
}
8585
```
8686

87+
### Configure with Azure CLI
88+
89+
```bash
90+
az servicebus namespace update -n '<name>' -g '<resource_group>' --minimum-tls-version '1.2'
91+
```
92+
93+
### Configure with Azure PowerShell
94+
95+
```powershell
96+
$ns = Get-AzServiceBusNamespace -Name '<name>' -ResourceGroupName '<resource_group>'
97+
Set-AzServiceBusNamespace -InputObject $ns -MinimumTlsVersion '1.2'
98+
```
99+
87100
## LINKS
88101

89-
- [Information protection and storage](https://learn.microsoft.com/azure/architecture/framework/security/storage-data-encryption)
102+
- [SE:07 Encryption](https://learn.microsoft.com/azure/well-architected/security/encryption#data-in-transit)
103+
- [DP-3: Encrypt sensitive data in transit](https://learn.microsoft.com/security/benchmark/azure/baselines/service-bus-security-baseline#dp-3-encrypt-sensitive-data-in-transit)
90104
- [Enforce a minimum requires version of TLS](https://learn.microsoft.com/azure/service-bus-messaging/transport-layer-security-enforce-minimum-version)
105+
- [Preparing for TLS 1.2 in Microsoft Azure](https://azure.microsoft.com/updates/azuretls12/)
91106
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.servicebus/namespaces)

docs/examples-servicebus.bicep

+2-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 Service Bus namespace
13-
resource ns 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' = {
12+
// An example Service Bus namespace.
13+
resource ns 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
1414
name: name
1515
location: location
1616
identity: {

docs/examples-servicebus.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.11.1.770",
8-
"templateHash": "17235301402195616974"
7+
"version": "0.25.53.49325",
8+
"templateHash": "11141900091582778494"
99
}
1010
},
1111
"parameters": {
@@ -26,7 +26,7 @@
2626
"resources": [
2727
{
2828
"type": "Microsoft.ServiceBus/namespaces",
29-
"apiVersion": "2022-01-01-preview",
29+
"apiVersion": "2022-10-01-preview",
3030
"name": "[parameters('name')]",
3131
"location": "[parameters('location')]",
3232
"identity": {

src/PSRule.Rules.Azure/rules/Azure.ServiceBus.Rule.ps1

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ Rule 'Azure.ServiceBus.Usage' -Ref 'AZR-000177' -Type 'Microsoft.ServiceBus/name
1313
$Assert.GreaterOrEqual($items, '.', 1);
1414
}
1515

16-
# Synopsis: Enforce namespaces to require that clients send and receive data with TLS 1.2 version.
17-
Rule 'Azure.ServiceBus.MinTLS' -Ref 'AZR-000315' -Type 'Microsoft.ServiceBus/namespaces' -Tag @{ release = 'GA'; ruleSet = '2022_12'; 'Azure.WAF/pillar' = 'Security'; } {
18-
$Assert.HasFieldValue($TargetObject, 'Properties.minimumTlsVersion', '1.2').Reason($LocalizedData.ServiceBusMinTLS, $PSRule.TargetName)
19-
}
20-
2116
# Synopsis: Ensure namespaces audit diagnostic logs are enabled.
2217
Rule 'Azure.ServiceBus.AuditLogs' -Ref 'AZR-000358' -Type 'Microsoft.ServiceBus/namespaces' -With 'Azure.ServiceBus.IsPremium' -Tag @{ release = 'GA'; ruleSet = '2023_03'; 'Azure.WAF/pillar' = 'Security'; } {
2318
$logCategoryGroups = 'audit', 'allLogs'

0 commit comments

Comments
 (0)