Skip to content

Commit cdff13c

Browse files
authored
Update TLS defaults for Azure.Redis.MinTLS Azure#3066 (Azure#3067)
1 parent 9df07af commit cdff13c

11 files changed

+69
-41
lines changed

docs/CHANGELOG-v1.md

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

3030
## Unreleased
3131

32+
What's changed since pre-release v1.39.0-B0118:
33+
34+
- Bug fixes:
35+
- Fixed TLS defaults for `Azure.Redis.MinTLS` and `Azure.RedisEnterprise.MinTLS` by @BernieWhite.
36+
[#3066](https://github.com/Azure/PSRule.Rules.Azure/issues/3066)
37+
3238
## v1.39.0-B0118 (pre-release)
3339

3440
What's changed since pre-release v1.39.0-B0072:

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

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
reviewed: 2024-09-27
23
severity: Critical
34
pillar: Security
45
category: SE:07 Encryption
@@ -15,31 +16,35 @@ Redis Cache should reject TLS versions older than 1.2.
1516

1617
## DESCRIPTION
1718

18-
The minimum version of TLS that Redis Cache accepts is configurable.
19+
The minimum version of TLS that Redis Cache accepts was previously configurable.
1920
Older TLS versions are no longer considered secure by industry standards, such as PCI DSS.
2021

21-
Azure lets you disable outdated protocols and require connections to use a minimum of TLS 1.2.
22-
By default, TLS 1.0, TLS 1.1, and TLS 1.2 is accepted.
22+
Depending on when your cache was deployed you may be using a default that specifies an older version of TLS.
23+
Any new deployments do not allow TLS 1.0 or 1.1 to be specified, however existing cache deployment may require updating.
24+
25+
Support for TLS 1.0 and TLS 1.1 will be removed in 1 November 2024.
2326

2427
## RECOMMENDATION
2528

2629
Consider configuring the minimum supported TLS version to be 1.2.
27-
Support for TLS 1.0/ 1.1 version will be removed.
30+
No action is required for new cache deployments from March 2024, which only support a minimum of TLS 1.2.
2831

2932
## EXAMPLES
3033

3134
### Configure with Azure template
3235

3336
To deploy caches that pass this rule:
3437

35-
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2`.
38+
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2` for existing caches with an old version of TLS configured.
39+
It is not possible to set the `properties.minimumTlsVersion` on new cache deployments from March 2024.
40+
New cache deployments only support a minimum TLS version of 1.2.
3641

3742
For example:
3843

3944
```json
4045
{
4146
"type": "Microsoft.Cache/redis",
42-
"apiVersion": "2023-04-01",
47+
"apiVersion": "2024-03-01",
4348
"name": "[parameters('name')]",
4449
"location": "[parameters('location')]",
4550
"properties": {
@@ -53,7 +58,8 @@ For example:
5358
"redisConfiguration": {
5459
"maxmemory-reserved": "615"
5560
},
56-
"enableNonSslPort": false
61+
"enableNonSslPort": false,
62+
"publicNetworkAccess": "Disabled"
5763
},
5864
"zones": [
5965
"1",
@@ -67,12 +73,14 @@ For example:
6773

6874
To deploy caches that pass this rule:
6975

70-
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2`.
76+
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2` for existing caches with an old version of TLS configured.
77+
It is not possible to set the `properties.minimumTlsVersion` on new cache deployments from March 2024.
78+
New cache deployments only support a minimum TLS version of 1.2.
7179

7280
For example:
7381

7482
```bicep
75-
resource cache 'Microsoft.Cache/redis@2023-04-01' = {
83+
resource cache 'Microsoft.Cache/redis@2024-03-01' = {
7684
name: name
7785
location: location
7886
properties: {
@@ -87,6 +95,7 @@ resource cache 'Microsoft.Cache/redis@2023-04-01' = {
8795
'maxmemory-reserved': '615'
8896
}
8997
enableNonSslPort: false
98+
publicNetworkAccess: 'Disabled'
9099
}
91100
zones: [
92101
'1'
@@ -103,6 +112,7 @@ resource cache 'Microsoft.Cache/redis@2023-04-01' = {
103112
To deploy caches that pass this rule:
104113

105114
- Use the `--set` parameter.
115+
This parameter only applies to old cache deployments using TLS 1.0 or TLS 1.1.
106116

107117
For example:
108118

@@ -115,6 +125,7 @@ az redis update -n '<name>' -g '<resource_group>' --set minimumTlsVersion=1.2
115125
To deploy caches that pass this rule:
116126

117127
- Use the `-MinimumTlsVersion` parameter.
128+
This parameter only applies to old cache deployments using TLS 1.0 or TLS 1.1.
118129

119130
For example:
120131

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

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
reviewed: 2024-09-27
23
severity: Critical
34
pillar: Security
45
category: SE:07 Encryption
@@ -14,31 +15,35 @@ Redis Cache should reject TLS versions older than 1.2.
1415

1516
## DESCRIPTION
1617

17-
The minimum version of TLS that Redis Cache accepts is configurable.
18+
The minimum version of TLS that Redis Cache accepts was previously configurable.
1819
Older TLS versions are no longer considered secure by industry standards, such as PCI DSS.
1920

20-
Azure lets you disable outdated protocols and require connections to use a minimum of TLS 1.2.
21-
By default, TLS 1.0, TLS 1.1, and TLS 1.2 is accepted.
21+
Depending on when your cache was deployed you may be using a default that specifies an older version of TLS.
22+
Any new deployments do not allow TLS 1.0 or 1.1 to be specified, however existing cache deployment may require updating.
23+
24+
Support for TLS 1.0 and TLS 1.1 will be removed in 1 November 2024.
2225

2326
## RECOMMENDATION
2427

2528
Consider configuring the minimum supported TLS version to be 1.2.
26-
Support for TLS 1.0/ 1.1 version will be removed.
29+
No action is required for new cache deployments, which only support a minimum of TLS 1.2.
2730

2831
## EXAMPLES
2932

3033
### Configure with Azure template
3134

3235
To deploy caches that pass this rule:
3336

34-
- Set the `properties.minimumTlsVersion` property to `1.2`.
37+
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2` for existing caches with an old version of TLS configured.
38+
It is not possible to set the `properties.minimumTlsVersion` on new cache deployments.
39+
New cache deployments only support a minimum TLS version of 1.2.
3540

3641
For example:
3742

3843
```json
3944
{
4045
"type": "Microsoft.Cache/redisEnterprise",
41-
"apiVersion": "2022-01-01",
46+
"apiVersion": "2024-02-01",
4247
"name": "[parameters('name')]",
4348
"location": "[parameters('location')]",
4449
"sku": {
@@ -54,12 +59,14 @@ For example:
5459

5560
To deploy caches that pass this rule:
5661

57-
- Set the `properties.minimumTlsVersion` property to `1.2`.
62+
- Set the `properties.minimumTlsVersion` property to a minimum of `1.2` for existing caches with an old version of TLS configured.
63+
It is not possible to set the `properties.minimumTlsVersion` on new cache deployments.
64+
New cache deployments only support a minimum TLS version of 1.2.
5865

5966
For example:
6067

6168
```bicep
62-
resource cache 'Microsoft.Cache/redisEnterprise@2022-01-01' = {
69+
resource cache 'Microsoft.Cache/redisEnterprise@2024-02-01' = {
6370
name: name
6471
location: location
6572
sku: {
@@ -76,6 +83,7 @@ resource cache 'Microsoft.Cache/redisEnterprise@2022-01-01' = {
7683
To deploy caches that pass this rule:
7784

7885
- Use the `--set` parameter.
86+
This parameter only applies to old cache deployments using TLS 1.0 or TLS 1.1.
7987

8088
For example:
8189

@@ -88,6 +96,7 @@ az redis update -n '<name>' -g '<resource_group>' --set minimumTlsVersion=1.2
8896
To deploy caches that pass this rule:
8997

9098
- Use the `-MinimumTlsVersion` parameter.
99+
This parameter only applies to old cache deployments using TLS 1.0 or TLS 1.1.
91100

92101
For example:
93102

docs/examples-redis.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ param name string
1010
param location string = resourceGroup().location
1111

1212
// An example Redis Cache.
13-
resource cache 'Microsoft.Cache/redis@2023-08-01' = {
13+
resource cache 'Microsoft.Cache/redis@2024-03-01' = {
1414
name: name
1515
location: location
1616
properties: {
@@ -35,7 +35,7 @@ resource cache 'Microsoft.Cache/redis@2023-08-01' = {
3535
}
3636

3737
// An example firewall rule for Redis Cache.
38-
resource rule 'Microsoft.Cache/redis/firewallRules@2023-08-01' = {
38+
resource rule 'Microsoft.Cache/redis/firewallRules@2024-03-01' = {
3939
parent: cache
4040
name: 'allow-on-premises'
4141
properties: {

docs/examples-redis.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.25.53.49325",
8-
"templateHash": "7482944073131107404"
7+
"version": "0.30.23.60470",
8+
"templateHash": "16114660589456584580"
99
}
1010
},
1111
"parameters": {
@@ -26,7 +26,7 @@
2626
"resources": [
2727
{
2828
"type": "Microsoft.Cache/redis",
29-
"apiVersion": "2023-08-01",
29+
"apiVersion": "2024-03-01",
3030
"name": "[parameters('name')]",
3131
"location": "[parameters('location')]",
3232
"properties": {
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"type": "Microsoft.Cache/redis/firewallRules",
54-
"apiVersion": "2023-08-01",
54+
"apiVersion": "2024-03-01",
5555
"name": "[format('{0}/{1}', parameters('name'), 'allow-on-premises')]",
5656
"properties": {
5757
"startIP": "10.0.1.1",

docs/examples-redisenterprise.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ param name string
1010
param location string = resourceGroup().location
1111

1212
// An example Redis Enterprise cache.
13-
resource cache 'Microsoft.Cache/redisEnterprise@2023-11-01' = {
13+
resource cache 'Microsoft.Cache/redisEnterprise@2024-02-01' = {
1414
name: name
1515
location: location
1616
sku: {

docs/examples-redisenterprise.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.25.53.49325",
8-
"templateHash": "3600259857722261042"
7+
"version": "0.30.23.60470",
8+
"templateHash": "18144616178175150817"
99
}
1010
},
1111
"parameters": {
@@ -26,7 +26,7 @@
2626
"resources": [
2727
{
2828
"type": "Microsoft.Cache/redisEnterprise",
29-
"apiVersion": "2023-11-01",
29+
"apiVersion": "2024-02-01",
3030
"name": "[parameters('name')]",
3131
"location": "[parameters('location')]",
3232
"sku": {

src/PSRule.Rules.Azure/rules/Azure.Redis.Rule.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ metadata:
6565
ruleSet: 2020_06
6666
Azure.WAF/pillar: Security
6767
labels:
68-
Azure.MCSB.v1/control: 'DP-3'
68+
Azure.MCSB.v1/control: DP-3
6969
spec:
7070
type:
7171
- Microsoft.Cache/Redis
7272
condition:
7373
field: properties.minimumTlsVersion
74-
version: '>=1.2'
74+
hasDefault: '1.2'
7575

7676
---
7777
# Synopsis: Redis cache should disable public network access.

src/PSRule.Rules.Azure/rules/Azure.RedisEnterprise.Rule.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ metadata:
1919
ruleSet: 2022_09
2020
Azure.WAF/pillar: Security
2121
labels:
22-
Azure.MCSB.v1/control: 'DP-3'
22+
Azure.MCSB.v1/control: DP-3
2323
spec:
2424
type:
2525
- Microsoft.Cache/redisEnterprise
2626
condition:
2727
field: properties.minimumTlsVersion
28-
version: '>=1.2'
28+
hasDefault: '1.2'
2929

3030
#endregion Rules

tests/PSRule.Rules.Azure.Tests/Azure.Redis.Tests.ps1

+8-8
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ Describe 'Azure.Redis' -Tag 'Redis' {
5858
# Fail
5959
$ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Fail' });
6060
$ruleResult | Should -Not -BeNullOrEmpty;
61-
$ruleResult.Length | Should -Be 3;
62-
$ruleResult.TargetName | Should -BeIn 'redis-B', 'redis-C', 'redis-D';
61+
$ruleResult.Length | Should -Be 2;
62+
$ruleResult.TargetName | Should -BeIn 'redis-B', 'redis-D';
6363

6464
# Pass
6565
$ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' });
6666
$ruleResult | Should -Not -BeNullOrEmpty;
67-
$ruleResult.Length | Should -Be 9;
68-
$ruleResult.TargetName | Should -BeIn 'redis-A', 'redis-E', 'redis-F', 'redis-G', 'redis-H', 'redis-I', 'redis-J', 'redis-Q', 'redis-R';
67+
$ruleResult.Length | Should -Be 10;
68+
$ruleResult.TargetName | Should -BeIn 'redis-A', 'redis-C', 'redis-E', 'redis-F', 'redis-G', 'redis-H', 'redis-I', 'redis-J', 'redis-Q', 'redis-R';
6969
}
7070

7171
It 'Azure.RedisEnterprise.MinTLS' {
@@ -74,14 +74,14 @@ Describe 'Azure.Redis' -Tag 'Redis' {
7474
# Fail
7575
$ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Fail' });
7676
$ruleResult | Should -Not -BeNullOrEmpty;
77-
$ruleResult.Length | Should -Be 1;
78-
$ruleResult.TargetName | Should -BeIn 'redis-S';
77+
$ruleResult.Length | Should -Be 2;
78+
$ruleResult.TargetName | Should -BeIn 'redis-K', 'redis-L';
7979

8080
# Pass
8181
$ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' });
8282
$ruleResult | Should -Not -BeNullOrEmpty;
83-
$ruleResult.Length | Should -Be 6;
84-
$ruleResult.TargetName | Should -BeIn 'redis-K', 'redis-L', 'redis-M', 'redis-N', 'redis-O', 'redis-P', 'redis-S';
83+
$ruleResult.Length | Should -Be 5;
84+
$ruleResult.TargetName | Should -BeIn 'redis-M', 'redis-N', 'redis-O', 'redis-P', 'redis-S';
8585
}
8686

8787
It 'Azure.Redis.MinSKU' {

tests/PSRule.Rules.Azure.Tests/Resources.Redis.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"family": "C",
5959
"capacity": 2
6060
},
61+
"minimumTlsVersion": "1.0",
6162
"enableNonSslPort": true,
6263
"redisConfiguration": {
6364
"aad-enabled": null,
@@ -403,6 +404,7 @@
403404
"family": "C",
404405
"capacity": 1
405406
},
407+
"minimumTlsVersion": "1.1",
406408
"enableNonSslPort": false,
407409
"instances": [
408410
{
@@ -912,7 +914,7 @@
912914
"SubscriptionId": "00000000-0000-0000-0000-000000000000",
913915
"Tags": {},
914916
"Properties": {
915-
"minimumTlsVersion": "1.2",
917+
"minimumTlsVersion": "1.0",
916918
"hostName": "redis-K.redis.cache.windows.net"
917919
},
918920
"sku": {
@@ -935,7 +937,7 @@
935937
"SubscriptionId": "00000000-0000-0000-0000-000000000000",
936938
"Tags": {},
937939
"Properties": {
938-
"minimumTlsVersion": "1.2",
940+
"minimumTlsVersion": "1.1",
939941
"hostName": "redis-L.redis.cache.windows.net"
940942
},
941943
"sku": {

0 commit comments

Comments
 (0)