Created
July 28, 2022 01:31
-
-
Save anwather/db97f2e31b4578dc2d625c4262dca0ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "05a74909-be77-4704-8034-0dec6a41e2ea", | |
"properties": { | |
"displayName": "Storage Account set to minumum TLS and Secure transfer should be enabled", | |
"mode": "Indexed", | |
"description": "Audit requirement of Secure transfer in your storage account. Secure transfer is an option that forces your storage account to accept requests only from secure connections (HTTPS). Use of HTTPS ensures authentication between the server and the service and protects data in transit from network layer attacks such as man-in-the-middle, eavesdropping, and session-hijacking", | |
"metadata": { | |
"version": "1.0.0", | |
"category": "Storage" | |
}, | |
"parameters": { | |
"effect": { | |
"type": "String", | |
"defaultValue": "Deny", | |
"allowedValues": [ | |
"Audit", | |
"Deny", | |
"Disabled" | |
], | |
"metadata": { | |
"displayName": "Effect", | |
"description": "The effect determines what happens when the policy rule is evaluated to match" | |
} | |
}, | |
"minimumTlsVersion": { | |
"type": "String", | |
"defaultValue": "TLS1_2", | |
"allowedValues": [ | |
"TLS1_2", | |
"TLS1_1", | |
"TLS1_0" | |
], | |
"metadata": { | |
"displayName": "Storage Account select minimum TLS version", | |
"description": "Select version minimum TLS version on Azure Storage Account to enforce" | |
} | |
} | |
}, | |
"policyRule": { | |
"if": { | |
"allOf": [ | |
{ | |
"field": "type", | |
"equals": "Microsoft.Storage/storageAccounts" | |
}, | |
{ | |
"anyOf": [ | |
{ | |
"allOf": [ | |
{ | |
"value": "[requestContext().apiVersion]", | |
"less": "2019-04-01" | |
}, | |
{ | |
"field": "Microsoft.Storage/storageAccounts/supportsHttpsTrafficOnly", | |
"exists": "false" | |
} | |
] | |
}, | |
{ | |
"field": "Microsoft.Storage/storageAccounts/supportsHttpsTrafficOnly", | |
"equals": "false" | |
}, | |
{ | |
"field": "Microsoft.Storage/storageAccounts/minimumTlsVersion", | |
"notequals": "[parameters('minimumTlsVersion')]" | |
}, | |
{ | |
"field": "Microsoft.Storage/storageAccounts/minimumTlsVersion", | |
"exists": "false" | |
} | |
] | |
} | |
] | |
}, | |
"then": { | |
"effect": "[parameters('effect')]" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment