Gallery › Encryption › Azure Landing Zones Library
[Deprecated]: Deny or Deploy and append TLS requirements and SSL enforcement on resources without Encryption in transit
Converted Initiative Version 1.0.0-deprecated Deprecated
Choose either Deploy if not exist and append in combination with audit or Select Deny in the Policy effect. Deny polices shift left. Deploy if not exist and append enforce but can be changed, and because missing existence condition require then the combination of Audit. Superseded by https://www.azadvertizer.net/azpolicyinitiativesadvertizer/Enforce-EncryptTransit_20241211.html
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONEnforce-EncryptTransit_20240509.alz_policy_set_definition.json · 975 lines
{
"name": "Enforce-EncryptTransit_20240509",
"properties": {
"description": "Choose either Deploy if not exist and append in combination with audit or Select Deny in the Policy effect. Deny polices shift left. Deploy if not exist and append enforce but can be changed, and because missing existence condition require then the combination of Audit. Superseded by https://www.azadvertizer.net/azpolicyinitiativesadvertizer/Enforce-EncryptTransit_20241211.html ",
"displayName": "[Deprecated]: Deny or Deploy and append TLS requirements and SSL enforcement on resources without Encryption in transit",
"metadata": {
"alzCloudEnvironments": [
"AzureCloud",
"AzureChinaCloud",
"AzureUSGovernment"
],
"category": "Encryption",
"deprecated": true,
"replacesPolicy": "Enforce-EncryptTransit",
"source": "https://github.com/Azure/Enterprise-Scale/",
"supersededBy": "Enforce-EncryptTransit_20241211",
"version": "1.0.0-deprecated"
},
"parameters": {
"AKSIngressHttpsOnlyEffect": {
"allowedValues": [
"audit",
"deny",
"disabled"
],
"defaultValue": "deny",
"metadata": {
"description": "This policy enforces HTTPS ingress in a Kubernetes cluster. This policy is generally available for Kubernetes Service (AKS), and preview for AKS Engine and Azure Arc enabled Kubernetes. For instructions on using this policy, visit https://aka.ms/kubepolicydoc.",
"displayName": "AKS Service. Enforce HTTPS ingress in Kubernetes cluster"
},
"type": "String"
},
"APIAppServiceHttpsEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.",
"displayName": "App Service API App. API App should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy."
},
"type": "String"
},
"AppServiceHttpEffect": {
"allowedValues": [
"Append",
"Disabled"
],
"defaultValue": "Append",
"metadata": {
"description": "Append the AppService sites object to ensure that min Tls version is set to required TLS version. Please note Append does not enforce compliance use then deny.",
"displayName": "App Service. Appends the AppService sites config WebApp, APIApp, Function App with TLS version selected below"
},
"type": "String"
},
"AppServiceTlsVersionEffect": {
"allowedValues": [
"Append",
"Disabled"
],
"defaultValue": "Append",
"metadata": {
"description": "App Service. Appends the AppService sites object to ensure that HTTPS only is enabled for server/service authentication and protects data in transit from network layer eavesdropping attacks. Please note Append does not enforce compliance use then deny.",
"displayName": "App Service. Appends the AppService WebApp, APIApp, Function App to enable https only"
},
"type": "String"
},
"AppServiceminTlsVersion": {
"allowedValues": [
"1.3",
"1.2",
"1.1",
"1.0"
],
"defaultValue": "1.2",
"metadata": {
"description": "App Service. Select version minimum TLS version for a Web App config to enforce",
"displayName": "App Service. Select version minimum TLS Web App config"
},
"type": "String"
},
"ContainerAppsHttpsOnlyEffect": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"metadata": {
"description": "Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks. Disabling 'allowInsecure' will result in the automatic redirection of requests from HTTP to HTTPS connections for container apps.",
"displayName": "Container Apps should only be accessible over HTTPS"
},
"type": "String"
},
"FunctionAppTlsEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"description": "App Service Function App. Periodically, newer versions are released for TLS either due to security flaws, include additional functionality, and enhance speed. Upgrade to the latest TLS version for Function apps to take advantage of security fixes, if any, and/or new functionalities of the latest version.",
"displayName": "App Service Function App. Configure Function apps to use the latest TLS version."
},
"type": "string"
},
"FunctionLatestTlsEffect": {
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists",
"metadata": {
"description": "Only Audit, deny not possible as it is a related resource. Upgrade to the latest TLS version.",
"displayName": "App Service Function App. Latest TLS version should be used in your Function App"
},
"type": "String"
},
"FunctionServiceHttpsEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "App Service Function App. Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.",
"displayName": "App Service Function App. Function App should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy."
},
"type": "String"
},
"LogicAppTlsEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"type": "string"
},
"MySQLEnableSSLDeployEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"description": "Deploy a specific min TLS version requirement and enforce SSL on Azure Database for MySQL server. Enforce the Server to client applications using minimum version of Tls to secure the connection between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "MySQL database servers. Deploy if not exist set minimum TLS version Azure Database for MySQL server"
},
"type": "String"
},
"MySQLEnableSSLEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Azure Database for MySQL supports connecting your Azure Database for MySQL server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "MySQL database servers. Enforce SSL connection should be enabled for MySQL database servers"
},
"type": "String"
},
"MySQLminimalTlsVersion": {
"allowedValues": [
"TLS1_2",
"TLS1_0",
"TLS1_1",
"TLSEnforcementDisabled"
],
"defaultValue": "TLS1_2",
"metadata": {
"description": "Select version minimum TLS version Azure Database for MySQL server to enforce",
"displayName": "MySQL database servers. Select version minimum TLS for MySQL server"
},
"type": "String"
},
"PostgreSQLEnableSSLDeployEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"description": "Deploy a specific min TLS version requirement and enforce SSL on Azure Database for PostgreSQL server. Enforce the Server to client applications using minimum version of Tls to secure the connection between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "PostgreSQL database servers. Deploy if not exist set minimum TLS version Azure Database for PostgreSQL server"
},
"type": "String"
},
"PostgreSQLEnableSSLEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Azure Database for PostgreSQL supports connecting your Azure Database for PostgreSQL server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "PostgreSQL database servers. Enforce SSL connection should be enabled for PostgreSQL database servers"
},
"type": "String"
},
"PostgreSQLminimalTlsVersion": {
"allowedValues": [
"TLS1_2",
"TLS1_0",
"TLS1_1",
"TLSEnforcementDisabled"
],
"defaultValue": "TLS1_2",
"metadata": {
"description": "PostgreSQL database servers. Select version minimum TLS version Azure Database for MySQL server to enforce",
"displayName": "PostgreSQL database servers. Select version minimum TLS for MySQL server"
},
"type": "String"
},
"RedisMinTlsVersion": {
"allowedValues": [
"1.2",
"1.0",
"1.1"
],
"defaultValue": "1.2",
"metadata": {
"description": "Select version minimum TLS version for a Azure Cache for Redis to enforce",
"displayName": "Azure Cache for Redis.Select version minimum TLS for Azure Cache for Redis"
},
"type": "String"
},
"RedisTLSDeployEffect": {
"allowedValues": [
"Append",
"Disabled"
],
"defaultValue": "Append",
"metadata": {
"description": "Deploy a specific min TLS version requirement and enforce SSL on Azure Cache for Redis. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "Azure Cache for Redis. Deploy a specific min TLS version requirement and enforce SSL Azure Cache for Redis"
},
"type": "String"
},
"RedisTLSEffect": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit",
"metadata": {
"description": "Azure Cache for Redis. Audit enabling of only connections via SSL to Azure Cache for Redis. Use of secure connections 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.",
"displayName": "Azure Cache for Redis. Only secure connections to your Azure Cache for Redis should be enabled"
},
"type": "String"
},
"SQLManagedInstanceMinTlsVersion": {
"allowedValues": [
"1.2",
"1.0",
"1.1"
],
"defaultValue": "1.2",
"metadata": {
"description": "Select version minimum TLS version for Azure Managed Instanceto to enforce",
"displayName": "Azure Managed Instance.Select version minimum TLS for Azure Managed Instance"
},
"type": "String"
},
"SQLManagedInstanceTLSDeployEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"description": "Deploy a specific min TLS version requirement and enforce SSL on SQL servers. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "Azure Managed Instance. Deploy a specific min TLS version requirement and enforce SSL on SQL servers"
},
"type": "String"
},
"SQLManagedInstanceTLSEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.",
"displayName": "SQL Managed Instance should have the minimal TLS version of 1.2"
},
"type": "String"
},
"SQLServerTLSDeployEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"description": "Deploy a specific min TLS version requirement and enforce SSL on SQL servers. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.",
"displayName": "Azure SQL Database. Deploy a specific min TLS version requirement and enforce SSL on SQL servers"
},
"type": "String"
},
"SQLServerTLSEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Setting minimal TLS version to 1.2 improves security by ensuring your Azure SQL Database can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.",
"displayName": "Azure SQL Database should have the minimal TLS version of 1.2"
},
"type": "String"
},
"SQLServerminTlsVersion": {
"allowedValues": [
"1.2",
"1.0",
"1.1"
],
"defaultValue": "1.2",
"metadata": {
"description": "Select version minimum TLS version for Azure SQL Database to enforce",
"displayName": "Azure SQL Database.Select version minimum TLS for Azure SQL Database"
},
"type": "String"
},
"StorageDeployHttpsEnabledEffect": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"metadata": {
"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",
"displayName": "Azure Storage Account. Deploy Secure transfer to storage accounts should be enabled"
},
"type": "String"
},
"StorageMinimumTlsVersion": {
"allowedValues": [
"TLS1_2",
"TLS1_1",
"TLS1_0"
],
"defaultValue": "TLS1_2",
"metadata": {
"description": "Select version minimum TLS version on Azure Storage Account to enforce",
"displayName": "Storage Account select minimum TLS version"
},
"type": "String"
},
"WebAppServiceHttpsEffect": {
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit",
"metadata": {
"description": "Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.",
"displayName": "App Service Web App. Web Application should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy."
},
"type": "String"
},
"WebAppServiceLatestTlsEffect": {
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists",
"metadata": {
"description": "Only Audit, deny not possible as it is a related resource. Upgrade to the latest TLS version.",
"displayName": "App Service Web App. Latest TLS version should be used in your Web App"
},
"type": "String"
},
"appServiceAppSlotTls": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"type": "string"
},
"appServiceAppSlotsHttps": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"appServiceAppsHttps": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"appServiceAppsTls": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"type": "string"
},
"appServiceTls": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"containerAppsHttps": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"eventHubMinTls": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"functionAppHttps": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"functionAppSlotsHttps": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"functionAppSlotsTls": {
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists",
"type": "string"
},
"logicAppHttpsEffect": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"sqlDbTls": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"sqlManagedTlsVersion": {
"allowedValues": [
"Audit",
"Disabled"
],
"defaultValue": "Audit",
"type": "string"
},
"storageAccountsTls": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
},
"synapseTlsVersion": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"type": "string"
}
},
"policyDefinitions": [
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('AppServiceHttpEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-AppService-httpsonly",
"policyDefinitionReferenceId": "AppServiceHttpEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('AppServiceTlsVersionEffect')]"
},
"minTlsVersion": {
"value": "[parameters('AppServiceminTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-AppService-latestTLS",
"policyDefinitionReferenceId": "AppServiceminTlsVersion"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('FunctionLatestTlsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f9d614c5-c173-4d56-95a7-b4437057d193",
"policyDefinitionReferenceId": "FunctionLatestTlsEffect"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('WebAppServiceLatestTlsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f0e6e85b-9b9f-4a4b-b67b-f730d42f1b0b",
"policyDefinitionReferenceId": "WebAppServiceLatestTlsEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('APIAppServiceHttpsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceApiApp-http",
"policyDefinitionReferenceId": "APIAppServiceHttpsEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('FunctionServiceHttpsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceFunctionApp-http",
"policyDefinitionReferenceId": "FunctionServiceHttpsEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('WebAppServiceHttpsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceWebApp-http",
"policyDefinitionReferenceId": "WebAppServiceHttpsEffect"
},
{
"definitionVersion": "8.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('AKSIngressHttpsOnlyEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1a5b4dca-0b6f-4cf5-907c-56316bc1bf3d",
"policyDefinitionReferenceId": "AKSIngressHttpsOnlyEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('MySQLEnableSSLDeployEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('MySQLminimalTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-MySQL-sslEnforcement",
"policyDefinitionReferenceId": "MySQLEnableSSLDeployEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('MySQLEnableSSLEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('MySQLminimalTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-MySql-http",
"policyDefinitionReferenceId": "MySQLEnableSSLEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('PostgreSQLEnableSSLDeployEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('PostgreSQLminimalTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-PostgreSQL-sslEnforcement",
"policyDefinitionReferenceId": "PostgreSQLEnableSSLDeployEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('PostgreSQLEnableSSLEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('PostgreSQLminimalTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-PostgreSql-http",
"policyDefinitionReferenceId": "PostgreSQLEnableSSLEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('RedisTLSDeployEffect')]"
},
"minimumTlsVersion": {
"value": "[parameters('RedisMinTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-Redis-sslEnforcement",
"policyDefinitionReferenceId": "RedisTLSDeployEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('RedisTLSDeployEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-Redis-disableNonSslPort",
"policyDefinitionReferenceId": "RedisdisableNonSslPort"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('RedisTLSEffect')]"
},
"minimumTlsVersion": {
"value": "[parameters('RedisMinTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-Redis-http",
"policyDefinitionReferenceId": "RedisDenyhttps"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('SQLManagedInstanceTLSDeployEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('SQLManagedInstanceMinTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-SqlMi-minTLS",
"policyDefinitionReferenceId": "SQLManagedInstanceTLSDeployEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('SQLManagedInstanceTLSEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('SQLManagedInstanceMinTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-SqlMi-minTLS",
"policyDefinitionReferenceId": "SQLManagedInstanceTLSEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('SQLServerTLSDeployEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('SQLServerminTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-SQL-minTLS",
"policyDefinitionReferenceId": "SQLServerTLSDeployEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('SQLServerTLSEffect')]"
},
"minimalTlsVersion": {
"value": "[parameters('SQLServerminTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-Sql-minTLS",
"policyDefinitionReferenceId": "SQLServerTLSEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('StorageDeployHttpsEnabledEffect')]"
},
"minimumTlsVersion": {
"value": "[parameters('StorageMinimumTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-Storage-sslEnforcement",
"policyDefinitionReferenceId": "StorageDeployHttpsEnabledEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('ContainerAppsHttpsOnlyEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0e80e269-43a4-4ae9-b5bc-178126b8a5cb",
"policyDefinitionReferenceId": "ContainerAppsHttpsOnlyEffect"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('FunctionAppTlsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1f01f1c7-539c-49b5-9ef4-d4ffa37d22e0",
"policyDefinitionReferenceId": "Dine-FunctionApp-Tls"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('LogicAppTlsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-LogicApp-TLS",
"policyDefinitionReferenceId": "Deploy-LogicApp-TLS"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('logicAppHttpsEffect')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-LogicApps-Without-Https",
"policyDefinitionReferenceId": "Deny-LogicApp-Without-Https"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('functionAppSlotsTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/fa3a6357-c6d6-4120-8429-855577ec0063",
"policyDefinitionReferenceId": "Dine-Function-Apps-Slots-Tls"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('appServiceAppsTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ae44c1d1-0df2-4ca9-98fa-a3d3ae5b409d",
"policyDefinitionReferenceId": "Dine-AppService-Apps-Tls"
},
{
"definitionVersion": "4.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('appServiceAppsHttps')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a4af4a39-4135-47fb-b175-47fbdf85311d",
"policyDefinitionReferenceId": "Deny-AppService-Apps-Https"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('appServiceTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/d6545c6b-dd9d-4265-91e6-0b451e2f1c50",
"policyDefinitionReferenceId": "Deny-AppService-Tls"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('appServiceAppSlotTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/014664e7-e348-41a3-aeb9-566e4ff6a9df",
"policyDefinitionReferenceId": "DINE-AppService-AppSlotTls"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('functionAppSlotsHttps')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5e5dbe3f-2702-4ffc-8b1e-0cae008a5c71",
"policyDefinitionReferenceId": "Deny-FuncAppSlots-Https"
},
{
"definitionVersion": "5.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('functionAppHttps')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/6d555dd1-86f2-4f1c-8ed7-5abae7c6cbab",
"policyDefinitionReferenceId": "Deny-FunctionApp-Https"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('appServiceAppSlotsHttps')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ae1b9a8c-dfce-4605-bd91-69213b4a26fc",
"policyDefinitionReferenceId": "Deny-AppService-Slots-Https"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('containerAppsHttps')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0e80e269-43a4-4ae9-b5bc-178126b8a5cb",
"policyDefinitionReferenceId": "Deny-ContainerApps-Https"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('eventHubMinTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-EH-minTLS",
"policyDefinitionReferenceId": "Deny-EH-minTLS"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('sqlManagedTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8793640-60f7-487c-b5c3-1d37215905c4",
"policyDefinitionReferenceId": "Deny-Sql-Managed-Tls-Version"
},
{
"definitionVersion": "2.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('sqlDbTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/32e6bbec-16b6-44c2-be37-c5b672d103cf",
"policyDefinitionReferenceId": "Deny-Sql-Db-Tls"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('storageAccountsTls')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/fe83a0eb-a853-422d-aac2-1bffd182c5d0",
"policyDefinitionReferenceId": "Deny-Storage-Tls"
},
{
"definitionVersion": "1.*.*",
"groupNames": [],
"parameters": {
"effect": {
"value": "[parameters('synapseTlsVersion')]"
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/cb3738a6-82a2-4a18-b87b-15217b9deff4",
"policyDefinitionReferenceId": "Deny-Synapse-Tls-Version"
}
],
"policyType": "Custom"
},
"type": "Microsoft.Authorization/policySetDefinitions"
}BylawEnforce-EncryptTransit_20240509.bylaw.ps1 · 645 lines
# Converted from Enforce-EncryptTransit_20240509.alz_policy_set_definition.json by ConvertTo-Bylaw.
Initiative 'Enforce-EncryptTransit_20240509' {
Properties @{
DisplayName = '[Deprecated]: Deny or Deploy and append TLS requirements and SSL enforcement on resources without Encryption in transit'
Description = 'Choose either Deploy if not exist and append in combination with audit or Select Deny in the Policy effect. Deny polices shift left. Deploy if not exist and append enforce but can be changed, and because missing existence condition require then the combination of Audit. Superseded by https://www.azadvertizer.net/azpolicyinitiativesadvertizer/Enforce-EncryptTransit_20241211.html '
Category = 'Encryption'
Deprecated = $true
Version = '1.0.0-deprecated'
Metadata = [ordered]@{ alzCloudEnvironments = @('AzureCloud', 'AzureChinaCloud', 'AzureUSGovernment'); replacesPolicy = 'Enforce-EncryptTransit'; source = 'https://github.com/Azure/Enterprise-Scale/'; supersededBy = 'Enforce-EncryptTransit_20241211' }
}
Parameter AKSIngressHttpsOnlyEffect @{
AllowedValues = @('audit', 'deny', 'disabled')
Default = 'deny'
DisplayName = 'AKS Service. Enforce HTTPS ingress in Kubernetes cluster'
Description = 'This policy enforces HTTPS ingress in a Kubernetes cluster. This policy is generally available for Kubernetes Service (AKS), and preview for AKS Engine and Azure Arc enabled Kubernetes. For instructions on using this policy, visit https://aka.ms/kubepolicydoc.'
JsonName = 'AKSIngressHttpsOnlyEffect'
}
Parameter APIAppServiceHttpsEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'App Service API App. API App should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy.'
Description = 'Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.'
JsonName = 'APIAppServiceHttpsEffect'
}
Parameter AppServiceHttpEffect @{
AllowedValues = @('Append', 'Disabled')
Default = 'Append'
DisplayName = 'App Service. Appends the AppService sites config WebApp, APIApp, Function App with TLS version selected below'
Description = 'Append the AppService sites object to ensure that min Tls version is set to required TLS version. Please note Append does not enforce compliance use then deny.'
JsonName = 'AppServiceHttpEffect'
}
Parameter AppServiceTlsVersionEffect @{
AllowedValues = @('Append', 'Disabled')
Default = 'Append'
DisplayName = 'App Service. Appends the AppService WebApp, APIApp, Function App to enable https only'
Description = 'App Service. Appends the AppService sites object to ensure that HTTPS only is enabled for server/service authentication and protects data in transit from network layer eavesdropping attacks. Please note Append does not enforce compliance use then deny.'
JsonName = 'AppServiceTlsVersionEffect'
}
Parameter AppServiceminTlsVersion @{
AllowedValues = @('1.3', '1.2', '1.1', '1.0')
Default = '1.2'
DisplayName = 'App Service. Select version minimum TLS Web App config'
Description = 'App Service. Select version minimum TLS version for a Web App config to enforce'
JsonName = 'AppServiceminTlsVersion'
}
Parameter ContainerAppsHttpsOnlyEffect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
DisplayName = 'Container Apps should only be accessible over HTTPS'
Description = 'Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks. Disabling ''allowInsecure'' will result in the automatic redirection of requests from HTTP to HTTPS connections for container apps.'
JsonName = 'ContainerAppsHttpsOnlyEffect'
}
Parameter FunctionAppTlsEffect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'App Service Function App. Configure Function apps to use the latest TLS version.'
Description = 'App Service Function App. Periodically, newer versions are released for TLS either due to security flaws, include additional functionality, and enhance speed. Upgrade to the latest TLS version for Function apps to take advantage of security fixes, if any, and/or new functionalities of the latest version.'
JsonName = 'FunctionAppTlsEffect'
}
Parameter FunctionLatestTlsEffect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'App Service Function App. Latest TLS version should be used in your Function App'
Description = 'Only Audit, deny not possible as it is a related resource. Upgrade to the latest TLS version.'
JsonName = 'FunctionLatestTlsEffect'
}
Parameter FunctionServiceHttpsEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'App Service Function App. Function App should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy.'
Description = 'App Service Function App. Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.'
JsonName = 'FunctionServiceHttpsEffect'
}
Parameter LogicAppTlsEffect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
JsonName = 'LogicAppTlsEffect'
}
Parameter MySQLEnableSSLDeployEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'MySQL database servers. Deploy if not exist set minimum TLS version Azure Database for MySQL server'
Description = 'Deploy a specific min TLS version requirement and enforce SSL on Azure Database for MySQL server. Enforce the Server to client applications using minimum version of Tls to secure the connection between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'MySQLEnableSSLDeployEffect'
}
Parameter MySQLEnableSSLEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'MySQL database servers. Enforce SSL connection should be enabled for MySQL database servers'
Description = 'Azure Database for MySQL supports connecting your Azure Database for MySQL server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'MySQLEnableSSLEffect'
}
Parameter MySQLminimalTlsVersion @{
AllowedValues = @('TLS1_2', 'TLS1_0', 'TLS1_1', 'TLSEnforcementDisabled')
Default = 'TLS1_2'
DisplayName = 'MySQL database servers. Select version minimum TLS for MySQL server'
Description = 'Select version minimum TLS version Azure Database for MySQL server to enforce'
JsonName = 'MySQLminimalTlsVersion'
}
Parameter PostgreSQLEnableSSLDeployEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'PostgreSQL database servers. Deploy if not exist set minimum TLS version Azure Database for PostgreSQL server'
Description = 'Deploy a specific min TLS version requirement and enforce SSL on Azure Database for PostgreSQL server. Enforce the Server to client applications using minimum version of Tls to secure the connection between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'PostgreSQLEnableSSLDeployEffect'
}
Parameter PostgreSQLEnableSSLEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'PostgreSQL database servers. Enforce SSL connection should be enabled for PostgreSQL database servers'
Description = 'Azure Database for PostgreSQL supports connecting your Azure Database for PostgreSQL server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'PostgreSQLEnableSSLEffect'
}
Parameter PostgreSQLminimalTlsVersion @{
AllowedValues = @('TLS1_2', 'TLS1_0', 'TLS1_1', 'TLSEnforcementDisabled')
Default = 'TLS1_2'
DisplayName = 'PostgreSQL database servers. Select version minimum TLS for MySQL server'
Description = 'PostgreSQL database servers. Select version minimum TLS version Azure Database for MySQL server to enforce'
JsonName = 'PostgreSQLminimalTlsVersion'
}
Parameter RedisMinTlsVersion @{
AllowedValues = @('1.2', '1.0', '1.1')
Default = '1.2'
DisplayName = 'Azure Cache for Redis.Select version minimum TLS for Azure Cache for Redis'
Description = 'Select version minimum TLS version for a Azure Cache for Redis to enforce'
JsonName = 'RedisMinTlsVersion'
}
Parameter RedisTLSDeployEffect @{
AllowedValues = @('Append', 'Disabled')
Default = 'Append'
DisplayName = 'Azure Cache for Redis. Deploy a specific min TLS version requirement and enforce SSL Azure Cache for Redis'
Description = 'Deploy a specific min TLS version requirement and enforce SSL on Azure Cache for Redis. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'RedisTLSDeployEffect'
}
Parameter RedisTLSEffect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Azure Cache for Redis. Only secure connections to your Azure Cache for Redis should be enabled'
Description = 'Azure Cache for Redis. Audit enabling of only connections via SSL to Azure Cache for Redis. Use of secure connections 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.'
JsonName = 'RedisTLSEffect'
}
Parameter SQLManagedInstanceMinTlsVersion @{
AllowedValues = @('1.2', '1.0', '1.1')
Default = '1.2'
DisplayName = 'Azure Managed Instance.Select version minimum TLS for Azure Managed Instance'
Description = 'Select version minimum TLS version for Azure Managed Instanceto to enforce'
JsonName = 'SQLManagedInstanceMinTlsVersion'
}
Parameter SQLManagedInstanceTLSDeployEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Azure Managed Instance. Deploy a specific min TLS version requirement and enforce SSL on SQL servers'
Description = 'Deploy a specific min TLS version requirement and enforce SSL on SQL servers. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'SQLManagedInstanceTLSDeployEffect'
}
Parameter SQLManagedInstanceTLSEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'SQL Managed Instance should have the minimal TLS version of 1.2'
Description = 'Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.'
JsonName = 'SQLManagedInstanceTLSEffect'
}
Parameter SQLServerTLSDeployEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Azure SQL Database. Deploy a specific min TLS version requirement and enforce SSL on SQL servers'
Description = 'Deploy a specific min TLS version requirement and enforce SSL on SQL servers. Enables secure server to client by enforce minimal Tls Version to secure the connection between your database server and your client applications helps protect against ''man in the middle'' attacks by encrypting the data stream between the server and your application. This configuration enforces that SSL is always enabled for accessing your database server.'
JsonName = 'SQLServerTLSDeployEffect'
}
Parameter SQLServerTLSEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'Azure SQL Database should have the minimal TLS version of 1.2'
Description = 'Setting minimal TLS version to 1.2 improves security by ensuring your Azure SQL Database can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.'
JsonName = 'SQLServerTLSEffect'
}
Parameter SQLServerminTlsVersion @{
AllowedValues = @('1.2', '1.0', '1.1')
Default = '1.2'
DisplayName = 'Azure SQL Database.Select version minimum TLS for Azure SQL Database'
Description = 'Select version minimum TLS version for Azure SQL Database to enforce'
JsonName = 'SQLServerminTlsVersion'
}
Parameter StorageDeployHttpsEnabledEffect @{
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Azure Storage Account. Deploy Secure transfer to storage accounts should be enabled'
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'
JsonName = 'StorageDeployHttpsEnabledEffect'
}
Parameter StorageMinimumTlsVersion @{
AllowedValues = @('TLS1_2', 'TLS1_1', 'TLS1_0')
Default = 'TLS1_2'
DisplayName = 'Storage Account select minimum TLS version'
Description = 'Select version minimum TLS version on Azure Storage Account to enforce'
JsonName = 'StorageMinimumTlsVersion'
}
Parameter WebAppServiceHttpsEffect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'App Service Web App. Web Application should only be accessible over HTTPS. Choose Deny or Audit in combination with Append policy.'
Description = 'Choose Deny or Audit in combination with Append policy. Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.'
JsonName = 'WebAppServiceHttpsEffect'
}
Parameter WebAppServiceLatestTlsEffect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'App Service Web App. Latest TLS version should be used in your Web App'
Description = 'Only Audit, deny not possible as it is a related resource. Upgrade to the latest TLS version.'
JsonName = 'WebAppServiceLatestTlsEffect'
}
Parameter AppServiceAppSlotTls @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
}
Parameter AppServiceAppSlotsHttps @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter AppServiceAppsHttps @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter AppServiceAppsTls @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
}
Parameter AppServiceTls @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter ContainerAppsHttps @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter EventHubMinTls @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter FunctionAppHttps @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter FunctionAppSlotsHttps @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter FunctionAppSlotsTls @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
}
Parameter LogicAppHttpsEffect @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter SqlDbTls @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter SqlManagedTlsVersion @{
Type = 'string'
AllowedValues = @('Audit', 'Disabled')
Default = 'Audit'
}
Parameter StorageAccountsTls @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
Parameter SynapseTlsVersion @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-AppService-httpsonly'
ReferenceId = 'AppServiceHttpEffect'
Version = '1.*.*'
Parameters = @{
effect = (Param AppServiceHttpEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-AppService-latestTLS'
ReferenceId = 'AppServiceminTlsVersion'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param AppServiceTlsVersionEffect)
minTlsVersion = (Param AppServiceminTlsVersion)
}
}
PolicyDefinition @{
Id = 'f9d614c5-c173-4d56-95a7-b4437057d193'
ReferenceId = 'FunctionLatestTlsEffect'
Version = '2.*.*'
Parameters = @{
effect = (Param FunctionLatestTlsEffect)
}
}
PolicyDefinition @{
Id = 'f0e6e85b-9b9f-4a4b-b67b-f730d42f1b0b'
ReferenceId = 'WebAppServiceLatestTlsEffect'
Version = '2.*.*'
Parameters = @{
effect = (Param WebAppServiceLatestTlsEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceApiApp-http'
ReferenceId = 'APIAppServiceHttpsEffect'
Version = '1.*.*'
Parameters = @{
effect = (Param APIAppServiceHttpsEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceFunctionApp-http'
ReferenceId = 'FunctionServiceHttpsEffect'
Version = '1.*.*'
Parameters = @{
effect = (Param FunctionServiceHttpsEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-AppServiceWebApp-http'
ReferenceId = 'WebAppServiceHttpsEffect'
Version = '1.*.*'
Parameters = @{
effect = (Param WebAppServiceHttpsEffect)
}
}
PolicyDefinition @{
Id = '1a5b4dca-0b6f-4cf5-907c-56316bc1bf3d'
ReferenceId = 'AKSIngressHttpsOnlyEffect'
Version = '8.*.*'
Parameters = @{
effect = (Param AKSIngressHttpsOnlyEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-MySQL-sslEnforcement'
ReferenceId = 'MySQLEnableSSLDeployEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param MySQLEnableSSLDeployEffect)
minimalTlsVersion = (Param MySQLminimalTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-MySql-http'
ReferenceId = 'MySQLEnableSSLEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param MySQLEnableSSLEffect)
minimalTlsVersion = (Param MySQLminimalTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-PostgreSQL-sslEnforcement'
ReferenceId = 'PostgreSQLEnableSSLDeployEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param PostgreSQLEnableSSLDeployEffect)
minimalTlsVersion = (Param PostgreSQLminimalTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-PostgreSql-http'
ReferenceId = 'PostgreSQLEnableSSLEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param PostgreSQLEnableSSLEffect)
minimalTlsVersion = (Param PostgreSQLminimalTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-Redis-sslEnforcement'
ReferenceId = 'RedisTLSDeployEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param RedisTLSDeployEffect)
minimumTlsVersion = (Param RedisMinTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Append-Redis-disableNonSslPort'
ReferenceId = 'RedisdisableNonSslPort'
Version = '1.*.*'
Parameters = @{
effect = (Param RedisTLSDeployEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-Redis-http'
ReferenceId = 'RedisDenyhttps'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param RedisTLSEffect)
minimumTlsVersion = (Param RedisMinTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-SqlMi-minTLS'
ReferenceId = 'SQLManagedInstanceTLSDeployEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param SQLManagedInstanceTLSDeployEffect)
minimalTlsVersion = (Param SQLManagedInstanceMinTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-SqlMi-minTLS'
ReferenceId = 'SQLManagedInstanceTLSEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param SQLManagedInstanceTLSEffect)
minimalTlsVersion = (Param SQLManagedInstanceMinTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-SQL-minTLS'
ReferenceId = 'SQLServerTLSDeployEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param SQLServerTLSDeployEffect)
minimalTlsVersion = (Param SQLServerminTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-Sql-minTLS'
ReferenceId = 'SQLServerTLSEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param SQLServerTLSEffect)
minimalTlsVersion = (Param SQLServerminTlsVersion)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-Storage-sslEnforcement'
ReferenceId = 'StorageDeployHttpsEnabledEffect'
Version = '1.*.*'
Parameters = [ordered]@{
effect = (Param StorageDeployHttpsEnabledEffect)
minimumTlsVersion = (Param StorageMinimumTlsVersion)
}
}
PolicyDefinition @{
Id = '0e80e269-43a4-4ae9-b5bc-178126b8a5cb'
ReferenceId = 'ContainerAppsHttpsOnlyEffect'
Version = '1.*.*'
Parameters = @{
effect = (Param ContainerAppsHttpsOnlyEffect)
}
}
PolicyDefinition @{
Id = '1f01f1c7-539c-49b5-9ef4-d4ffa37d22e0'
ReferenceId = 'Dine-FunctionApp-Tls'
Version = '1.*.*'
Parameters = @{
effect = (Param FunctionAppTlsEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deploy-LogicApp-TLS'
ReferenceId = 'Deploy-LogicApp-TLS'
Version = '1.*.*'
Parameters = @{
effect = (Param LogicAppTlsEffect)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-LogicApps-Without-Https'
ReferenceId = 'Deny-LogicApp-Without-Https'
Version = '1.*.*'
Parameters = @{
effect = (Param LogicAppHttpsEffect)
}
}
PolicyDefinition @{
Id = 'fa3a6357-c6d6-4120-8429-855577ec0063'
ReferenceId = 'Dine-Function-Apps-Slots-Tls'
Version = '1.*.*'
Parameters = @{
effect = (Param FunctionAppSlotsTls)
}
}
PolicyDefinition @{
Id = 'ae44c1d1-0df2-4ca9-98fa-a3d3ae5b409d'
ReferenceId = 'Dine-AppService-Apps-Tls'
Version = '1.*.*'
Parameters = @{
effect = (Param AppServiceAppsTls)
}
}
PolicyDefinition @{
Id = 'a4af4a39-4135-47fb-b175-47fbdf85311d'
ReferenceId = 'Deny-AppService-Apps-Https'
Version = '4.*.*'
Parameters = @{
effect = (Param AppServiceAppsHttps)
}
}
PolicyDefinition @{
Id = 'd6545c6b-dd9d-4265-91e6-0b451e2f1c50'
ReferenceId = 'Deny-AppService-Tls'
Version = '2.*.*'
Parameters = @{
effect = (Param AppServiceTls)
}
}
PolicyDefinition @{
Id = '014664e7-e348-41a3-aeb9-566e4ff6a9df'
ReferenceId = 'DINE-AppService-AppSlotTls'
Version = '1.*.*'
Parameters = @{
effect = (Param AppServiceAppSlotTls)
}
}
PolicyDefinition @{
Id = '5e5dbe3f-2702-4ffc-8b1e-0cae008a5c71'
ReferenceId = 'Deny-FuncAppSlots-Https'
Version = '2.*.*'
Parameters = @{
effect = (Param FunctionAppSlotsHttps)
}
}
PolicyDefinition @{
Id = '6d555dd1-86f2-4f1c-8ed7-5abae7c6cbab'
ReferenceId = 'Deny-FunctionApp-Https'
Version = '5.*.*'
Parameters = @{
effect = (Param FunctionAppHttps)
}
}
PolicyDefinition @{
Id = 'ae1b9a8c-dfce-4605-bd91-69213b4a26fc'
ReferenceId = 'Deny-AppService-Slots-Https'
Version = '2.*.*'
Parameters = @{
effect = (Param AppServiceAppSlotsHttps)
}
}
PolicyDefinition @{
Id = '0e80e269-43a4-4ae9-b5bc-178126b8a5cb'
ReferenceId = 'Deny-ContainerApps-Https'
Version = '1.*.*'
Parameters = @{
effect = (Param ContainerAppsHttps)
}
}
PolicyDefinition @{
Id = '/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Authorization/policyDefinitions/Deny-EH-minTLS'
ReferenceId = 'Deny-EH-minTLS'
Version = '1.*.*'
Parameters = @{
effect = (Param EventHubMinTls)
}
}
PolicyDefinition @{
Id = 'a8793640-60f7-487c-b5c3-1d37215905c4'
ReferenceId = 'Deny-Sql-Managed-Tls-Version'
Version = '1.*.*'
Parameters = @{
effect = (Param SqlManagedTlsVersion)
}
}
PolicyDefinition @{
Id = '32e6bbec-16b6-44c2-be37-c5b672d103cf'
ReferenceId = 'Deny-Sql-Db-Tls'
Version = '2.*.*'
Parameters = @{
effect = (Param SqlDbTls)
}
}
PolicyDefinition @{
Id = 'fe83a0eb-a853-422d-aac2-1bffd182c5d0'
ReferenceId = 'Deny-Storage-Tls'
Version = '1.*.*'
Parameters = @{
effect = (Param StorageAccountsTls)
}
}
PolicyDefinition @{
Id = 'cb3738a6-82a2-4a18-b87b-15217b9deff4'
ReferenceId = 'Deny-Synapse-Tls-Version'
Version = '1.*.*'
Parameters = @{
effect = (Param SynapseTlsVersion)
}
}
}Members (38)
- AppService append enable https only setting to enforce https setting.
- AppService append sites with minimum TLS version to enforce.
- Function apps should use the latest TLS version
- App Service apps should use the latest TLS version
- API App should only be accessible over HTTPS
- Function App should only be accessible over HTTPS
- Web Application should only be accessible over HTTPS
- Kubernetes clusters should be accessible only over HTTPS
- Azure Database for MySQL server deploy a specific min TLS version and enforce SSL.
- MySQL database servers enforce SSL connections.
- Azure Database for PostgreSQL server deploy a specific min TLS version requirement and enforce SSL
- PostgreSQL database servers enforce SSL connection.
- Azure Cache for Redis Append a specific min TLS version requirement and enforce TLS.
- Azure Cache for Redis Append and the enforcement that enableNonSslPort is disabled.
- Azure Cache for Redis only secure connections should be enabled
- SQL managed instances deploy a specific min TLS version requirement.
- SQL Managed Instance should have the minimal TLS version set to the highest version
- SQL servers deploys a specific min TLS version requirement.
- Azure SQL Database should have the minimal TLS version set to the highest version
- Azure Storage deploy a specific min TLS version requirement and enforce SSL/HTTPS
- Container Apps should only be accessible over HTTPS
- Configure Function apps to use the latest TLS version
- Configure Logic apps to use the latest TLS version
- Logic app should only be accessible over HTTPS
- Configure Function app slots to use the latest TLS version
- Configure App Service apps to use the latest TLS version
- App Service apps should only be accessible over HTTPS
- App Service Environment should have TLS 1.0 and 1.1 disabled
- Configure App Service app slots to use the latest TLS version
- Function app slots should only be accessible over HTTPS
- Function apps should only be accessible over HTTPS
- App Service app slots should only be accessible over HTTPS
- Container Apps should only be accessible over HTTPS
- Event Hub namespaces should use a valid TLS version
- SQL Managed Instance should have the minimal TLS version of 1.2
- Azure SQL Database should be running TLS version 1.2 or newer
- Storage accounts should have the specified minimum TLS version
- Azure Synapse Workspace SQL Server should be running TLS version 1.2 or newer
Source: policy_set_definitions/Enforce-EncryptTransit_20240509.alz_policy_set_definition.json in Azure/Azure-Landing-Zones-Library, under the MIT licence.
Bylaw