|
1 | 1 | ---
|
| 2 | +reviewed: 2024-01-27 |
2 | 3 | severity: Important
|
3 | 4 | pillar: Security
|
4 |
| -category: Data protection |
| 5 | +category: SE:07 Encryption |
5 | 6 | resource: Traffic Manager
|
6 | 7 | online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.TrafficManager.Protocol/
|
7 | 8 | ---
|
@@ -30,7 +31,66 @@ but do not validate if the certificate is valid.
|
30 | 31 | Consider using HTTPS to monitor web-based endpoint health.
|
31 | 32 | HTTPS-based monitoring improves security and increases accuracy of health probes.
|
32 | 33 |
|
| 34 | +## EXAMPLES |
| 35 | + |
| 36 | +### Configure with Azure template |
| 37 | + |
| 38 | +To deploy Traffic Manager profiles that pass this rule: |
| 39 | + |
| 40 | +- Set the `properties.monitorConfig.protocol` property to `HTTPS` for HTTP-based endpoints. |
| 41 | + |
| 42 | +For example: |
| 43 | + |
| 44 | +```json |
| 45 | +{ |
| 46 | + "type": "Microsoft.Network/trafficmanagerprofiles", |
| 47 | + "apiVersion": "2022-04-01", |
| 48 | + "name": "[parameters('name')]", |
| 49 | + "location": "global", |
| 50 | + "properties": { |
| 51 | + "endpoints": "[parameters('endpoints')]", |
| 52 | + "trafficRoutingMethod": "Performance", |
| 53 | + "monitorConfig": { |
| 54 | + "protocol": "HTTPS", |
| 55 | + "port": 443, |
| 56 | + "intervalInSeconds": 30, |
| 57 | + "timeoutInSeconds": 5, |
| 58 | + "toleratedNumberOfFailures": 3, |
| 59 | + "path": "/healthz" |
| 60 | + } |
| 61 | + } |
| 62 | +} |
| 63 | +``` |
| 64 | + |
| 65 | +### Configure with Bicep |
| 66 | + |
| 67 | +To deploy Traffic Manager profiles that pass this rule: |
| 68 | + |
| 69 | +- Set the `properties.monitorConfig.protocol` property to `HTTPS` for HTTP-based endpoints. |
| 70 | + |
| 71 | +For example: |
| 72 | + |
| 73 | +```bicep |
| 74 | +resource profile 'Microsoft.Network/trafficmanagerprofiles@2022-04-01' = { |
| 75 | + name: name |
| 76 | + location: 'global' |
| 77 | + properties: { |
| 78 | + endpoints: endpoints |
| 79 | + trafficRoutingMethod: 'Performance' |
| 80 | + monitorConfig: { |
| 81 | + protocol: 'HTTPS' |
| 82 | + port: 443 |
| 83 | + intervalInSeconds: 30 |
| 84 | + timeoutInSeconds: 5 |
| 85 | + toleratedNumberOfFailures: 3 |
| 86 | + path: '/healthz' |
| 87 | + } |
| 88 | + } |
| 89 | +} |
| 90 | +``` |
| 91 | + |
33 | 92 | ## LINKS
|
34 | 93 |
|
35 |
| -- [Data encryption in Azure](https://learn.microsoft.com/azure/architecture/framework/security/design-storage-encryption#data-in-transit) |
36 |
| -- [Traffic Manager endpoint monitoring](https://docs.microsoft.com/azure/traffic-manager/traffic-manager-monitoring) |
| 94 | +- [SE:07 Encryption](https://learn.microsoft.com/azure/well-architected/security/encryption#data-in-transit) |
| 95 | +- [Traffic Manager endpoint monitoring](https://learn.microsoft.com/azure/traffic-manager/traffic-manager-monitoring) |
| 96 | +- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.network/trafficmanagerprofiles) |
0 commit comments